/**
 * VOD List — sidebar section with scrollable video post cards.
 *
 * @package Hamechadesh
 */

/* ==========================================================================
   VOD Section Header
   ========================================================================== */

.hm-vod-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start; /* RIGHT in RTL */
	width: 100%;
	margin-top: 40px;
}

/* VOD gradient title — matches navbar VOD styling */
.hm-vod-list__title {
	position: relative;
	display: inline-block;
	font-size: 32px;
	font-weight: 900;
	line-height: 1;
	background: linear-gradient(110.12deg, var(--hm-color-vod-start) 9.08%, var(--hm-color-vod-end) 85.42%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-bottom: 8px;
}

/* Gradient dot — positioned at top-start of the VOD text (same as navbar) */
.hm-vod-list__title-dot {
	position: absolute;
	width: 13px;
	height: 13px;
	top: 2px;
	inset-inline-start: -7px;
}

/* ==========================================================================
   Scrollable Card Container
   ========================================================================== */

.hm-vod-list__scroll {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	height: 312px;
	overflow-y: auto;
	overflow-x: hidden;
	border-radius: var(--hm-radius-md);

	scrollbar-width: thin;
	scrollbar-color: var(--hm-color-accent) #D4D4D4;
	padding-left: 5px;
}

/* WebKit scrollbar fallback — explicit thumb/track ensures visibility */
.hm-vod-list__scroll::-webkit-scrollbar {
	width: 6px;
}

.hm-vod-list__scroll::-webkit-scrollbar-track {
	background: #D4D4D4;
	border-radius: 3px;
}

.hm-vod-list__scroll::-webkit-scrollbar-thumb {
	background-color: var(--hm-color-accent);
	border-radius: 3px;
}

/* ==========================================================================
   Individual Card
   ========================================================================== */

.hm-vod-card {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	height: 100px;
	border-radius: var(--hm-radius-md);
	text-decoration: none;
	color: inherit;
	transition: opacity var(--hm-transition-fast);
}

.hm-vod-card:hover {
	opacity: 0.9;
}

/* --- Dark variant (VOD category) --- */
.hm-vod-card--dark {
	background-color: #383838;
	color: #ffffff;
}

/* --- Light variant (other categories) --- */
.hm-vod-card--light {
	background-color: #ffffff;
	color: var(--hm-color-primary);
}

/* ==========================================================================
   Card Image Area (RIGHT side in RTL — first in DOM)
   ========================================================================== */

.hm-vod-card__media {
	position: relative;
	flex-shrink: 0;
	width: 124px;
	height: 100%;
	border-start-start-radius: var(--hm-radius-md);
	border-end-start-radius: var(--hm-radius-md);
	overflow: hidden;
}

.hm-vod-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Play circle icon — centered on image */
.hm-vod-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	pointer-events: none;
}

/* Category badge on image — reuses hm-featured__category structure */
.hm-vod-card__media .hm-featured__category {
	display: flex;
	position: absolute;
	bottom: -1px;
	left: -3px !important;
	inset-inline-end: 0;
	width: 76px;
	height: 19px;
	z-index: 2;
}

.hm-vod-card__media .hm-featured__category-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.hm-vod-card__media .hm-featured__category-dot {
	position: absolute;
	width: 8px;
    height: 8px;
    top: 0px;
    left: 66px;
}

.hm-vod-card__media .hm-featured__category-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 300;
	line-height: 14.592px;
	color: var(--hm-color-text-inverse);
	white-space: nowrap;
	padding-top: 2px;
}

/* ==========================================================================
   Card Content Area (LEFT side in RTL — second in DOM)
   ========================================================================== */

.hm-vod-card__content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start; /* RIGHT in RTL */
	gap: 3px;
	padding: 0 10px;
}

/* --- Before-title badge with side border (RIGHT side in RTL = inline-start) --- */
.hm-vod-card__badge {
	border-inline-start-width: 0.5px;
	border-inline-start-style: solid;
	padding-inline-start: 13px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.84px;
	line-height: 22.115px;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Dark card badge: gradient text + pink border */
.hm-vod-card--dark .hm-vod-card__badge {
	border-inline-start-color: var(--hm-color-vod-start);
	background: linear-gradient(136.35deg, var(--hm-color-vod-start) 9.08%, var(--hm-color-vod-end) 85.42%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Light card badge: red text + red border */
.hm-vod-card--light .hm-vod-card__badge {
	border-inline-start-color: var(--hm-color-accent);
	color: var(--hm-color-accent);
}

/* --- Post title --- */
.hm-vod-card__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	text-align: start;
	width: 100%;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

.hm-vod-card--dark .hm-vod-card__title {
	color: #ffffff;
}

.hm-vod-card--light .hm-vod-card__title {
	color: var(--hm-color-primary);
}

/* --- Meta row (time | date | author) --- */
.hm-vod-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 10px;
	font-weight: 300;
	line-height: normal;
}

/* Time and date never wrap */
.hm-vod-card__meta time {
	white-space: nowrap;
	flex-shrink: 0;
}

/* Author name can wrap to a second line with tight line-height */
.hm-vod-card__meta-author {
	white-space: normal;
	line-height: 1.1;
	min-width: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hm-vod-card--dark .hm-vod-card__meta {
	/* a11y: 0.5 gave ~4.2:1 on #383838 (just below AA). 0.62 → ~5.6:1. */
	color: rgba(255, 255, 255, 0.62);
}

.hm-vod-card--light .hm-vod-card__meta {
	/* a11y: 0.5 gave ~3.2:1 on #fff (fails AA). 0.65 → ~5.0:1. */
	color: rgba(33, 33, 33, 0.65);
}

/* Pipe separator */
.hm-vod-card__sep {
	width: 1px;
	align-self: stretch;
	flex-shrink: 0;
}

.hm-vod-card--dark .hm-vod-card__sep {
	background-color: rgba(255, 255, 255, 0.5);
}

.hm-vod-card--light .hm-vod-card__sep {
	background-color: rgba(33, 33, 33, 0.5);
}

/* ==========================================================================
   Generic Sidebar Post List (רץ ברשת / הנצפים ביותר)
   Reuses .hm-vod-card and .hm-vod-list__scroll for card and scroll styling.
   ========================================================================== */

.hm-sidebar-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start; /* RIGHT in RTL */
	width: 100%;
	margin-top: 40px;
}

/* Regular (non-gradient) section title — dark text + red dot */
.hm-sidebar-list__title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 32px;
	font-weight: 900;
	line-height: 1;
	color: var(--hm-color-primary);
	margin-bottom: 8px;
}

.hm-sidebar-list__title-dot {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

/* ==========================================================================
   Sidebar Banner (below VOD list)
   ========================================================================== */

.hm-sidebar-banner {
	margin-top: 20px;
	width: 320px;
	height: 100px;
	max-width: 100%;
}

.hm-sidebar-banner.hm-featured__banner--loading {
	min-height: unset;
	height: 100px;
	border-radius: var(--hm-radius-md);
}

/* ==========================================================================
   Desktop: Sidebar Height Matching
   ========================================================================== */

@media (min-width: 1350px) {
	.hm-vod-list,
	.hm-sidebar-list {
		flex: 1 0 0;
		min-height: 352px; /* title (~40px) + scroll minimum (312px) */
	}

	.hm-vod-list__scroll {
		flex: 1;
		height: auto;
		min-height: 0; /* override flex default so overflow-y scrolls */
	}

	.hm-sidebar-banner {
		flex-shrink: 0;
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Mobile: below 1350px the sidebar stacks full width */
@media (max-width: 1349px) {
	.hm-vod-list__scroll {
		height: 324px; /* slightly taller on mobile for 3 cards + gap */
	}
}

@media (max-width: 767px) {
	.hm-vod-list__title,
	.hm-sidebar-list__title {
		font-size: 26px;
	}

	.hm-vod-list__scroll {
		height: 324px;
	}
}
