/* =========================================================
   JAIMEDIAZ.TV - FULLSTORY REPLAY PREMIUM V4 BALANCED
   Archivo: templates/jd_design/css/fullstory-replay.css

   Objetivo:
   - Hero superior compacto y elegante.
   - El reproductor es el protagonista.
   - Playlist integrada estilo streaming.
   - Sin parches al final: CSS limpio y completo.
   ========================================================= */

.jd-replay-page {
	--jd-navy: var(--pe-navy, #071f3a);
	--jd-dark: var(--pe-dark, #06172f);
	--jd-text: var(--pe-text, #172033);
	--jd-muted: #64748b;
	--jd-border: var(--pe-border, #dbe8f5);
	--jd-orange: var(--pe-orange, #ff9f43);
	--jd-coral: var(--pe-coral, #ff5b4a);
	--jd-blue: #3b82f6;
	--jd-radius: var(--pe-radius, 18px);
	--jd-shadow: var(--pe-shadow, 0 22px 55px rgba(13, 38, 76, .12));
	--jd-soft-shadow: var(--pe-shadow-soft, 0 12px 30px rgba(13, 38, 76, .08));
	color: var(--jd-text);
}

/* =========================================================
   HERO COMPACTO
   ========================================================= */

.jd-replay-hero {
	position: relative;
	overflow: hidden;
	margin: 0 0 16px;
	border-radius: 18px;
	background:
		radial-gradient(circle at 10% 12%, rgba(255, 159, 67, .18), transparent 30%),
		radial-gradient(circle at 82% 16%, rgba(255, 91, 74, .13), transparent 34%),
		linear-gradient(135deg, #06172f 0%, #09284b 52%, #07162b 100%);
	box-shadow: 0 16px 42px rgba(6, 23, 47, .14);
	isolation: isolate;
}

.jd-replay-hero::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--jd-coral), var(--jd-orange), var(--jd-blue));
	opacity: .95;
}

.jd-replay-hero__glow {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(255,255,255,.08), transparent 42%),
		repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 1px, transparent 1px 12px);
	pointer-events: none;
	z-index: -1;
}

.jd-replay-hero__inner {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: 100%;
	max-width: 880px;
	padding: 22px 30px 24px;
	color: #fff;
}

.jd-replay-kicker,
.jd-replay-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.jd-replay-kicker span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.18);
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: .035em;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.jd-replay-kicker__cat {
	background: rgba(255, 159, 67, .17) !important;
}

.jd-replay-kicker .fa,
.jd-replay-meta .fa {
	color: var(--jd-orange);
}

.jd-replay-hero h1 {
	margin: 12px 0 8px;
	max-width: 760px;
	font-size: clamp(28px, 3.4vw, 42px);
	line-height: 1.06;
	letter-spacing: -.9px;
	color: #fff;
	text-shadow: 0 10px 24px rgba(0,0,0,.25);
}

.jd-replay-meta {
	color: rgba(255,255,255,.86);
	font-size: 12px;
	font-weight: 800;
}

.jd-replay-meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.jd-replay-meta a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.jd-replay-hero__summary {
	margin-top: 10px;
	max-width: 660px;
	color: rgba(255,255,255,.84);
	font-size: 13px;
	line-height: 1.45;
}

.jd-replay-hero__summary p {
	margin: 0;
}

/* =========================================================
   TEATRO / PLAYER
   ========================================================= */

.jd-replay-theater {
	position: relative;
	overflow: hidden;
	margin: 0 0 24px;
	padding: 16px;
	border-radius: 22px;
	background:
		radial-gradient(circle at 14% 8%, rgba(255, 159, 67, .15), transparent 32%),
		radial-gradient(circle at 88% 0%, rgba(255, 91, 74, .13), transparent 30%),
		linear-gradient(135deg, #06172f 0%, #071f3a 48%, #0a2342 100%);
	border: 1px solid rgba(255,255,255,.09);
	box-shadow: 0 20px 55px rgba(6, 23, 47, .16);
}

.jd-replay-theater::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 1px, transparent 1px 12px);
	pointer-events: none;
}

.jd-replay-theater > * {
	position: relative;
	z-index: 1;
}

.jd-replay-theater__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 4px 4px 14px;
	color: #fff;
}

.jd-replay-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #ffb86c;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .05em;
	line-height: 1;
	text-transform: uppercase;
}

.jd-replay-theater h2 {
	margin: 6px 0 4px;
	font-size: clamp(22px, 2.3vw, 31px);
	line-height: 1.08;
	color: #fff;
	letter-spacing: -.6px;
}

.jd-replay-theater p {
	margin: 0;
	color: rgba(255,255,255,.70);
	font-size: 13px;
	line-height: 1.5;
}

.jd-replay-theater__tools {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.jd-replay-mini-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid rgba(255,255,255,.16);
	border-radius: 999px;
	background: rgba(255,255,255,.10);
	color: #fff !important;
	font-size: 11px;
	font-weight: 900;
	text-decoration: none !important;
	cursor: pointer;
	backdrop-filter: blur(12px);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.jd-replay-mini-btn:hover {
	transform: translateY(-1px);
	background: rgba(255,255,255,.16);
	border-color: rgba(255,255,255,.28);
	box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

.jd-replay-mini-btn--primary {
	background: linear-gradient(135deg, var(--jd-coral), var(--jd-orange));
	border-color: transparent;
	box-shadow: 0 12px 26px rgba(255, 91, 74, .25);
}

.jd-replay-mini-btn:disabled,
.jd-replay-mini-btn[disabled] {
	opacity: .45;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}

.jd-replay-theater__stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 14px;
	align-items: stretch;
}

.jd-replay-video-panel {
	min-width: 0;
}

.jd-replay-video-shell {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: 18px;
	background: #020617;
	border: 1px solid rgba(255,255,255,.10);
	box-shadow: 0 18px 45px rgba(0,0,0,.30);
}

.jd-replay-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #020617;
}

.jd-replay-watermark,
.jd-replay-live-badge {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border-radius: 999px;
	background: rgba(2,6,23,.72);
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .07em;
	pointer-events: none;
	backdrop-filter: blur(10px);
}

.jd-replay-watermark {
	top: 14px;
	left: 14px;
	padding: 7px 10px;
}

.jd-replay-live-badge {
	top: 14px;
	right: 14px;
	padding: 7px 11px;
	text-transform: uppercase;
}

.jd-replay-live-badge .fa {
	font-size: 7px;
	color: var(--jd-coral);
}

/* =========================================================
   PLAYLIST
   ========================================================= */

.jd-replay-playlist {
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 18px;
	background: rgba(255,255,255,.08);
	backdrop-filter: blur(14px);
}

.jd-replay-playlist__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 16px;
	border-bottom: 1px solid rgba(255,255,255,.12);
	background: rgba(255,255,255,.08);
	color: #fff;
}

.jd-replay-playlist__head strong {
	display: block;
	color: #fff;
	font-size: 15px;
	font-weight: 900;
}

.jd-replay-playlist__head span {
	display: block;
	margin-top: 3px;
	color: rgba(255,255,255,.62);
	font-size: 12px;
	font-weight: 700;
}

.jd-replay-playlist__head .fa {
	color: var(--jd-orange);
}

.jd-replay-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 520px;
	overflow: auto;
	padding: 13px;
}

.jd-replay-list::-webkit-scrollbar {
	width: 8px;
}

.jd-replay-list::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,.18);
	border-radius: 999px;
}

.jd-replay-item {
	display: grid;
	grid-template-columns: 28px 34px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	width: 100%;
	padding: 11px;
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 17px;
	background: rgba(255,255,255,.08);
	color: #fff;
	text-align: left;
	cursor: pointer;
	transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.jd-replay-item:hover,
.jd-replay-item.is-active {
	transform: translateY(-1px);
	border-color: rgba(255,159,67,.45);
	box-shadow: 0 14px 30px rgba(0,0,0,.22);
}

.jd-replay-item.is-active {
	background: linear-gradient(135deg, rgba(255,91,74,.22), rgba(255,159,67,.16));
}

.jd-replay-item__number {
	color: rgba(255,255,255,.45);
	font-size: 11px;
	font-weight: 900;
}

.jd-replay-item__play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
}

.jd-replay-item.is-active .jd-replay-item__play {
	background: linear-gradient(135deg, var(--jd-coral), var(--jd-orange));
	color: #fff;
}

.jd-replay-item__body {
	min-width: 0;
}

.jd-replay-item__body b,
.jd-replay-item__body small {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.jd-replay-item__body b {
	color: #fff;
	font-size: 13px;
	font-weight: 900;
}

.jd-replay-item__body small {
	margin-top: 4px;
	color: rgba(255,255,255,.54);
	font-size: 11px;
}

.jd-replay-item__size {
	color: rgba(255,255,255,.70);
	font-size: 11px;
	font-weight: 800;
}

/* =========================================================
   NOWBAR / AUTONEXT
   ========================================================= */

.jd-replay-nowbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 14px;
	padding: 13px 15px;
	border: 1px solid rgba(255,255,255,.10);
	border-radius: 18px;
	background: rgba(255,255,255,.08);
	backdrop-filter: blur(12px);
}

.jd-replay-nowbar span {
	display: block;
	color: rgba(255,255,255,.58);
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .04em;
	line-height: 1;
	text-transform: uppercase;
}

.jd-replay-nowbar strong {
	display: block;
	margin-top: 5px;
	color: #fff;
	font-size: 14px;
	font-weight: 900;
}

.jd-replay-autonext {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: rgba(255,255,255,.72);
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	user-select: none;
}

.jd-replay-autonext input {
	accent-color: var(--jd-orange);
}

/* =========================================================
   ERROR / EMPTY
   ========================================================= */

.jd-replay-error {
	display: none;
	align-items: center;
	gap: 16px;
	margin-top: 16px;
	padding: 18px;
	border-radius: 18px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #9a3412;
}

.jd-replay-error.is-visible {
	display: flex;
}

.jd-replay-error .fa,
.jd-replay-empty .fa {
	font-size: 24px;
}

.jd-replay-error strong {
	display: block;
	margin-bottom: 4px;
}

.jd-replay-error p {
	margin: 0;
}

.jd-replay-empty {
	display: flex;
	align-items: center;
	gap: 16px;
	color: #fff;
}

/* =========================================================
   CONTENIDO / LAYOUT INFERIOR
   ========================================================= */

.jd-replay-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 265px;
	gap: 24px;
	align-items: start;
}

.jd-replay-main {
	min-width: 0;
}

.jd-replay-content-card,
.jd-replay-side-card,
.jd-replay-actions-bar,
.jd-replay-related {
	background: rgba(255,255,255,.92);
	border: 1px solid var(--jd-border);
	border-radius: var(--jd-radius);
	box-shadow: var(--jd-soft-shadow);
	backdrop-filter: blur(12px);
}

.jd-replay-content-card {
	padding: 28px;
	margin-bottom: 22px;
}

.jd-replay-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--jd-border);
}

.jd-replay-section-title .fa {
	color: var(--jd-coral);
}

.jd-replay-section-title h2 {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
	color: var(--jd-text);
}

.jd-replay-text {
	font-size: 16px;
	line-height: 1.78;
	color: #263244;
}

.jd-replay-shortstory {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.65;
	color: var(--jd-navy);
}

.jd-replay-actions-bar,
.jd-replay-related {
	margin-top: 22px;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.jd-replay-aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: 92px;
}

.jd-replay-side-card {
	padding: 20px;
}

.jd-replay-side-card h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 16px;
	color: var(--jd-text);
}

.jd-replay-side-card h3 .fa {
	color: var(--jd-coral);
}

.jd-replay-side-card p {
	margin: 0;
	color: var(--jd-muted);
	font-size: 13px;
	line-height: 1.6;
}

.jd-replay-side-card--brand {
	background:
		radial-gradient(circle at 20% 0%, rgba(255,159,67,.22), transparent 34%),
		linear-gradient(135deg, #071f3a, #0a2d54);
	color: #fff;
}

.jd-replay-side-card--brand h3,
.jd-replay-side-card--brand p {
	color: #fff;
}

.jd-replay-side-card__logo {
	display: inline-flex;
	margin-bottom: 14px;
	padding: 8px 10px;
	border-radius: 999px;
	background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.18);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .08em;
}

.jd-replay-side-card--stats ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.jd-replay-side-card--stats li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--jd-border);
}

.jd-replay-side-card--stats li:last-child {
	border-bottom: 0;
}

.jd-replay-side-card--stats span {
	color: var(--jd-muted);
	font-size: 12px;
}

.jd-replay-side-card--stats b {
	color: var(--jd-text);
	font-size: 12px;
	text-align: right;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1150px) {
	.jd-replay-layout {
		grid-template-columns: 1fr;
	}

	.jd-replay-aside {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 1020px) {
	.jd-replay-theater__stage {
		grid-template-columns: 1fr;
	}

	.jd-replay-list {
		max-height: 360px;
	}
}

@media (max-width: 720px) {
	.jd-replay-hero {
		border-radius: 16px;
	}

	.jd-replay-hero__inner {
		padding: 18px 18px 20px;
	}

	.jd-replay-hero h1 {
		font-size: 27px;
		line-height: 1.1;
	}

	.jd-replay-hero__summary {
		font-size: 13px;
	}

	.jd-replay-kicker span {
		font-size: 10px;
		padding: 6px 9px;
	}

	.jd-replay-theater {
		padding: 12px;
		border-radius: 18px;
	}

	.jd-replay-theater__top {
		align-items: flex-start;
		flex-direction: column;
		padding: 4px 4px 14px;
	}

	.jd-replay-theater__tools {
		justify-content: flex-start;
	}

	.jd-replay-mini-btn {
		min-height: 34px;
		padding: 0 10px;
	}

	.jd-replay-content-card,
	.jd-replay-side-card {
		padding: 18px;
		border-radius: 16px;
	}

	.jd-replay-nowbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.jd-replay-aside {
		grid-template-columns: 1fr;
	}

	.jd-replay-item {
		grid-template-columns: 28px 34px minmax(0, 1fr);
	}

	.jd-replay-item__size {
		grid-column: 3;
	}
}
