/* ═══════════════════════════════════════════════════════════════
   GTL Premium Media — Front-End Styles
   Matches the editorial/newspaper aesthetic of the GTL theme.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. CUSTOM VIDEO PLAYER ──────────────────────────────────── */
.gtl-player {
	position: relative;
	width: 100%;
	margin-bottom: 2rem;
	background: var(--ink, #1a1510);
	border-radius: var(--r-md, 0.5rem);
	overflow: hidden;
	font-family: var(--sans, 'IBM Plex Sans', sans-serif);
	user-select: none;
}

.gtl-player--video .gtl-player__screen {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	cursor: pointer;
}

.gtl-player__video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}

/* Watermark */
.gtl-player__watermark {
	position: absolute;
	bottom: 3rem;
	right: 0.75rem;
	font-family: var(--serif, 'Playfair Display', serif);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.4);
	pointer-events: none;
	z-index: 2;
}

.gtl-player__watermark--audio {
	bottom: auto;
	top: 0.5rem;
	right: 0.75rem;
	font-size: 0.75rem;
}

/* Big play button */
.gtl-player__big-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.35);
	border: none;
	cursor: pointer;
	color: #fff;
	transition: background var(--transition, 220ms ease);
	z-index: 3;
}

.gtl-player__big-play:hover {
	background: rgba(0, 0, 0, 0.5);
}

.gtl-player__big-play svg {
	width: 64px;
	height: 64px;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.gtl-player.is-playing .gtl-player__big-play {
	display: none;
}

/* ── Controls Bar ────────────────────────────────────────────── */
.gtl-player__controls {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: var(--ink, #1a1510);
	color: #fff;
	font-size: 0.8125rem;
}

.gtl-player__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	padding: 0.25rem;
	border-radius: 4px;
	transition: background 150ms ease;
	flex-shrink: 0;
}

.gtl-player__btn:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* Time display */
.gtl-player__time {
	font-family: var(--mono, 'Courier Prime', monospace);
	font-size: 0.75rem;
	white-space: nowrap;
	flex-shrink: 0;
	opacity: 0.8;
}

.gtl-player__sep {
	margin: 0 0.15rem;
	opacity: 0.5;
}

/* Progress bar */
.gtl-player__progress-wrap {
	flex: 1;
	padding: 0.5rem 0;
	cursor: pointer;
	position: relative;
}

.gtl-player__progress-bar {
	position: relative;
	height: 4px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 2px;
	overflow: visible;
}

.gtl-player__progress-wrap:hover .gtl-player__progress-bar {
	height: 6px;
}

.gtl-player__progress-played {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: var(--paper, #f4efe4);
	border-radius: 2px;
	z-index: 2;
	pointer-events: none;
	width: 0%;
}

.gtl-player__progress-buffered {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 2px;
	z-index: 1;
	pointer-events: none;
	width: 0%;
}

/* Chapter markers */
.gtl-player__chapter-marker {
	position: absolute;
	top: -2px;
	width: 2px;
	height: calc(100% + 4px);
	background: rgba(255, 255, 255, 0.4);
	z-index: 3;
	pointer-events: none;
}

/* Sponsor segment overlay */
.gtl-player__sponsor-segment {
	position: absolute;
	top: 0;
	height: 100%;
	background: rgba(255, 180, 0, 0.3);
	z-index: 1;
	pointer-events: none;
	border-radius: 2px;
}

/* Chapter tooltip */
.gtl-player__chapter-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background: var(--ink, #1a1510);
	color: #fff;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.6875rem;
	font-family: var(--sans, 'IBM Plex Sans', sans-serif);
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 150ms ease;
	z-index: 10;
}

.gtl-player__progress-wrap:hover .gtl-player__chapter-tooltip {
	opacity: 1;
}

/* Right controls group */
.gtl-player__right-controls {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

/* Speed button */
.gtl-player__speed {
	font-family: var(--mono, 'Courier Prime', monospace);
	font-size: 0.6875rem;
	min-width: 2rem;
	text-align: center;
}

/* ── 2. AUDIO PLAYER ────────────────────────────────────────── */
.gtl-player--audio {
	background: var(--card-bg, #eae5da);
	border: 1px solid var(--border, #c4bbb0);
}

.gtl-player__audio-layout {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
}

.gtl-player__artwork {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	border-radius: var(--r-md, 0.5rem);
	overflow: hidden;
}

.gtl-player__artwork img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gtl-player__audio-info {
	flex: 1;
	min-width: 0;
}

.gtl-player__ep-label {
	font-family: var(--mono, 'Courier Prime', monospace);
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-3, #6b6258);
}

.gtl-player__audio-title {
	font-family: var(--serif, 'Playfair Display', serif);
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0.25rem 0 0;
	color: var(--text, #1a1510);
	line-height: 1.3;
}

.gtl-player--audio .gtl-player__controls {
	background: var(--bg-2, #e0dbd0);
	color: var(--text, #1a1510);
	border-top: 1px solid var(--border-lt, #d4cfc4);
}

.gtl-player--audio .gtl-player__btn:hover {
	background: rgba(0, 0, 0, 0.08);
}

.gtl-player--audio .gtl-player__progress-bar {
	background: rgba(0, 0, 0, 0.1);
}

.gtl-player--audio .gtl-player__progress-played {
	background: var(--ink, #1a1510);
}

.gtl-player--audio .gtl-player__watermark {
	color: var(--text-3, #6b6258);
	opacity: 0.4;
}

.gtl-player__audio {
	display: none;
}

/* ── 3. YOUTUBE EMBED ────────────────────────────────────────── */
.gtl-yt-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin-bottom: 2rem;
	border-radius: var(--r-md, 0.5rem);
	overflow: hidden;
}

.gtl-yt-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* ── 4. BANNER ADS ───────────────────────────────────────────── */
.gtl-banner-ad {
	margin: 2.5rem 0;
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

.gtl-banner-ad__link {
	display: flex;
	align-items: stretch;
	gap: 0;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--border, #c4bbb0);
	border-radius: var(--r-md, 0.5rem);
	overflow: hidden;
	background: var(--card-bg, #eae5da);
	transition: border-color var(--transition, 220ms ease),
				box-shadow var(--transition, 220ms ease);
}

.gtl-banner-ad__link:hover {
	border-color: var(--ink-3, #6b6258);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.gtl-banner-ad__content {
	flex: 1;
	padding: 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.gtl-banner-ad__label {
	font-family: var(--mono, 'Courier Prime', monospace);
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-3, #6b6258);
	margin-bottom: 0.375rem;
}

.gtl-banner-ad__headline {
	font-family: var(--serif, 'Playfair Display', serif);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 0.375rem;
	color: var(--text, #1a1510);
}

.gtl-banner-ad__body {
	font-family: var(--body, 'Lora', serif);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--text-2, #3d362d);
	margin: 0;
}

.gtl-banner-ad__image {
	width: 40%;
	max-width: 280px;
	flex-shrink: 0;
}

.gtl-banner-ad__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── 5. PRIVATE FEED SECTION ─────────────────────────────────── */
.gtl-feed-section {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border, #c4bbb0);
}

.gtl-feed-section h3 {
	font-family: var(--serif, 'Playfair Display', serif);
	font-size: 1.25rem;
	margin: 0 0 0.5rem;
}

.gtl-feed-url-wrap {
	display: flex;
	gap: 0.5rem;
	margin: 1rem 0;
}

.gtl-feed-url-input {
	flex: 1;
	font-family: var(--mono, 'Courier Prime', monospace);
	font-size: 0.75rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border, #c4bbb0);
	border-radius: var(--r-md, 0.5rem);
	background: var(--bg-2, #e0dbd0);
	color: var(--text, #1a1510);
}

.gtl-feed-url-input:focus {
	outline: none;
	border-color: var(--ink-2, #3d362d);
}

/* ── 6. RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 600px) {
	.gtl-banner-ad__link {
		flex-direction: column-reverse;
	}

	.gtl-banner-ad__image {
		width: 100%;
		max-width: none;
		aspect-ratio: 16 / 9;
	}

	.gtl-player__controls {
		gap: 0.25rem;
		padding: 0.375rem 0.5rem;
	}

	.gtl-player__time {
		font-size: 0.6875rem;
	}

	.gtl-player__audio-layout {
		gap: 0.75rem;
		padding: 0.75rem;
	}

	.gtl-player__artwork {
		width: 60px;
		height: 60px;
	}

	.gtl-player__audio-title {
		font-size: 1rem;
	}

	.gtl-feed-url-wrap {
		flex-direction: column;
	}
}

/* ── 7. DARK MODE ────────────────────────────────────────────── */
[data-theme="dark"] .gtl-player--audio {
	background: var(--card-bg);
	border-color: var(--border);
}

[data-theme="dark"] .gtl-player--audio .gtl-player__controls {
	background: var(--bg-2);
	color: var(--text);
}

[data-theme="dark"] .gtl-banner-ad__link {
	background: var(--card-bg);
	border-color: var(--border);
}

[data-theme="dark"] .gtl-feed-url-input {
	background: var(--bg-2);
	border-color: var(--border);
	color: var(--text);
}

/* ── 8. PiP STYLES ───────────────────────────────────────────── */
.gtl-player.is-pip .gtl-player__screen::after {
	content: 'Playing in Picture-in-Picture';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-family: var(--sans, 'IBM Plex Sans', sans-serif);
	font-size: 0.875rem;
}