/* ===== AUDIO SUMMARY PLAYER ===== */
/* Scoped to .audio-summary — no global side-effects */

.md-typeset .audio-summary {
  background: linear-gradient(135deg, #0d2240 0%, #0B1E3C 100%);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  border-left: 3px solid #00BFFF;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.md-typeset .audio-summary audio { display: none; }

/* Header label */
.md-typeset .audio-summary__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.md-typeset .audio-summary__header svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* ---- Controls row ---- */
.md-typeset .audio-summary__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Shared button base */
.md-typeset .audio-summary__btn {
  border-radius: 50%;
  border: 1.5px solid;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
              opacity 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.md-typeset .audio-summary__btn:focus-visible {
  outline: 2px solid #00BFFF;
  outline-offset: 2px;
}

/* Play / Pause */
.md-typeset .audio-summary__btn--play {
  width: 40px;
  height: 40px;
  border-color: #00BFFF;
  color: #00BFFF;
}

.md-typeset .audio-summary__btn--play:hover {
  background: rgba(0, 191, 255, 0.12);
  transform: scale(1.05);
}

.md-typeset .audio-summary__btn--play svg {
  width: 16px;
  height: 16px;
}

/* Play icon needs a tiny nudge right for optical centering */
.md-typeset .audio-summary__btn--play .icon-play { margin-left: 2px; }

/* Stop */
.md-typeset .audio-summary__btn--stop {
  width: 30px;
  height: 30px;
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  pointer-events: none;
}

.md-typeset .audio-summary__btn--stop.visible {
  opacity: 1;
  pointer-events: auto;
}

.md-typeset .audio-summary__btn--stop:hover {
  border-color: rgba(0, 191, 255, 0.5);
  color: rgba(0, 191, 255, 0.8);
  background: rgba(0, 191, 255, 0.08);
}

.md-typeset .audio-summary__btn--stop svg {
  width: 12px;
  height: 12px;
}

/* ---- Progress area ---- */
.md-typeset .audio-summary__progress-wrap {
  flex: 1;
  min-width: 0;
}

.md-typeset .audio-summary__progress {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
}

/* Larger invisible hit-area */
.md-typeset .audio-summary__progress::before {
  content: '';
  position: absolute;
  inset: -8px 0;
}

.md-typeset .audio-summary__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00BFFF, #33ccff);
  border-radius: 3px;
  pointer-events: none;
}

.md-typeset .audio-summary__progress:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---- Time display ---- */
.md-typeset .audio-summary__time {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* ---- Speed controls ---- */
.md-typeset .audio-summary__speed {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.md-typeset .audio-summary__speed-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 0.3rem;
}

.md-typeset .audio-summary__speed-btn {
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.md-typeset .audio-summary__speed-btn:hover {
  border-color: rgba(0, 191, 255, 0.35);
  color: rgba(255, 255, 255, 0.75);
}

.md-typeset .audio-summary__speed-btn:focus-visible {
  outline: 2px solid #00BFFF;
  outline-offset: 1px;
}

.md-typeset .audio-summary__speed-btn.active {
  border-color: #00BFFF;
  background: rgba(0, 191, 255, 0.12);
  color: #00BFFF;
  font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .md-typeset .audio-summary {
    padding: 0.9rem 1rem;
  }

  .md-typeset .audio-summary__controls {
    gap: 0.5rem;
  }

  .md-typeset .audio-summary__btn--play {
    width: 36px;
    height: 36px;
  }

  .md-typeset .audio-summary__speed-btn {
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
  }
}
