/* ============================================================
   PROGRESS STYLE SWITCHER — 3 точки + 3 варианта прогресс-бара
   ============================================================ */

/* ── Контейнер с точками ── */
.progress-styles {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;          /* небольшой зазор до кнопки шафла */
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s, background 0.2s;
}
.progress-styles:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

/* ── Сама точка ── */
.progress-style-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.12s cubic-bezier(.2,.9,.3,1.2),
    box-shadow 0.2s;
}
.progress-style-dot:hover {
  border-color: rgba(255, 255, 255, 0.65);
  transform: scale(1.18);
}
.progress-style-dot.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}
.progress-style-dot:active {
  transform: scale(0.85);
}

/* Скрываем блок в mini-mode, там места нет */
body.is-mini-mode .progress-styles { display: none; }

/* ============================================================
   СТИЛЬ 1 — DEFAULT (ничего не делаем, базовый вид)
   ============================================================ */
/* ============================================================
   СТИЛЬ 2 — PLAYER BACKGROUND
   Прогресс = фон всего плеера. Все элементы поверх, клики
   обрабатываются через JS (в progress-styles.js).
   ============================================================ */

/* ── Контейнер: во всю площадь плеера, не ловит клики ── */
body.progress-style-square:not(.is-mini-mode) .progress-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: var(--player-h);
  padding: 0;
  margin: 0;
  gap: 0;
  z-index: 0;                          /* в самом низу внутри .player */
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.progress-style-square.has-playback:not(.is-mini-mode) .progress-container {
  opacity: 1;
}

/* ── Временные метки ── */
body.progress-style-square .progress-container > span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 300;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.18s ease;
}
body.progress-style-square .progress-container:hover > span { opacity: 1; }
body.progress-style-square #timeCurrent { left: 16px; }
body.progress-style-square #timeTotal   { right: 16px; }

/* ── Сам бар: только визуал, клики не ловит ── */
body.progress-style-square .progress-bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  pointer-events: none;                 /* ← ВСЁ, не мешает кнопкам */
  overflow: hidden;
}

/* ── Заливка: скруглённая справа, полупрозрачная поверх фона ── */
body.progress-style-square .progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 0%;
  border-radius: 0 8px 8px 0;           /* ← скругление справа */
  background: linear-gradient(
    90deg,
    rgba(99, 102, 241, 0.12) 0%,
    rgba(129, 140, 248, 0.22) 100%
  );
  border-right: 2px solid rgba(165, 180, 252, 0.7);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
  transition:
    width 0.1s linear,
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  pointer-events: none;
}

body.progress-style-square .progress-bar:hover .progress-fill {
  background: linear-gradient(
    90deg,
    rgba(99, 102, 241, 0.22) 0%,
    rgba(129, 140, 248, 0.34) 100%
  );
  border-right-color: rgba(199, 210, 254, 0.95);
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.55);
}

body.progress-style-square .progress-thumb { display: none; }

/* ── Фон плеера: сплошной тёмный (без просвета) ── */
body.progress-style-square:not(.is-mini-mode) .player {
  background: #08080c !important;
  z-index: 100;
}

/* Видео-фон — прочь */
body.progress-style-square:not(.is-mini-mode) .player-video,
body.progress-style-square:not(.is-mini-mode) .player-video-overlay {
  display: none !important;
}

/* ── Все дети плеера — поверх заливки, обычные клики ── */
body.progress-style-square:not(.is-mini-mode) .player > .player-left,
body.progress-style-square:not(.is-mini-mode) .player > .player-center,
body.progress-style-square:not(.is-mini-mode) .player > .player-right {
  position: relative;
  z-index: 10;                          /* выше заливки */
  /* pointer-events НЕ трогаем — работает всё как обычно */
}

/* ── Мобилка ── */
@media (max-width: 768px) {
  body.progress-style-square .progress-container {
    height: var(--player-h);
    width: 100vw;
  }
  body.progress-style-square .progress-container > span {
    display: none;
  }
}
/* ============================================================
   СТИЛЬ 3 — NEON
   Тонкая линия, светящийся градиентный fill с шиммером,
   пульсирующая точка-ползунок.
   ============================================================ */

body.progress-style-neon .progress-bar {
  height: 4px;
  background: rgba(168, 85, 247, 0.12);
  border-radius: 999px;
  overflow: visible;
  transition: height 0.2s, background 0.2s;
}
body.progress-style-neon .progress-bar:hover {
  height: 5px;
  background: rgba(168, 85, 247, 0.18);
}

body.progress-style-neon .progress-fill {
  background: linear-gradient(90deg, #a855f7 0%, #ec4899 60%, #f43f5e 100%);
  border-radius: 999px;
  box-shadow:
    0 0 8px rgba(168, 85, 247, 0.7),
    0 0 18px rgba(236, 72, 153, 0.45);
  position: relative;
  overflow: hidden;
}
body.progress-style-neon .progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: pswgNeonShimmer 2.2s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}
@keyframes pswgNeonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body.progress-style-neon .progress-bar:hover .progress-fill {
  box-shadow:
    0 0 12px rgba(168, 85, 247, 0.9),
    0 0 26px rgba(236, 72, 153, 0.65);
}

body.progress-style-neon .progress-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 10px #ec4899,
    0 0 20px #a855f7,
    0 0 30px rgba(168, 85, 247, 0.7);
  animation: pswgNeonPulse 1.6s ease-in-out infinite;
}
@keyframes pswgNeonPulse {
  0%, 100% { transform: translateX(-50%) scale(1);    opacity: 1;    }
  50%      { transform: translateX(-50%) scale(0.85); opacity: 0.85; }
}