/* =========================================================
   audio-player-v6.css - Well-Organized Audio Player
   3 saaf rows mein banaya gaya hai:
   Row 1: Track Info (kya chal raha hai - icon, title, meta)
   Row 2: Controls (play button + seek bar + time + volume)
   Row 3: Extra Options (Loud & Clear boost toggle)
   ========================================================= */

.audio-player {
  --ap-primary: #0B4F3F;
  --ap-primary-dark: #072E25;
  --ap-accent: #C9A227;
  --ap-text: #FFFFFF;
  --ap-text-muted: rgba(255,255,255,0.7);

  display: flex !important;
  flex-direction: column !important;   /* 🟢 ab 3 ROWS upar-neeche stack hote hain */
  gap: 12px !important;
  max-width: 640px !important;
  margin: 16px 0 !important;
  color: var(--ap-text) !important;
}

/* ---------- LAYOUT STYLE 1: "Card" (poora box color se bhara) ---------- */
.audio-player.player-style-card {
  background: linear-gradient(135deg, var(--ap-primary), var(--ap-primary-dark)) !important;
  border: none !important;
  border-radius: 16px !important;
  padding: 18px 20px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
}

/* ---------- LAYOUT STYLE 2: "Minimal" (flat, underline colored) ---------- */
.audio-player.player-style-minimal {
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid var(--ap-primary) !important;
  border-radius: 0 !important;
  padding: 10px 4px !important;
  box-shadow: none !important;
  color: var(--text) !important;
  --ap-text-muted: var(--text-muted, #5b6b64);
}

/* =========================================================
   ROW 1: Track Info (icon + title + meta - reciter/surah/category)
   ========================================================= */
.ap-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.player-style-minimal .ap-track-info { border-bottom-color: var(--border); }

.ap-track-icon {
  font-family: 'Amiri', 'Noto Naskh Arabic', 'Arial Unicode MS', serif;
  font-size: 1.5rem;
  line-height: 1;               /* 🟢 fix: dono characters ko same baseline par rakhta hai */
  color: var(--ap-accent);
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}

/* 🟢 Har character ko alag se "vertical-align:middle" dena -
   isse dono brackets hamesha ek hi seedhi line mein rehte hain,
   chahe font unhe thora upar/neeche render kare */
.ap-icon-glyph {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.player-style-minimal .ap-track-icon { background: transparent; }

.ap-track-text { min-width: 0; flex: 1; }

.ap-track-title {
  font-family: var(--font-display, serif);
  font-weight: 600;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-track-meta {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* =========================================================
   ROW 2: Controls (play + seek + time + volume)
   ========================================================= */
.ap-controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ap-playpause  { order: 1; }
.ap-middle     { order: 2; flex: 1 !important; min-width: 0; }   /* 🟢 CONTROL LINE - lambi, poori width */

.ap-playpause {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  background: var(--ap-accent) !important;
  color: var(--ap-primary-dark) !important;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.player-style-minimal .ap-playpause {
  background: var(--ap-primary) !important;
  color: #fff !important;
  border: none;
}

.ap-playpause:hover { transform: scale(1.08); filter: brightness(1.1); }

.audio-player.ap-playing .ap-playpause { animation: ap-pulse 1.6s ease-in-out infinite; }

@keyframes ap-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
  50% { box-shadow: 0 0 0 9px rgba(255,255,255,0); }
}

.ap-progress-row { display: flex; align-items: center; gap: 8px; }

.ap-time {
  font-size: 0.78rem;
  color: var(--ap-text-muted);
  min-width: 34px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.audio-player input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.3);
  outline: none;
  cursor: pointer;
}

.player-style-minimal input[type="range"] { background: var(--border); }

.ap-seek { flex: 1; }
.ap-volume-row { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.ap-volume { width: 50px; }

.audio-player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ap-accent) !important;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.audio-player input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ap-accent) !important;
  cursor: pointer;
  border: 2px solid #fff;
}

/* =========================================================
   ROW 3: Boost toggle (LEFT) + Volume (RIGHT) - SAME LINE
   ========================================================= */
.ap-boost-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 🟢 boost text LEFT, volume RIGHT - same line par */
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ap-text-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.player-style-minimal .ap-boost-row { border-top-color: var(--border); }

.ap-boost-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ap-boost-row input { cursor: pointer; }

/* =========================================================
   BREADCRUMB (recitation-detail.php ke upar)
   ========================================================= */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted, #5b6b64);
  margin: 10px 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: var(--emerald-deep, var(--accent));
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb-sep { opacity: 0.5; }

.breadcrumb-current {
  color: var(--text-muted, #5b6b64);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

/* =========================================================
   COLOR PRESETS (12 total)
   ========================================================= */

.audio-player.player-emerald  { --ap-primary:#0B4F3F; --ap-primary-dark:#072E25; --ap-accent:#C9A227; }
.audio-player.player-ocean    { --ap-primary:#0284c7; --ap-primary-dark:#075985; --ap-accent:#7dd3fc; }
.audio-player.player-sunset   { --ap-primary:#ea580c; --ap-primary-dark:#7c2d12; --ap-accent:#fed7aa; }
.audio-player.player-midnight { --ap-primary:#4c1d95; --ap-primary-dark:#0f0616; --ap-accent:#c4b5fd; }
.audio-player.player-rose     { --ap-primary:#db2777; --ap-primary-dark:#831843; --ap-accent:#fbcfe8; }
.audio-player.player-mono     { --ap-primary:#3f3f46; --ap-primary-dark:#18181b; --ap-accent:#d4d4d8; }
.audio-player.player-black    { --ap-primary:#000000; --ap-primary-dark:#000000; --ap-accent:#FFD700; }
.audio-player.player-forest   { --ap-primary:#166534; --ap-primary-dark:#052e16; --ap-accent:#86efac; }
.audio-player.player-ruby     { --ap-primary:#9f1239; --ap-primary-dark:#4c0519; --ap-accent:#fecdd3; }
.audio-player.player-royal    { --ap-primary:#1e3a8a; --ap-primary-dark:#0c1a3d; --ap-accent:#fbbf24; }
.audio-player.player-ice      { --ap-primary:#0e7490; --ap-primary-dark:#083344; --ap-accent:#a5f3fc; }
.audio-player.player-sepia    { --ap-primary:#78350f; --ap-primary-dark:#451a03; --ap-accent:#fde68a; }

@media (max-width: 480px) {
  .ap-track-title { max-width: 200px; }
  .ap-controls-row { flex-wrap: wrap; }
  .ap-middle { width: 100%; }
}
