/* ==========================================================================
   Audio Player (.sentio-audio)
   ==========================================================================
   Extracted from frontend.css during the Batch 8 mechanical extraction
   (2026-04-18). Behavior-preserving.
   Waveform · podcast episodes · speed control · skip · sleep timer ·
   sticky mini-player. `.sentio-audio` class prefix was also used by
   archive-posts (Batch 8 #2 — already extracted) — distinct blocks.
   ========================================================================== */

/* ── Base ── */
.sentio-audio {
	position: relative;
	font-family: inherit;
}

.sentio-audio__audio {
	display: none;
}

/* ── Player Layout ── */
.sentio-audio__player {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 20px;
	align-items: start;
	background: #fff;
	border-radius: 12px;
	padding: 24px;
}

/* ── Artwork (Diff #8) ── */
.sentio-audio__artwork {
	width: 100px;
	height: 100px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #e5e7eb;
}

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

/* ── Body ── */
.sentio-audio__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

/* ── Meta ── */
.sentio-audio__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sentio-audio__title {
	font-size: 16px;
	font-weight: 600;
	color: #111827;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sentio-audio__subtitle {
	font-size: 13px;
	color: #6b7280;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Progress Bar (default) ── */
.sentio-audio__progress {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sentio-audio__bar {
	position: relative;
	width: 100%;
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
	cursor: pointer;
	overflow: hidden;
}

.sentio-audio__bar-buffered {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: #d1d5db;
	border-radius: 2px;
	width: 0;
	transition: width 0.3s ease;
}

.sentio-audio__bar-played {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: #6366f1;
	border-radius: 2px;
	width: 0;
	transition: width 0.15s linear;
	z-index: 1;
}

/* ── Waveform (Diff #1) ── */
.sentio-audio__wave {
	display: flex;
	align-items: center;
	gap: 2px;
	height: 40px;
	cursor: pointer;
}

.sentio-audio__wave-bar {
	flex: 1;
	min-width: 2px;
	background-color: #e5e7eb;
	border-radius: 1px;
	transition: background-color 0.1s ease;
}

.sentio-audio__wave-bar--played {
	background-color: #6366f1;
}

/* Waveform editor preview placeholder */
.sentio-audio__wave--preview {
	height: 40px;
	background: linear-gradient(90deg, #6366f1 35%, #e5e7eb 35%);
	border-radius: 4px;
	opacity: 0.4;
}

/* ── Times ── */
.sentio-audio__times {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #9ca3af;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

/* ── Controls ── */
.sentio-audio__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.sentio-audio__controls-main {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sentio-audio__controls-extra {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* ── Button reset ── */
.sentio-audio__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 6px;
	cursor: pointer;
	color: #374151;
	border-radius: 6px;
	transition: color 0.2s ease, background-color 0.2s ease;
	position: relative;
	line-height: 1;
}

.sentio-audio__btn:hover {
	color: #6366f1;
}

.sentio-audio__svg {
	width: 20px;
	height: 20px;
	display: block;
	flex-shrink: 0;
}

/* ── Play Button ── */
.sentio-audio__btn-play {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: #6366f1;
	color: #fff;
	padding: 0;
}

.sentio-audio__btn-play:hover {
	color: #fff;
	opacity: 0.9;
}

.sentio-audio__btn-play .sentio-audio__svg {
	width: 22px;
	height: 22px;
}

/* Play / Pause icon toggling */
.sentio-audio__icon-pause { display: none; }
.sentio-audio--playing .sentio-audio__icon-play  { display: none; }
.sentio-audio--playing .sentio-audio__icon-pause { display: block; }

/* ── Skip Buttons (Diff #4) ── */
.sentio-audio__btn-skip {
	gap: 2px;
	font-size: 11px;
	font-weight: 600;
}

.sentio-audio__btn-skip .sentio-audio__svg {
	width: 16px;
	height: 16px;
}

.sentio-audio__skip-val {
	line-height: 1;
}

/* ── Speed Button (Diff #3) ── */
.sentio-audio__btn-speed {
	font-size: 12px;
	font-weight: 700;
	min-width: 32px;
	padding: 4px 8px;
	background: #f3f4f6;
	border-radius: 6px;
	font-variant-numeric: tabular-nums;
}

.sentio-audio__btn-speed:hover {
	background: #e5e7eb;
}

/* ── Volume ── */
.sentio-audio__vol-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
}

.sentio-audio__icon-mute { display: none; }
.sentio-audio--muted .sentio-audio__icon-volume { display: none; }
.sentio-audio--muted .sentio-audio__icon-mute   { display: block; }

.sentio-audio__vol-range {
	width: 70px;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: #e5e7eb;
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

.sentio-audio__vol-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #6366f1;
	cursor: pointer;
}

.sentio-audio__vol-range::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #6366f1;
	border: none;
	cursor: pointer;
}

/* ── Sleep Timer (Diff #5) ── */
.sentio-audio__sleep-label {
	font-size: 9px;
	font-weight: 700;
	position: absolute;
	bottom: -2px;
	right: -2px;
	background: #6366f1;
	color: #fff;
	border-radius: 4px;
	padding: 1px 3px;
	line-height: 1;
}

.sentio-audio__sleep-label:empty {
	display: none;
}

/* ── Share feedback (Diff #6) ── */
.sentio-audio__btn-share.sentio-audio__btn--copied::after {
	content: 'Copied!';
	position: absolute;
	bottom: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	font-weight: 600;
	color: #fff;
	background: #1f2937;
	padding: 3px 8px;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
	animation: sentio-audio-fade 1.5s ease forwards;
}

@keyframes sentio-audio-fade {
	0%, 70% { opacity: 1; }
	100%    { opacity: 0; }
}

/* ══════════════════════════════════════════
 * EPISODE LIST (Diff #2)
 * ══════════════════════════════════════════ */
.sentio-audio__episodes {
	margin-top: 4px;
}

.sentio-audio__ep {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid #f3f4f6;
	cursor: pointer;
	transition: background-color 0.15s ease;
	border-radius: 6px;
}

.sentio-audio__ep:last-child {
	border-bottom: none;
}

.sentio-audio__ep:hover {
	background-color: #f9fafb;
}

.sentio-audio__ep--active {
	background-color: #f9fafb;
}

.sentio-audio__ep-num {
	font-size: 14px;
	font-weight: 700;
	color: #9ca3af;
	min-width: 24px;
	text-align: center;
}

.sentio-audio__ep--active .sentio-audio__ep-num {
	color: #6366f1;
}

.sentio-audio__ep-art {
	width: 44px;
	height: 44px;
	border-radius: 6px;
	overflow: hidden;
	flex-shrink: 0;
}

.sentio-audio__ep-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sentio-audio__ep-info {
	flex: 1;
	min-width: 0;
}

.sentio-audio__ep-title {
	font-size: 14px;
	font-weight: 500;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sentio-audio__ep--active .sentio-audio__ep-title {
	color: #6366f1;
}

.sentio-audio__ep-desc {
	font-size: 12px;
	color: #6b7280;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sentio-audio__ep-dur {
	font-size: 12px;
	color: #9ca3af;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ══════════════════════════════════════════
 * STICKY MINI PLAYER (Diff #7)
 * ══════════════════════════════════════════ */
.sentio-audio__sticky {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 20px;
	background: #fff;
	box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.sentio-audio__sticky--hidden {
	transform: translateY(100%);
	opacity: 0;
	pointer-events: none;
}

.sentio-audio__sticky--dismissed {
	display: none;
}

.sentio-audio__sticky-art {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.sentio-audio__sticky-info {
	flex: 1;
	min-width: 0;
}

.sentio-audio__sticky-title {
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 4px;
}

.sentio-audio__sticky-bar {
	height: 3px;
	background: #e5e7eb;
	border-radius: 2px;
	overflow: hidden;
}

.sentio-audio__sticky-fill {
	height: 100%;
	width: 0;
	background: #6366f1;
	border-radius: 2px;
	transition: width 0.15s linear;
}

.sentio-audio__sticky-play {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #6366f1;
	color: #fff;
	padding: 0;
}

.sentio-audio__sticky-play:hover {
	color: #fff;
	opacity: 0.9;
}

.sentio-audio__sticky-play .sentio-audio__svg {
	width: 16px;
	height: 16px;
}

.sentio-audio__sticky-close {
	color: #9ca3af;
}

.sentio-audio__sticky-close .sentio-audio__svg {
	width: 16px;
	height: 16px;
}

/* ── Mobile Responsive ── */
@media (max-width: 767px) {
	.sentio-audio__player {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.sentio-audio__artwork {
		justify-self: center;
	}

	.sentio-audio__controls {
		justify-content: center;
	}

	.sentio-audio__vol-wrap {
		display: none;
	}
}

