/* ===== Audio Guide - Language Switcher ===== */
.audio-lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.lang-audio-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  opacity: 0.5;
  line-height: 1;
}
.lang-audio-btn:hover {
  opacity: 0.8;
  background: var(--line);
}
.lang-audio-btn.active {
  opacity: 1;
  background: var(--brand);
  box-shadow: 0 0 0 2px rgba(13, 91, 215, 0.3);
}

/* ===== Audio Player Bar (sticky footer) ===== */
.audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 2px solid var(--brand);
  padding: 8px 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.audio-bar-stop {
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.audio-bar-stop:hover {
  background: var(--brand2);
}
.audio-bar-info {
  flex: 1;
  min-width: 0;
}
.audio-bar-status {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-bar-progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.audio-bar-progress {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.audio-bar-langs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.lang-pill {
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 12px;
  transition: all 0.15s ease;
  opacity: 0.6;
  line-height: 1.2;
}
.lang-pill:hover {
  opacity: 1;
  background: var(--bg);
  border-color: var(--brand);
}

/* ===== Audio Guide Buttons on Pages ===== */
.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  line-height: 1.4;
  font-family: inherit;
}
.audio-btn:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.audio-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  gap: 4px;
}
.audio-btn i,
.audio-btn .audio-icon {
  font-size: 14px;
}
.audio-btn-sm .audio-icon {
  font-size: 12px;
}

/* Adjust main content for the audio bar */
.main-content {
  padding-bottom: 60px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .audio-lang-switcher {
    display: none;
  }
  .audio-bar {
    padding: 6px 12px;
    gap: 8px;
  }
  .audio-bar-langs .lang-pill {
    padding: 2px 4px;
    font-size: 12px;
  }
  .main-content {
    padding-bottom: 56px;
  }
}
