/* ==========================================================================
   quran-player.css — Компактный аудиоплеер (встроен в строку табов, справа)
   ========================================================================== */

/* --- Контейнер плеера --- */
.quran-player {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  padding-inline-start: 12px;
  padding-inline-end: 6px;
  border-inline-start: 1px solid #e5e7eb;
}

.quran-player-inner {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Кнопки (prev, play/pause, next)
   ========================================================================== */

.quran-player-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.quran-player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.quran-player-btn:hover {
  background: color-mix(in srgb, var(--emerald) 8%, transparent);
  color: var(--emerald, #198754);
}

.quran-player-btn svg {
  fill: currentColor;
}

/* --- Кнопка Play (акцентная) --- */
.quran-player-btn-play {
  width: 32px;
  height: 32px;
  background: var(--emerald, #198754);
  color: #fff;
}

.quran-player-btn-play svg {
  display: block;
}

.quran-player-btn-play:hover {
  background: #059669;
  color: #fff;
}

/* ==========================================================================
   Прогресс-бар
   ========================================================================== */

.quran-player-progress {
  display: flex;
  align-items: center;
  min-width: 60px;
  max-width: 120px;
  flex: 1;
}

.quran-progress-bar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: #d1d5db;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.quran-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: var(--emerald, #198754);
  border-radius: 50%;
  cursor: pointer;
}

.quran-progress-bar::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--emerald, #198754);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.quran-progress-bar::-moz-range-track {
  height: 3px;
  background: #d1d5db;
  border-radius: 2px;
}

/* ==========================================================================
   Время
   ========================================================================== */

.quran-player-time {
  font-size: 0.65rem;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Доп. кнопки (повтор, скорость)
   ========================================================================== */

.quran-player-extra {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.quran-player-speed {
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: transparent;
  color: #6b7280;
  font-size: 0.6rem;
  font-weight: 600;
  cursor: pointer;
}

.quran-player-speed:hover {
  border-color: var(--emerald, #198754);
  color: var(--emerald, #198754);
}

/* --- Кнопка режима (📖 / 🔁 / 1️⃣) --- */
.quran-player-mode {
  font-size: 0.8rem;
  width: auto;
  padding: 0 4px;
}

/* ==========================================================================
   Ночной режим
   ========================================================================== */

.night-mode .quran-player {
  border-left-color: var(--quran-border, #2a2a3e);
}

.night-mode .quran-player-btn {
  color: #9ca3af;
}

.night-mode .quran-player-btn:hover {
  background: color-mix(in srgb, var(--emerald) 15%, transparent);
  color: #6ee7b7;
}

.night-mode .quran-player-btn-play {
  background: var(--emerald, #198754);
  color: #fff;
}

.night-mode .quran-progress-bar {
  background: #374151;
}

.night-mode .quran-player-speed {
  border-color: #4b5563;
  color: #9ca3af;
}

/* ==========================================================================
   Responsive: скрыть прогресс-бар и доп. кнопки на мобильном
   ========================================================================== */

@media (max-width: 767px) {
  .quran-player-progress,
  .quran-player-time,
  .quran-player-extra {
    display: none;
  }

  .quran-player {
    padding-inline-start: 8px;
  }

  .quran-player-btn {
    width: 24px;
    height: 24px;
  }

  .quran-player-btn-play {
    width: 28px;
    height: 28px;
  }
}
