/* ═══════════════════════════════════════════════════════════════════════════
   Decibel Peak Shop — Persistent Audio Player Bar
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Body padding when player is open ──────────────────────────────────── */

body.dp-player-open { padding-bottom: 72px; }

/* ─── Bar ────────────────────────────────────────────────────────────────── */

.dp-player-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 300;
	height: 70px;
	background: rgba(10, 10, 10, 0.96);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-top: 1px solid rgba(255,255,255,0.08);
	transform: translateY(100%);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
}

.dp-player-bar.is-visible {
	transform: translateY(0);
}

.dp-player-bar__inner {
	max-width: 1400px;
	margin-inline: auto;
	padding-inline: var(--space-md, 1.5rem);
	height: 100%;
	display: grid;
	grid-template-columns: 52px 1fr auto 32px;
	align-items: center;
	gap: 1rem;
}

/* ─── Art slot ───────────────────────────────────────────────────────────── */

.dp-player-bar__art-slot {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 6px;
	overflow: hidden;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.08);
	flex-shrink: 0;
}

.dp-player-bar__art-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dp-player-bar__art-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,0.25);
}

/* ─── Track info ─────────────────────────────────────────────────────────── */

.dp-player-bar__info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.dp-player-bar__title {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--color-white);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dp-player-bar__sub {
	font-size: 0.68rem;
	color: rgba(255,255,255,0.38);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ─── Center: buttons + progress ────────────────────────────────────────── */

.dp-player-bar__center {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	min-width: 240px;
	max-width: 560px;
	width: 100%;
}

.dp-player-bar__btn-row {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

/* Play/Pause button */
.dp-player-bar__play-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--color-accent);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #080808;
	transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
	box-shadow: 0 0 12px rgba(22,243,253,0.3);
	flex-shrink: 0;
}

.dp-player-bar__play-btn:hover {
	background: #0dd0d8;
	box-shadow: 0 0 20px rgba(22,243,253,0.5);
	transform: scale(1.06);
}

/* Play/pause icon toggle */
.dp-player-bar__icon-pause { display: none; }
.dp-player-bar__play-btn.is-playing .dp-player-bar__icon-play  { display: none; }
.dp-player-bar__play-btn.is-playing .dp-player-bar__icon-pause { display: block; }

/* Prev / Next buttons */
.dp-player-bar__nav-btn {
	width: 28px;
	height: 28px;
	background: none;
	border: none;
	cursor: pointer;
	color: rgba(255,255,255,0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: color 0.15s;
	flex-shrink: 0;
}

.dp-player-bar__nav-btn:hover { color: var(--color-white); }

/* Progress row */
.dp-player-bar__progress-row {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.dp-player-bar__time {
	font-size: 0.62rem;
	color: rgba(255,255,255,0.3);
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
	min-width: 28px;
}

.dp-player-bar__time:last-child { text-align: right; }

.dp-player-bar__progress {
	flex: 1;
	height: 4px;
	background: rgba(255,255,255,0.1);
	border-radius: 2px;
	cursor: pointer;
	position: relative;
	outline: none;
}

.dp-player-bar__progress:focus-visible {
	box-shadow: 0 0 0 3px rgba(22,243,253,0.3);
}

.dp-player-bar__progress-fill {
	height: 100%;
	width: 0%;
	background: var(--color-accent);
	border-radius: 2px;
	transition: width 0.1s linear;
	pointer-events: none;
}

/* Progress hover glow */
.dp-player-bar__progress:hover .dp-player-bar__progress-fill {
	box-shadow: 0 0 6px rgba(22,243,253,0.6);
}

/* ─── Close button ───────────────────────────────────────────────────────── */

.dp-player-bar__close {
	width: 28px;
	height: 28px;
	background: none;
	border: none;
	cursor: pointer;
	color: rgba(255,255,255,0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: color 0.15s, background 0.15s;
	flex-shrink: 0;
}

.dp-player-bar__close:hover {
	color: var(--color-white);
	background: rgba(255,255,255,0.07);
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 680px) {
	.dp-player-bar__inner {
		grid-template-columns: 42px 1fr auto 28px;
		gap: 0.75rem;
	}

	.dp-player-bar__center {
		min-width: 0;
	}

	.dp-player-bar__sub         { display: none; }
	.dp-player-bar__progress-row { display: none; }

	.dp-player-bar__btn-row {
		gap: 0.25rem;
	}
}

@media (max-width: 420px) {
	.dp-player-bar__info { display: none; }
	.dp-player-bar__inner {
		grid-template-columns: 42px auto 28px;
		justify-content: space-between;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dp-player-bar,
	.dp-player-bar__play-btn { transition: none; }
}
