/**
 * Audiobooks Player page
 * Wood/metal frame + bulb border + list UI.
 */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&display=swap');

.page-audiobook-player.site-main {
	min-height: 100vh;
	background:
		linear-gradient(180deg, rgba(10, 2, 2, 0.92), rgba(0, 0, 0, 0.95)),
		url('./theatre/theatre-backdrop.png') center center / cover no-repeat;
	padding: 28px 16px 48px;
}

.page-audiobook-player .page-header,
.page-audiobook-player .entry-title {
	display: none !important;
}

.audiobook-player-stage {
	max-width: 980px;
	margin: 0 auto;
}

.audiobook-player-frame {
	position: relative;
	border-radius: 14px;
	padding: 22px;
	background:
		linear-gradient(180deg, rgba(40, 20, 10, 0.95), rgba(15, 8, 5, 0.95));
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(210, 170, 95, 0.22);
}

.audiobook-player-header {
	text-align: center;
	padding: 24px 24px 20px;
	margin: 0 -6px 8px;
	border-radius: 10px 10px 0 0;
	/* Exact wood frame image behind the title */
	background: url('./theatre/frame-title.png') center center / cover no-repeat;
	box-shadow:
		inset 0 1px 0 rgba(255, 240, 210, 0.15),
		inset 0 -2px 0 rgba(0, 0, 0, 0.9);
	border-bottom: 1px solid rgba(0, 0, 0, 0.85);
}

.audiobook-player-title {
	font-family: 'Cinzel', Georgia, serif !important;
	font-size: clamp(22px, 6.6vw, 54px) !important;
	font-weight: 600;
	color: #fbe2b3 !important;
	margin: 0 0 6px;
	letter-spacing: 0.04em;
	text-shadow:
		0 2px 10px rgba(0, 0, 0, 0.9),
		0 0 18px rgba(255, 230, 170, 0.9),
		0 0 32px rgba(255, 230, 170, 0.7);
}

.audiobook-player-subtitle {
	font-family: Georgia, 'Times New Roman', serif !important;
	font-size: clamp(18px, 2.2vw, 24px);
	color: rgba(247, 224, 185, 0.96) !important;
	margin: 0;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.audiobook-player-screen-wrap {
	position: relative;
	margin-top: 10px;
	padding: 22px 22px 26px;
	border-radius: 14px;
	background:
		linear-gradient(180deg, #4b3321 0%, #2b1b12 60%, #1a100a 100%);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

/* Bulb strips using supplied light-bar images */
.audiobook-bulbs {
	position: absolute;
	pointer-events: none;
	background-repeat: repeat;
	background-size: contain;
	z-index: 1;
}

.audiobook-bulbs-top,
.audiobook-bulbs-bottom {
	left: 0;
	right: 0;
	height: 30px;
	background-image: url('./theatre/light-bar-horizontal.png');
}

.audiobook-bulbs-top {
	top: 0;
}

.audiobook-bulbs-bottom {
	bottom: 0;
	transform: scaleY(-1);
}

.audiobook-bulbs-left,
.audiobook-bulbs-right {
	top: 0;
	bottom: 0;
	width: 24px;
	background-image: url('./theatre/light-bar-vertical.png');
}

.audiobook-bulbs-left {
	left: 0;
}

.audiobook-bulbs-right {
	right: 0;
	transform: scaleX(-1);
}

.audiobook-player-screen {
	border-radius: 12px;
	padding: 14px;
	background:
		linear-gradient(180deg, rgba(10, 10, 10, 0.35), rgba(0, 0, 0, 0.55));
	border: 1px solid rgba(210, 170, 95, 0.18);
}

.audiobook-player-embed {
	border-radius: 10px;
	overflow: hidden;
	background: #090606;
	aspect-ratio: 16 / 9;
}

.audiobook-player-embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.audiobook-player-now {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 4px 0;
	color: rgba(240, 226, 192, 0.9);
}

.audiobook-player-now-title {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(12px, 2.1vw, 24px);
	font-weight: 600;
}

.audiobook-player-now-meta {
	display: flex;
	gap: 10px;
	font-family: Georgia, serif;
	font-size: 14px;
	opacity: 0.9;
	white-space: nowrap;
}

/* Hide the time codes under the main title – only show name */
.audiobook-player-now-meta {
	display: none;
}

.audiobook-player-stats {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	padding: 10px;
	border-radius: 10px;
	/* Progress bar background with albums texture */
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.85)),
		url('./theatre/background-albums.jpg') center center / cover no-repeat;
	border: 1px solid rgba(210, 170, 95, 0.18);
}

.audiobook-stat {
	text-align: center;
	padding: 10px 8px;
	border-radius: 8px;
	background: rgba(25, 12, 8, 0.55);
	border: 1px solid rgba(210, 170, 95, 0.14);
}

.audiobook-stat-value {
	font-family: 'Cinzel', Georgia, serif;
	font-size: clamp(12px, 2.1vw, 20px);
	color: #e7c985;
	font-weight: 600;
}

.audiobook-stat-label {
	font-family: Georgia, serif;
	margin-top: 4px;
	font-size: clamp(12px, 2.1vw, 15px);
	letter-spacing: 0.12em;
	color: rgba(231, 201, 133, 0.78);
}

.audiobook-player-search {
	margin-top: 14px;
}

.audiobook-search-input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid rgba(210, 170, 95, 0.22);
	background: rgba(0, 0, 0, 0.35);
	color: rgba(240, 226, 192, 0.95);
	font-size: clamp(12px, 2.1vw, 14px);
	outline: none;
}

.audiobook-search-input::placeholder {
	color: rgba(240, 226, 192, 0.55);
}

.audiobook-player-list {
	margin-top: 12px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(210, 170, 95, 0.18);
}

.ab-row {
	display: grid;
	grid-template-columns: 90px 1fr 120px;
	gap: 12px;
	align-items: center;
	padding: 20px 24px;
	border-top: 1px solid rgba(210, 170, 95, 0.14);
	/* Golden frame around each album row */
	box-shadow:
		inset 0 0 0 1px rgba(210, 170, 95, 0.4),
		0 0 0 1px rgba(0, 0, 0, 0.6);
	border-radius: 10px;
	margin: 6px 8px;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.9)),
		url('./theatre/background-albums.jpg') center top / cover no-repeat;
}

.ab-row:first-child {
	border-top: none;
}

.ab-thumb {
	width: 90px;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(210, 170, 95, 0.18);
}

.ab-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ab-main {
	min-width: 0;
}

.ab-title {
	font-family: Georgia, serif;
	font-size: clamp(12px, 2.1vw, 20px);
	font-weight: 600;
	color: rgba(240, 226, 192, 0.95);
	line-height: 1.25;
	margin: 0 0 6px;
}

.ab-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	color: rgba(240, 226, 192, 0.72);
	font-size: 13px;
}

.ab-stars {
	letter-spacing: 0.18em;
	color: rgba(231, 201, 133, 0.8);
}

.ab-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.ab-duration {
	font-family: Georgia, serif;
	color: rgba(240, 226, 192, 0.75);
	font-size: 14px;
}

.ab-listened {
	font-family: Georgia, serif !important;
	display: flex;
	align-items: center;
	gap: 8px;
	color: rgba(240, 226, 192, 0.88);
	font-size: 18px;
}

.ab-listened span {
	font-family: Georgia, serif !important;
	font-size: clamp(12px, 2.1vw, 18px);
	font-weight: 600;
}

.ab-listened input {
	accent-color: #e7c985;
}

.ab-btn {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid rgba(210, 170, 95, 0.22);
	background: rgba(0, 0, 0, 0.35);
	color: rgba(240, 226, 192, 0.92);
	font-size: 13px;
	cursor: pointer;
	user-select: none;
}

.ab-btn[aria-pressed='true'] {
	background: rgba(231, 201, 133, 0.18);
	border-color: rgba(231, 201, 133, 0.5);
}

@media (max-width: 900px) {
	.audiobook-player-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ab-row {
		grid-template-columns: 90px 1fr;
	}
	.ab-actions {
		grid-column: 1 / -1;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

@media (max-width: 520px) {
	.page-audiobook-player.site-main {
		padding: 18px 10px 32px;
	}
	.audiobook-player-frame {
		padding: 14px;
	}
	.audiobook-player-frame::before {
		inset: 10px;
	}
	.ab-row {
		padding: 10px;
	}
}

.audiobooks-popcorn-wrap {
	display: flex;
	justify-content: center;
	margin-top: 25px;
}

.audiobooks-popcorn {
	width: 150px;
	height: auto;
	display: block;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
