/*
 * Audio player (PLAN §11.3, DESIGN §10.21). Fixed bottom, outside .jk-root, z 45.
 */

.player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 45;
	padding: 0 clamp(8px, 2vw, 24px) 12px;
	pointer-events: none;
	color: var(--parchment);
	font-family: var(--font-body);
}
.player > * { pointer-events: auto; }
.player__mini,
.player__full {
	margin-inline: auto;
	border: 1px solid color-mix(in srgb, var(--gold-line) 35%, transparent);
	background: var(--ink-card);
}
.player[data-view="mini"] .player__full,
.player[data-view="full"] .player__mini { display: none; }

/* Shared buttons */
.player__btn {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--parchment);
	transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.player__btn:hover { background: rgba(245, 239, 227, .1); }
.player__btn .icon { width: 18px; height: 18px; }
.player__btn--text { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.player__close { color: var(--on-ink-muted); }
.player__play { background: var(--copper-2); color: var(--navy); }
.player__play:hover { background: var(--copper-2-hover); color: var(--navy); }
.player__play--lg { width: 52px; height: 52px; }
.player .player__i-pause { display: none; }
.player[data-playing="true"] .player__i-play { display: none; }
.player[data-playing="true"] .player__i-pause { display: block; }

/* ---------- A. Mini ---------- */
.player__mini {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 640px;
	padding: 10px 8px 13px 12px;
	overflow: hidden;
	border-radius: 18px;
	box-shadow: 0 14px 36px var(--sh-2);
}
.player__eq {
	display: grid;
	place-items: center;
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: rgba(245, 239, 227, .08);
	color: var(--copper-2);
}
.player__eq.eq { display: inline-flex; justify-content: center; align-items: center; padding-block: 12px; height: 42px; }
.player__info { flex: 1; min-width: 0; }
.player__status {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--gold-line);
}
.player__title {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-family: var(--font-display);
	font-variation-settings: "SOFT" 50;
	font-size: 16px;
	line-height: 1.3;
}
.player__meta,
.player__sub {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12px;
	color: var(--on-ink-muted);
}
.player__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: rgba(245, 239, 227, .12);
}
.player__bar span { display: block; width: 0; height: 100%; background: var(--copper-2); }

/* ---------- B. Full ---------- */
.player__full {
	max-width: 1100px;
	overflow: hidden;
	border-radius: 20px;
	box-shadow: 0 18px 44px var(--sh-2);
}
.player__list {
	display: flex;
	gap: 22px;
	max-height: 340px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 22px 22px 8px;
	border-bottom: 1px solid color-mix(in srgb, var(--gold-line) 25%, transparent);
}
.player__list[hidden] { display: none; }
.player__list-cover { flex: none; width: 110px; }
.player__arch { width: 110px; height: 150px; aspect-ratio: auto; }
.player__arch img { width: 100%; height: 100%; object-fit: cover; }
.player__chapters { flex: 1; display: grid; align-content: start; gap: 2px; min-width: 0; }
.player__ch {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 48px;
	padding: 0 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--parchment);
	text-align: left;
}
.player__ch:hover { background: rgba(245, 239, 227, .06); }
.player__ch.is-active { background: rgba(216, 138, 78, .18); }
.player__ch-n { width: 22px; font-family: var(--font-arabic); font-size: 18px; color: var(--gold-line); }
.player__ch-t { flex: 1; font-size: 15px; font-weight: 500; }
.player__ch-d { font-size: 13px; color: var(--on-ink-muted); }

.player__strip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	padding: 12px 16px;
}
.player__cover {
	flex: none;
	padding: 0;
	border: 0;
	background: transparent;
}
.player__arch--sm { display: block; width: 44px; height: 58px; }
.player__text { flex: 1 1 160px; min-width: 0; }
.player__sleep { font-size: 12px; font-weight: 700; color: var(--copper-2); }
.player__seek {
	flex: 2 1 240px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--on-ink-muted);
}
.player__seek input { flex: 1; min-width: 80px; accent-color: var(--copper-2); }
.player__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.player__speed {
	width: auto;
	min-width: 50px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid rgba(245, 239, 227, .4);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}
.player__sleep-btn.is-on { color: var(--copper-2); }
.player__error {
	flex-basis: 100%;
	font-size: 13px;
	font-weight: 600;
	color: var(--copper-2);
}

/* Phones: controls drop to their own row. */
@media (max-width: 759.98px) {
	.player__controls { flex-basis: 100%; justify-content: space-between; }
	.player__list { flex-direction: column; }
	.player__list-cover { display: none; }
}

/* Keep the end of the page reachable above the fixed player. */
body.player-open .jk-root { padding-bottom: 96px; }
