/* =========================================================
   audio-player.css - Custom "Amazing" Audio Player
   Ab is mein 2 tarah ki customization hai (Admin Settings se
   control hoti hai):
   1) COLOR PRESET (.player-emerald, .player-ocean, wagera)
   2) LAYOUT STYLE (.player-style-card, .player-style-minimal)
   ========================================================= */

.audio-player {
  /* 🟢 --ap-primary aur --ap-accent -> player ke apne khaas rang.
     Default mein theme ke emerald/gold rang istemal hote hain,
     lekin neeche diye gaye ".player-*" classes inhe overwrite
     kar dete hain (Admin Settings se chuna gaya rang). */
  --ap-primary: var(--emerald-deep);
  --ap-accent: var(--gold);

  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin: 16px 0;
}

/* ---------- LAYOUT STYLE 1: "Card" (default - box, shadow, border) ---------- */
.audio-player.player-style-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ---------- LAYOUT STYLE 2: "Minimal" (flat, bina box ke) ---------- */
.audio-player.player-style-minimal {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  padding: 10px 0;
  box-shadow: none;
}

.ap-playpause {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--ap-primary);
  color: var(--on-accent);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ap-playpause:hover { background: var(--ap-accent); color: var(--on-accent-2); transform: scale(1.06); }

.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(201,162,39,0.35); }
  50% { box-shadow: 0 0 0 8px rgba(201,162,39,0); }
}

.ap-middle {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

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

/* 🟢 Range slider (seek bar aur volume) - dono ke liye common style */
.audio-player input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 4px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.ap-seek { flex: 1; }
.ap-volume-row { display: flex; align-items: center; gap: 6px; }
.ap-volume { width: 70px; }

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

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

.ap-boost-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted, #5b6b64);
  flex-shrink: 0;
}

.ap-boost-row input { cursor: pointer; }

/* =========================================================
   COLOR PRESETS - Admin Settings > Player Settings se chunay jate hain
   ========================================================= */

.audio-player.player-emerald {  /* 🟢 Default - Islamic emerald/gold */
  --ap-primary: #0B4F3F;
  --ap-accent: #C9A227;
}

.audio-player.player-ocean {    /* 🟢 Ocean Blue */
  --ap-primary: #075985;
  --ap-accent: #38bdf8;
}

.audio-player.player-sunset {   /* 🟢 Sunset Gold/Orange */
  --ap-primary: #9a3412;
  --ap-accent: #fb923c;
}

.audio-player.player-midnight { /* 🟢 Midnight Purple */
  --ap-primary: #3b0764;
  --ap-accent: #a78bfa;
}

.audio-player.player-rose {     /* 🟢 Rose/Pink */
  --ap-primary: #9d174d;
  --ap-accent: #f472b6;
}

.audio-player.player-mono {     /* 🟢 Classic Black & White */
  --ap-primary: #1f2937;
  --ap-accent: #9ca3af;
}

@media (max-width: 480px) {
  .audio-player { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .ap-middle { width: 100%; order: 3; }
  .ap-boost-row { order: 2; }
}
