/* HLS Netflix Player — სერიალის სეზონ/ეპიზოდის ამომრჩევი (მხოლოდ ეპიზოდებზე).
   ეს ფაილი იტვირთება მხოლოდ .hnp-has-series ფლეერისთვის, ამიტომ ფილმებზე
   ეს სტილები საერთოდ არ არსებობს. */

/* ============ ახალი: სეზონისა და ეპიზოდის ამომრჩევი ============ */
.hnp-top-left { pointer-events: none; }

.hnp-ep-trigger {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 12px 6px 6px;
	border-radius: 10px;
	background: rgba(17, 17, 17, 0.55);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s ease, border-color 0.15s ease;
	flex-shrink: 0;
}
.hnp-ep-trigger:hover { background: rgba(17, 17, 17, 0.82); border-color: rgba(255, 255, 255, 0.28); }
.hnp-ep-trigger-icon {
	width: 32px;
	height: 32px;
	border-radius: 7px;
	background: var(--hnp-accent);
	display: grid;
	place-items: center;
	flex-shrink: 0;
}
.hnp-ep-trigger-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; min-width: 0; }
.hnp-ep-trigger-show { font-size: 10.5px; color: rgba(255, 255, 255, 0.6); white-space: nowrap; }
.hnp-ep-trigger-where { font-size: 13px; font-weight: 700; white-space: nowrap; }
.hnp-ep-chevron { transition: transform 0.2s ease; opacity: 0.75; }
.hnp-ep-open .hnp-ep-chevron { transform: rotate(180deg); }

.hnp-ep-scrim {
	position: absolute;
	inset: 0;
	z-index: 29;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
}
.hnp-ep-open .hnp-ep-scrim { opacity: 1; pointer-events: auto; }

.hnp-ep-panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 30;
	width: min(400px, 100%);
	display: flex;
	flex-direction: column;
	color: #fff;
	background: rgba(13, 13, 15, 0.95);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5);
	transform: translateX(-104%);
	visibility: hidden;
	transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0.3s;
}
.hnp-ep-open .hnp-ep-panel {
	transform: none;
	visibility: visible;
	transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), visibility 0s;
}

.hnp-ep-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 14px 12px 20px;
}
.hnp-ep-head-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.hnp-ep-head-sub { font-size: 12px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }
.hnp-ep-close { flex-shrink: 0; margin-top: -4px; }

.hnp-ep-seasons-wrap {
	position: relative;
	padding: 0 20px 14px;
	border-bottom: 1px solid var(--hnp-ui-border);
}
.hnp-ep-seasons {
	position: relative;
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
	padding: 2px 1px;
}
.hnp-ep-seasons::-webkit-scrollbar { display: none; }
.hnp-ep-season {
	flex-shrink: 0;
	scroll-snap-align: start;
	height: 34px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: transparent;
	color: rgba(255, 255, 255, 0.75);
	font-size: 12.5px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hnp-ep-season.is-num {
	min-width: 34px;
	padding: 0 10px;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}
.hnp-ep-season:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.hnp-ep-season[aria-selected="true"] { background: var(--hnp-accent); border-color: var(--hnp-accent); color: #fff; }

/* ისრები ჩნდება მხოლოდ მაშინ, როცა სეზონები არ ჩაეტევა */
.hnp-ep-snav {
	position: absolute;
	top: 0;
	bottom: 14px;
	z-index: 1;
	width: 64px;
	display: flex;
	align-items: center;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}
.hnp-ep-snav-prev {
	left: 0;
	padding-left: 12px;
	justify-content: flex-start;
	background: linear-gradient(to right, rgb(13, 13, 15) 42%, rgba(13, 13, 15, 0));
}
.hnp-ep-snav-next {
	right: 0;
	padding-right: 12px;
	justify-content: flex-end;
	background: linear-gradient(to left, rgb(13, 13, 15) 42%, rgba(13, 13, 15, 0));
}
.can-prev .hnp-ep-snav-prev,
.can-next .hnp-ep-snav-next {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.15s ease, visibility 0s;
}
.hnp-ep-snav button {
	pointer-events: auto;
	width: 30px;
	height: 30px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(44, 44, 48, 0.96);
	color: #fff;
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
	transition: background 0.15s ease, border-color 0.15s ease;
}
.hnp-ep-snav button:hover { background: var(--hnp-accent); border-color: var(--hnp-accent); }

.hnp-ep-list {
	position: relative;
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 8px 8px 18px;
}
.hnp-ep-item {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
	width: 100%;
	padding: 8px 12px 8px 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #fff;
	text-align: left;
	cursor: pointer;
	transition: background 0.12s ease;
}
.hnp-ep-item + .hnp-ep-item { margin-top: 2px; }
.hnp-ep-item:hover { background: rgba(255, 255, 255, 0.06); }
.hnp-ep-item.is-current {
	background: color-mix(in srgb, var(--hnp-accent) 17%, transparent);
	box-shadow: inset 3px 0 0 var(--hnp-accent);
}
.hnp-ep-item.is-soon { cursor: default; }
.hnp-ep-item.is-soon:hover { background: transparent; }
.hnp-ep-item.is-soon .hnp-ep-thumb,
.hnp-ep-item.is-soon .hnp-ep-title { opacity: 0.45; }

.hnp-ep-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	overflow: hidden;
	background: #14161b;
	flex-shrink: 0;
}
.hnp-ep-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.hnp-ep-thumb-gen {
	background:
		radial-gradient(120% 90% at 75% 20%, hsla(var(--h), 70%, 60%, 0.4), transparent 60%),
		linear-gradient(140deg, hsl(var(--h), 40%, 22%), hsl(calc(var(--h) + 35), 45%, 7%));
}
.hnp-ep-num {
	position: absolute;
	left: 6px;
	bottom: 7px;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.62);
}
.hnp-ep-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.22); }
.hnp-ep-bar i { display: block; height: 100%; background: var(--hnp-accent); }

.hnp-ep-eq {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	background: rgba(0, 0, 0, 0.35);
}
.hnp-ep-eq i {
	width: 3px;
	height: 16px;
	border-radius: 2px;
	background: #fff;
	transform-origin: bottom;
	animation: hnp-eq 0.9s ease-in-out infinite;
}
.hnp-ep-eq i:nth-child(2) { animation-delay: -0.3s; }
.hnp-ep-eq i:nth-child(3) { animation-delay: -0.6s; }
.hnp-ep-eq.is-paused i { animation: none; transform: scaleY(0.45); }
@keyframes hnp-eq {
	0%, 100% { transform: scaleY(0.35); }
	50% { transform: scaleY(1); }
}

.hnp-ep-title { font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnp-ep-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.hnp-ep-item.is-current .hnp-ep-sub { color: color-mix(in srgb, var(--hnp-accent) 55%, #fff); }
.hnp-ep-tag {
	font-size: 10.5px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.75);
}

/* შემდეგი ეპიზოდის ღილაკი ათვლის შკალით */
.hnp-next-go { position: relative; overflow: hidden; }
/* next-fill */
.hnp-next-fill {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.24);
	transform-origin: left center;
	transform: scaleX(0);
	pointer-events: none;
}
.hnp-next-go > span, .hnp-next-go > svg { position: relative; }

/* ტოსტი ზედა ზოლის ქვემოთ, რომ ამომრჩეველს არ გადაეფარებოდეს */
.hnp-wrapper .hnp-toast { top: 78px; }

.hnp-wrapper :focus-visible { outline: 2px solid var(--hnp-accent); outline-offset: 2px; }


@media (max-width: 640px) {
	.hnp-ep-trigger { padding: 4px 10px 4px 4px; gap: 8px; }
	.hnp-ep-trigger-icon { width: 28px; height: 28px; }
	.hnp-ep-trigger-show { display: none; }
	.hnp-ep-trigger-where { font-size: 12px; }
	.hnp-top-left .hnp-title-text { display: none; }
	.hnp-ep-panel { width: 100%; border-right: 0; }
	.hnp-ep-head { padding: 12px 10px 8px 14px; }
	.hnp-ep-head-title { font-size: 14px; }
	.hnp-ep-seasons-wrap { padding: 0 14px 10px; }
	.hnp-ep-snav { bottom: 10px; }
	.hnp-ep-snav-prev { padding-left: 8px; }
	.hnp-ep-snav-next { padding-right: 8px; }
	.hnp-ep-item { grid-template-columns: 100px minmax(0, 1fr); gap: 10px; padding: 6px 8px; }
	.hnp-ep-title { font-size: 13px; }
	.hnp-wrapper .hnp-toast { top: 56px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
	.hnp-ep-panel, .hnp-ep-scrim, .hnp-ep-chevron { transition: none !important; }
	.hnp-ep-eq i { animation: none; transform: scaleY(0.6); }
}

/* VIP ეპიზოდი */
.hnp-ep-vip {
	position: absolute;
	right: 6px;
	top: 6px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.4px;
	padding: 2px 6px;
	border-radius: 4px;
	background: linear-gradient(135deg, #f0b90b, #d98c00);
	color: #241a00;
}
.hnp-ep-item.is-vip .hnp-ep-thumb { opacity: 0.85; }

/* ცარიელი / ჩატვირთვის მდგომარეობა */
.hnp-ep-loading,
.hnp-ep-empty {
	padding: 40px 20px;
	text-align: center;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.55);
}

/* ეპიზოდის ცვლისას ფონი — ფლეერისავე spinner გამოჩნდება */
.hnp-video-container.hnp-buffering .hnp-video { opacity: 0.4; transition: opacity 0.2s ease; }

/* შემდეგი ეპიზოდის ღილაკის ათვლის შკალა */
.hnp-next-go { position: relative; overflow: hidden; }
.hnp-next-go > span, .hnp-next-go > svg { position: relative; z-index: 1; }
