/* ============================================================
   Shiv Parvati Wedding Theme — Sacred Audio Controls
   ------------------------------------------------------------
   Floating glassmorphic gold & parchment audio controller.
   Matches the Himalayan temple aesthetic: warm ivory, deep navy,
   antique gold accents, and animated sacred soundwaves.
   ============================================================ */

.sp-audio-control {
  position: fixed;
  top: clamp(14px, 2.4vw, 26px);
  right: clamp(14px, 2.4vw, 26px);
  z-index: 9999;
  pointer-events: auto;
}

.sp-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 14px;
  border-radius: 999px;
  background: rgba(252, 243, 220, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(189, 151, 54, 0.45);
  box-shadow:
    0 4px 20px rgba(23, 57, 92, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  color: var(--ink-navy, #17395c);
  font-family: 'Cinzel', 'Source Serif 4', Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.28s cubic-bezier(0.22, 0.61, 0.24, 1),
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    color 0.25s ease;
}

.sp-audio-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(189, 151, 54, 0.85);
  background: rgba(255, 248, 230, 0.97);
  box-shadow:
    0 8px 26px rgba(189, 151, 54, 0.28),
    0 2px 6px rgba(23, 57, 92, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.sp-audio-btn:active {
  transform: translateY(0) scale(0.97);
}

.sp-audio-btn:focus-visible {
  outline: 2px solid var(--gold, #bd9736);
  outline-offset: 3px;
}

/* Icon cluster (Bell + Soundwaves) */
.sp-audio-btn__icon {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold, #bd9736);
  transition: color 0.3s ease;
}

.sp-audio-bell {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
  transform-origin: 50% 0%;
  transition: transform 0.3s ease;
}

/* Soundwave bars container */
.sp-audio-waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  width: 14px;
}

.sp-audio-bar {
  display: block;
  width: 2px;
  height: 3px;
  border-radius: 1px;
  background: var(--gold, #bd9736);
  transition: height 0.3s ease, background 0.3s ease;
}

/* Status Text */
.sp-audio-btn__text {
  position: relative;
  top: 0.5px;
  line-height: 1;
}

/* Indicator jewel dot */
.sp-audio-btn__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a89f8c;
  opacity: 0.55;
  transition: all 0.35s ease;
}

/* ============================================================
   PLAYING STATE
   ============================================================ */
.sp-audio-btn.is-playing {
  border-color: rgba(189, 151, 54, 0.8);
  background: rgba(255, 248, 230, 0.98);
  box-shadow:
    0 6px 24px rgba(189, 151, 54, 0.25),
    0 1px 4px rgba(23, 57, 92, 0.06),
    inset 0 0 0 1px rgba(255, 245, 221, 0.9);
}

.sp-audio-btn.is-playing .sp-audio-bell {
  animation: spBellSway 2.8s ease-in-out infinite alternate;
}

.sp-audio-btn.is-playing .sp-audio-btn__dot {
  background: #2a834c; /* Auspicious emerald green dot */
  opacity: 1;
  box-shadow: 0 0 8px rgba(42, 131, 76, 0.6);
  animation: spDotPulse 2s ease-in-out infinite;
}

/* Animated Equalizer Waves */
.sp-audio-btn.is-playing .sp-audio-bar--1 {
  animation: spWave 1.1s ease-in-out infinite alternate;
}
.sp-audio-btn.is-playing .sp-audio-bar--2 {
  animation: spWave 0.85s ease-in-out 0.2s infinite alternate;
}
.sp-audio-btn.is-playing .sp-audio-bar--3 {
  animation: spWave 1.25s ease-in-out 0.4s infinite alternate;
}
.sp-audio-btn.is-playing .sp-audio-bar--4 {
  animation: spWave 0.95s ease-in-out 0.15s infinite alternate;
}

@keyframes spBellSway {
  0% { transform: rotate(-7deg); }
  100% { transform: rotate(7deg); }
}

@keyframes spWave {
  0% { height: 3px; }
  50% { height: 13px; }
  100% { height: 6px; }
}

@keyframes spDotPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(42, 131, 76, 0.6);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(42, 131, 76, 0);
  }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .sp-audio-control {
    top: 14px;
    right: 14px;
  }
  .sp-audio-btn {
    padding: 7px 14px 7px 11px;
    font-size: 10px;
    gap: 8px;
  }
  .sp-audio-waves {
    display: none; /* Keep bell and text compact on small screens */
  }
}
