/* =========================================================
   SBNC Audio Reader & Table of Contents Styles
   ========================================================= */

/* ── Audio Reader Bar ── */
.sbnc-audio-reader {
	display: flex;
	align-items: center;
	background: linear-gradient(135deg, #fff8f8 0%, #fff 100%);
	border: 1px solid #fbe7ea;
	border-radius: 14px;
	padding: 14px 20px;
	margin: 0 0 28px;
	gap: 14px;
	box-shadow: 0 2px 16px rgba(255, 86, 106, 0.08);
	position: relative;
	overflow: visible; /* Changed from hidden to display dropdown above bar */
}

.sbnc-audio-reader::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, #FF566A, #ff8fa0);
	border-radius: 4px 0 0 4px;
}

.sbnc-audio-inner {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 14px;
	flex-wrap: wrap;
}

/* Play/Pause button */
.sbnc-audio-play-btn {
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #FF566A;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 14px rgba(255, 86, 106, 0.35);
}

.sbnc-audio-play-btn:hover {
	transform: scale(1.08);
	background: #e5384d;
	box-shadow: 0 6px 20px rgba(255, 86, 106, 0.45);
}

.sbnc-audio-play-btn svg {
	width: 18px;
	height: 18px;
}

/* Info block */
.sbnc-audio-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 100px;
}

.sbnc-audio-label {
	font-size: 13px;
	font-weight: 600;
	color: #121416;
	white-space: nowrap;
}

.sbnc-audio-lang-badge {
	display: inline-block;
	background: #fef2f4;
	color: #FF566A;
	border: 1px solid #fbe7ea;
	border-radius: 20px;
	padding: 2px 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

/* Progress bar */
.sbnc-audio-progress-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 120px;
}

.sbnc-audio-progress-bar {
	flex: 1;
	height: 5px;
	background: #f3e5e8;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
}

.sbnc-audio-progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #FF566A, #ff8fa0);
	border-radius: 10px;
	transition: width 0.3s linear;
}

.sbnc-audio-timer {
	font-size: 12px;
	color: #888;
	font-weight: 500;
	white-space: nowrap;
	min-width: 32px;
}

/* Controls */
.sbnc-audio-controls {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
}

.sbnc-audio-speed-btn,
.sbnc-audio-stop-btn {
	border: 1px solid #fbe7ea;
	background: #fff;
	color: #FF566A;
	border-radius: 8px;
	padding: 5px 10px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.sbnc-audio-speed-btn:hover,
.sbnc-audio-stop-btn:hover {
	background: #FF566A;
	color: #fff;
	border-color: #FF566A;
}

/* Playing state */
.sbnc-audio-reader.is-playing .sbnc-audio-play-btn {
	animation: sbncPulse 1.5s ease-in-out infinite;
}

@keyframes sbncPulse {
	0%, 100% { box-shadow: 0 4px 14px rgba(255, 86, 106, 0.35); }
	50%       { box-shadow: 0 4px 24px rgba(255, 86, 106, 0.6); }
}

/* Dark mode */
.options_dark_skin .sbnc-audio-reader {
	background: #1a1b1f;
	border-color: #2b2c30;
}
.options_dark_skin .sbnc-audio-label  { color: #e0e0e0; }
.options_dark_skin .sbnc-audio-timer  { color: #888; }
.options_dark_skin .sbnc-audio-speed-btn,
.options_dark_skin .sbnc-audio-stop-btn {
	background: #232428;
	border-color: #3a3b40;
	color: #FF566A;
}

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
	.sbnc-audio-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
	.sbnc-audio-progress-wrap { width: 100%; }
}

/* ── Speed Dropdown Styles ── */
.sbnc-audio-speed-wrap {
	position: relative !important;
}

.sbnc-speed-dropdown {
	position: absolute !important;
	bottom: calc(100% + 12px) !important; /* Float above the player bar */
	right: 0 !important;
	background: #ffffff !important;
	border: 1px solid rgba(255, 86, 106, 0.15) !important;
	border-radius: 10px !important;
	padding: 6px 0 !important;
	min-width: 100px !important;
	box-shadow: 0 4px 16px rgba(255, 86, 106, 0.15) !important;
	z-index: 9999 !important; /* Show above content */
}

/* Dropdown arrow pointing down to speed button */
.sbnc-speed-dropdown::after {
	content: '' !important;
	position: absolute !important;
	top: 100% !important;
	right: 12px !important;
	border-width: 6px !important;
	border-style: solid !important;
	border-color: #ffffff transparent transparent transparent !important;
}

.sbnc-speed-dropdown::before {
	content: '' !important;
	position: absolute !important;
	top: 100% !important;
	right: 11px !important;
	border-width: 7px !important;
	border-style: solid !important;
	border-color: rgba(255, 86, 106, 0.15) transparent transparent transparent !important;
	z-index: -1 !important;
}

.sbnc-speed-option {
	padding: 8px 16px !important;
	font-family: 'Outfit', 'Montserrat', sans-serif !important;
	font-size: 12px !important;
	color: #4a5568 !important;
	cursor: pointer !important;
	text-align: center !important;
	transition: background 0.2s, color 0.2s !important;
}

.sbnc-speed-option:hover {
	background: #FFF5F6 !important;
	color: #FF566A !important;
}

.sbnc-speed-option.active {
	background: #FF566A !important;
	color: #ffffff !important;
	font-weight: 700 !important;
}

/* Dark Mode Speed Dropdown Overrides */
.options_dark_skin .sbnc-speed-dropdown {
	background: #1a1b1f !important;
	border-color: #2b2c30 !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

.options_dark_skin .sbnc-speed-dropdown::after {
	border-color: #1a1b1f transparent transparent transparent !important;
}

.options_dark_skin .sbnc-speed-dropdown::before {
	border-color: #2b2c30 transparent transparent transparent !important;
}

.options_dark_skin .sbnc-speed-option {
	color: #cbd5e0 !important;
}

.options_dark_skin .sbnc-speed-option:hover {
	background: #2b1c1f !important;
	color: #FF566A !important;
}

.options_dark_skin .sbnc-speed-option.active {
	background: #FF566A !important;
	color: #ffffff !important;
}
