/* --- Плеер для multlyandiya.ru (Прогресс-бар внизу, без наложений) --- */
.ml-audio-player {
  --ml-white: #ffffff;
  --ml-blue: #0048b4;
  --ml-green: #6ea615;
  --ml-gray: #f1f1f1;
  --ml-text-muted: #5a739e;
  
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  background: var(--ml-gray);
  border: 2px solid var(--ml-blue);
  border-radius: 12px;
  box-shadow: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  max-width: 750px;
  margin: 0 auto 20px;
}

/* Жёсткая защита иконок Font Awesome от uCoz */
.ml-audio-player .fa {
  display: inline-block !important;
  font-size: 18px !important;
  line-height: 1 !important;
  color: inherit !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: auto !important;
  height: auto !important;
}

/* Ряд 1: Информация */
.ml-info-row { text-align: left; }
.ml-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ml-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ml-artist {
  font-size: 13px;
  color: var(--ml-text-muted);
  margin-top: 2px;
}

/* Ряд 2: Главное управление */
.ml-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Разносит кнопки влево, а громкость вправо */
  gap: 12px;
  width: 100%;
}

.ml-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ml-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.ml-btn:active { transform: scale(0.92); }
.ml-btn:focus-visible { outline: 2px solid var(--ml-green); outline-offset: 2px; }

.ml-btn-play {
  width: 48px;
  height: 48px;
  background: var(--ml-blue) !important;
  color: var(--ml-white) !important;
}
.ml-btn-play:hover { background: var(--ml-green) !important; }
.ml-btn-play .fa { font-size: 22px !important; margin-left: 3px; }
.ml-audio-player.is-playing .ml-btn-play .fa { margin-left: 0; }

.ml-btn-nav {
  width: 40px;
  height: 40px;
  background: transparent !important;
  color: var(--ml-blue) !important;
}
.ml-btn-nav:hover { background: rgba(0, 72, 180, 0.1) !important; }

/* Ряд 3: Прогресс-бар (отдельная строка на всю ширину) */
.ml-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.ml-time-current, .ml-time-total {
  flex-shrink: 0;
  min-width: 44px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ml-blue);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.ml-progress-bar {
  flex: 1;
  min-width: 0;
  height: 8px;
  background: var(--ml-white);
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: height 0.2s ease;
}
.ml-progress-bar:hover { height: 10px; }

.ml-progress-filled {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ml-blue), var(--ml-green));
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

.ml-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: var(--ml-white);
  border: 2px solid var(--ml-blue);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
  pointer-events: none;
  z-index: 2;
}
.ml-progress-bar:hover .ml-progress-thumb,
.ml-audio-player.is-dragging .ml-progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* Громкость */
.ml-volume-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ml-btn-icon {
  width: 36px;
  height: 36px;
  background: transparent !important;
  color: var(--ml-blue) !important;
}
.ml-btn-icon:hover { background: rgba(0, 72, 180, 0.1) !important; }

.ml-volume-slider {
  width: 70px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--ml-white);
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.ml-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--ml-blue);
  border-radius: 50%;
  cursor: pointer;
}
.ml-volume-slider::-webkit-slider-thumb:hover { background: var(--ml-green); }
.ml-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--ml-blue);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Ряд 4: Доп. функции */
.ml-extra-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #dcdcdc;
}

.ml-btn-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  height: 34px;
  background: var(--ml-white) !important;
  color: var(--ml-text-muted) !important;
  border: 1px solid #dcdcdc;
  border-radius: 17px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.ml-btn-feature:hover { 
  border-color: var(--ml-blue) !important; 
  color: var(--ml-blue) !important; 
}
.ml-btn-feature .fa { font-size: 14px !important; }

.ml-btn-feature.is-active {
  background: var(--ml-green) !important;
  color: var(--ml-white) !important;
  border-color: var(--ml-green) !important;
}

/* Логика иконок */
.ml-btn-play .fa-pause { display: none !important; }
.ml-audio-player.is-playing .ml-btn-play .fa-play { display: none !important; }
.ml-audio-player.is-playing .ml-btn-play .fa-pause { display: inline-block !important; }

.ml-btn-icon .fa-volume-off { display: none !important; }
.ml-audio-player.is-muted .ml-btn-icon .fa-volume-up { display: none !important; }
.ml-audio-player.is-muted .ml-btn-icon .fa-volume-off { display: inline-block !important; }

/* Адаптив для мобильных */
@media (max-width: 650px) {
  .ml-audio-player { padding: 14px 16px; }
  .ml-main-row { justify-content: center; gap: 16px; }
  .ml-volume-slider { width: 60px; }
  .ml-extra-row { justify-content: center; }
}