
/* ETAMU Audio Player Theme */
:root {
  --audio-gold: #F2A900;
  --audio-blue: #0033A0;
  --audio-blue-dark: #002575;
  --audio-white: #FFFFFF;
  --audio-dark-text: #1f2937;
  --audio-shadow: rgba(0, 0, 0, 0.16);
}

/* Main card */
.audio-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 900px;
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 3px solid var(--audio-gold);
  border-radius: 18px;
  background: var(--audio-blue);
  color: var(--audio-white);
  box-shadow: 0 8px 24px var(--audio-shadow);

  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.audio-card *,
.audio-card *::before,
.audio-card *::after {
  box-sizing: border-box;
}

/* Top toolbar */
.audio-toolbar {
  width: 100%;
}

/* One-line subsection navigation row */
.chapter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: nowrap;
}

/* Text label beside dropdown */
.chapter-label {
  flex: 0 0 auto;
  color: var(--audio-white);
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Chapter/subsection selector */
.chapter-select {
  flex: 1 1 auto;
  min-width: 260px;
  height: 2.5rem;
  border: 2px solid var(--audio-gold);
  border-radius: 10px;
  background: var(--audio-white);
  color: var(--audio-dark-text);
  padding: 0 0.75rem;
  font-size: 1rem;
}

/* Previous/Next buttons */
.chapter-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.chapter-buttons button {
  height: 2.5rem;
  border: 2px solid var(--audio-gold);
  border-radius: 10px;
  background: var(--audio-gold);
  color: var(--audio-dark-text);
  padding: 0 0.9rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.chapter-buttons button:hover {
  filter: brightness(1.08);
}

.chapter-buttons button:active {
  transform: translateY(1px);
}

/* Native browser audio bar */
.audio-card audio,
.audio-el {
  width: 100%;
  display: block;
  border-radius: 999px;
}

/* Optional older field-based controls: retained for compatibility */
.audio-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--audio-white);
  font-size: 0.95rem;
  font-weight: 800;
}

.chapter-field {
  flex: 1 1 260px;
  min-width: 220px;
}

.small-field,
.speed-field {
  flex: 0 0 120px;
}

.volume-field {
  flex: 1 1 210px;
  min-width: 180px;
}

.audio-field select {
  width: 100%;
  height: 2.5rem;
  border: 2px solid var(--audio-gold);
  border-radius: 10px;
  background: var(--audio-white);
  color: var(--audio-dark-text);
  padding: 0 0.75rem;
  font-size: 1rem;
}

/* Volume slider */
.volume-slider {
  width: 100%;
  accent-color: var(--audio-gold);
}

/* Time display */
.time-display {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: var(--audio-blue-dark);
  color: var(--audio-white);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Focus states */
.chapter-select:focus,
.audio-field select:focus,
.chapter-buttons button:focus,
.volume-slider:focus {
  outline: 3px solid var(--audio-gold);
  outline-offset: 2px;
}

/* Medium screens: allow row wrapping before it gets cramped */
@media (max-width: 850px) {
  .chapter-row {
    flex-wrap: wrap;
  }

  .chapter-label {
    flex: 0 0 100%;
  }

  .chapter-select {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .chapter-buttons {
    width: 100%;
  }

  .chapter-buttons button {
    flex: 1;
  }
}

/* Mobile */
@media (max-width: 700px) {
  .audio-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .chapter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .chapter-label {
    flex: 0 0 auto;
  }

  .chapter-select {
    width: 100%;
    min-width: 100%;
  }

  .chapter-buttons {
    width: 100%;
  }

  .chapter-buttons button {
    flex: 1;
  }

  .time-display {
    margin-left: 0;
    text-align: center;
  }
}

