/* ====== AUDIO DOCK - FULL WIDTH FIXED PLAYER ====== */
.audio-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: block;
}

.audio-dock__wrap {
  background: #005C67;
}

.audio-dock__bar {
  padding: 12px 18px 14px;
  color: #fff;
  font-family: Gilroy, Arial, sans-serif;
}

/* ===== SLIDE PREVIEW (превью над плеером) ===== */
.audio-dock__slide-preview {
  position: absolute;
  bottom: 100%;
  left: 280px;
  cursor: pointer;
  z-index: 99999;
}



.audio-dock__slide-preview-inner {
  margin-bottom: 23px;
  transition: transform 0.4s ease;
  cursor: pointer;
}


.audio-dock__slide-preview-inner:hover {
  transform: scale(1.05);
}

.audio-dock__slide-preview-inner:active {
  transform: scale(0.98);
}

.audio-dock__slide-preview-image {
  width: 120px;
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: #005C67;
  border-radius: 2px 2px 0 0;
  transition: opacity 0.4s ease;
}

.audio-dock__slide-preview-image:hover {
  transform: none;
}

.audio-dock__slide-preview-image:active {
  transform: none;
}

/* Треугольник под превью - как у скорости */
.audio-dock__slide-preview-arrow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid #005C67;
}

/* ===== SLIDE OVERLAY (полноэкранный просмотр) ===== */
.audio-slide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: 100px; /* высота аудиобара */
  background: rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(15.6px);
  -webkit-backdrop-filter: blur(15.6px);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
}

.audio-slide-overlay.is-open {
  display: flex;
}

.audio-slide-overlay__content {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.audio-slide-overlay__image {
  height: 786px;
  max-height: 70vh;
  width: auto;
  border-radius: 2px;
  object-fit: contain;
   transition: opacity 0.4s ease;
}

.audio-dock__slide-preview-label {
  background: #005C67;
  color: #fff;
  text-align: center;
  font-family: "PT Astra Serif", serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%;
  padding: 4px 8px;
  border-radius: 0 0 2px 2px;
}


.audio-slide-overlay__close {
  position: absolute;
top: -40px;
    right: -310px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.audio-slide-overlay__close:hover {
  transform: scale(1.43);
}

.audio-slide-overlay__close:active {
  transform: scale(0.95);
}

.audio-slide-overlay__close svg {
  width: 28px;
  height: 28px;
}

.audio-dock__bar {
  position: relative;
  padding-right: 44px; /* место под крестик */
}

.audio-dock__close {
  position: absolute;
    right: 0;
    top: 10%;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .85;
}

.audio-dock__close:hover { 
  opacity: 1; 
    transform: scale(1.43);
    
}


/* ===== RESET ===== */
.audio-dock__bar button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  color: #fff;
}

.audio-dock__bar button:focus,
.audio-dock__bar button:active,
.audio-dock__bar button:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ===== SVG базовые стили ===== */
.audio-dock__bar svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ===== TOP - Время над дорожкой, дорожка на всю ширину ===== */
.audio-dock__top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.audio-dock__times {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.audio-dock__progress {
  position: relative;
  width: 100%;
}

.audio-dock__progress-track {
  height: 4px;
  background: #f4f4f4;
  border-radius: 4px;
}

.audio-dock__progress-fill {
  height: 4px;
  width: 0%;
  background: #f6881b;
  border-radius: 4px;
}

.audio-dock__progress-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ===== BOTTOM ===== */
.audio-dock__bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.audio-dock__left,
.audio-dock__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-dock__center {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.audio-dock__cover {
  width: 40px;
  height: 40px;
  background: #ffffff33;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.audio-dock__title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-family: "PT Astra Serif", serif;
  font-style: normal;
  font-weight: 500;
  line-height: 120%;
}

.audio-dock__icon--play svg {
  margin-left: 8px;
}

/* ===== BUTTON STYLES ===== */
.audio-dock__btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
  color: #fff;
}

.audio-dock__btn:hover {
  color: #F6881B;
}

.audio-dock__btn:active {
  transform: scale(0.96);
}

/* Play кнопка чуть больше */
.audio-dock__btn--play {
  width: 38px;
  height: 38px;
}

.audio-dock__btn--play svg {
  width: 26px;
  height: 26px;
}

/* ===== SKIP BUTTONS GROUP (-10 / +10) ===== */
.audio-dock__skip-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.audio-dock__btn--skip {
  position: relative;
  width: 36px;
  height: 36px;
}

.audio-dock__btn--skip svg {
  width: 28px;
  height: 28px;
}

/* Текст "10" по центру кнопки */
.audio-dock__btn-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  color: currentColor;
  pointer-events: none;
}

/* ===== WISH BUTTON (сердечко) ===== */
.audio-dock__btn--wish {
  transition: transform 0.2s ease;
}

.audio-dock__btn--wish svg path {
  fill: none;
  stroke: currentColor;
  transition: fill 0.2s ease, stroke 0.2s ease, transform 0.2s ease;
}

.audio-dock__btn--wish:hover svg path {
  stroke: #F6881B;
}

/* Состояние "в избранном" */
.audio-dock__btn--wish.is-active svg path {
  fill: #F6881B;
  stroke: #F6881B;
}

/* Анимация пульсации при клике */
@keyframes wishlistPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.audio-dock__btn--wish.is-pulse {
  animation: wishlistPulse 0.3s ease;
}

/* ===== SPEED DROPDOWN ===== */
.audio-dock__speed-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.audio-dock__speed {
  width: auto;
  min-width: 60px;
  padding: 0 10px;
  gap: 8px;
  justify-content: center;
}

.audio-dock__speed #audioSpeedValue {
  font-weight: 700;
  font-size: 12px;
  min-width: 36px;
  text-align: center;
}

/* Окно выбора скорости */
.audio-dock__speed-dd {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 110px;
  background: #005C67;
  border-radius: 2px;
  padding: 11px;
  display: none;
  z-index: 99999;
  margin-bottom: 72px;
}

/* Стрелочка-треугольник снизу вершиной вниз */
.audio-dock__speed-dd::after {
  content: '';
  position: absolute;
  bottom: -23px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid #005C67;
}

.audio-dock__speed-dd.is-open {
  display: block;
}

.audio-dock__speed-dd button {
  width: 100%;
  height: auto;
  padding: 10px 12px;
  border-radius: 2px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: background 0.15s ease;
}

.audio-dock__speed-dd button:hover {
  background: rgba(255, 255, 255, 0.20);
}

.audio-dock__speed-dd button.is-active {
  background: rgba(255, 255, 255, 0.20);
}

/* ===== VOLUME ===== */
.audio-dock__volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-dock__vol-input {
  width: 120px;
  height: 4px;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #f6881b 0%,
    #f6881b var(--vol, 70%),
    #f4f4f4 var(--vol, 70%),
    #f4f4f4 100%
  );
}

.audio-dock__vol-input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f6881b;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.audio-dock__vol-input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f6881b;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.audio-dock__vol-input::-moz-range-progress {
  background: #f6881b;
  border-radius: 4px;
  height: 4px;
}

.audio-dock__vol-input::-moz-range-track {
  background: #f4f4f4;
  border-radius: 4px;
  height: 4px;
}

/* ===== ICONS DISPLAY TOGGLE ===== */
.audio-dock__icon--play,
.audio-dock__icon--pause,
.audio-dock__icon--vol,
.audio-dock__icon--muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.js-audio-btn-styled.is-playing svg,
.js-audio-btn-styled.is-playing:active svg,
.js-audio-btn-styled.is-playing:focus svg {
  fill: white !important;
}

.js-audio-btn-styled.is-playing:hover svg {
  fill: #005C67 !important;
}

@media (max-width: 1200px) {
    .audio-slide-overlay__close {
        right: -60px;
    }
}

@media (max-width: 1024px) {
    .audio-dock__bottom {
        gap: 10px;
    }

    .audio-dock__left {
        gap: 4px;
    }

    .audio-dock__right {
        gap: 8px;
    }

    .audio-dock__skip-group {
        gap: 0;
        margin-left: 2px;
    }

    .audio-dock__vol-input {
        width: 70px;
    }

    .audio-dock__bar {
        padding: 12px 18px 14px;
        padding-right: 44px;
    }

    .audio-dock__slide-preview {
        left: 180px;
    }

      .audio-dock__slide-preview-inner {
        width: 100px;
    }

    .audio-dock__slide-preview-image {
        width: 100%;
        height: 100px;
    }
    

    .container--nopad--inside.audio-dock-main {
        padding-left: 30px;
        padding-right: 30px;
    }

    /* Кнопки по размеру SVG */
    .audio-dock__btn {
        width: 24px;
        height: 24px;
    }

    .audio-dock__btn--play {
        width: 24px;
        height: 24px;
    }

    .audio-dock__icon--play,
    .audio-dock__icon--pause {
        width: 24px;
        height: 24px;
    }

    .audio-dock__btn--skip {
        width: 32px;
        height: 32px;
    }

    .audio-dock__btn--wish {
        width: 24px;
        height: 24px;
    }

    .audio-dock__close {
        right: 4px;
        width: 20px;
        height: 20px;
    }

        .audio-dock__speed {
        width: auto;
        height: 24px;
        min-width: 50px;
        gap: 2px;
    }

        .audio-slide-overlay__close {
        right: 10px;
        top: -50px;
    }
}

@media (max-width: 768px) {
    .audio-dock__bottom {
        gap: 6px;
    }

    .audio-dock__left {
        gap: 2px;
    }

    .audio-dock__right {
        gap: 6px;
    }

    .audio-dock__skip-group {
        gap: 1px;
        margin-left: 1px;
    }

    .audio-dock__vol-input {
        width: 50px;
    }

    .audio-dock__close {
        right: 2px;
    }

    .audio-dock__slide-preview {
        left: 140px;
    }


    .audio-slide-overlay__image {
        width: 90vw;
        height: 90vw;
        max-width: 500px;
        max-height: 500px;
    }

    .audio-slide-overlay__content {
        flex-direction: column;
        gap: 20px;
    }

    .audio-slide-overlay__close {
        position: absolute;
        top: -50px;
        right: 0;
    }

        .container--nopad--inside.audio-dock-main {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 630px) {
    .audio-dock__bar {
        display: flex;
        flex-direction: column;
        padding: 10px 16px;
        min-height: 140px;
        box-sizing: border-box;
        justify-content: center;
        min-height: 140px;
    }

    .audio-dock__bottom {
        display: contents;
    }

    .audio-dock__right {
        display: contents;
    }

    /* 1. Название + сердечко */
    .audio-dock__center {
        display: flex;
        align-items: center;
        order: 1;
        width: 100%;
        gap: 12px;
    }

    .audio-dock__cover {
        display: none;
    }

    .audio-dock__title {
        font-size: 14px;
        flex: 1;
        margin-bottom: 4px;
    }

    .audio-dock__btn--wish {
        flex-shrink: 0;
    }

    /* 2. Кнопки управления + speed в одной строке */
    .audio-dock__left {
        order: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        width: 100%;
        margin-top: 0;
        position: relative;
    }

    #audioSeekBack,
    #audioSeekForward {
        display: none;
    }

    .audio-dock__skip-group {
        display: contents;
    }

    #audioSkipBack { order: 1; }
    .audio-dock__btn--play { order: 2; }
    #audioSkipForward { order: 3; }

    /* Play/Pause изначальный размер */
    .audio-dock__btn--play {
        width: 38px;
        height: 38px;
    }

.audio-dock__btn--play svg,
    .audio-dock__icon--play svg,
    .audio-dock__icon--pause svg {
        width: 26px;
        height: 26px;
    }

    .audio-dock__icon--play,
    .audio-dock__icon--pause {
        width: 26px;
        height: 26px;
    }

    /* Speed справа */
    .audio-dock__speed-wrap {
        order: 4;
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
    }

    .audio-dock__speed {
        min-width: auto;
        gap: 4px;
        align-items: center;
    }

    /* Speed dropdown: треугольник растёт из бара */
    .audio-dock__speed-dd {
        bottom: auto;
        top: auto;
        position: fixed;
        bottom: 90px;
        right: 16px;
        left: auto;
        transform: none;
        margin-bottom: 13px;
    }

    .audio-dock__speed-dd::after {
        bottom: -22px;
        left: auto;
        right: 49px;
        transform: none;
        border-bottom: 8px solid #005C67;
    }

    .audio-dock__volume {
        display: none;
    }

    /* 3. Прогресс и время внизу */
    .audio-dock__top {
        order: 3;
        margin-bottom: 0;
        margin-top: 8px;
    }

    .audio-dock__progress { order: 1; }
    .audio-dock__times { order: 2; font-size: 12px; }

    /* Превью */
    .audio-dock__slide-preview {
        left: 50%;
        transform: translateX(-50%);
    }



    /* Крестик над баром */
    .audio-dock__close {
        position: absolute;
        right: -10px;
        bottom: 100%;
        top: auto;
        width: 32px;
        height: 32px;
        margin-bottom: 6px;
        color: #211E1E;
        opacity: 1;
    }

    .audio-dock__close svg {
        width: 32px;
        height: 32px;
    }

    .audio-dock__close svg path {
        stroke: #211E1E;
    }

    .audio-dock__close:hover {
        color: #211E1E;
        opacity: 1;
    }


    .audio-dock__icon--play {
        width: 34px;
        height: 26px;
    }

    .audio-dock__icon--play svg {
        margin-left: 8px;
        width: 26px;
        height: 26px;
    }

}