/* /css/audio_global_player.css
   Відповідає за:
   - глобальний аудіо-плеєр (fixed bottom)
   - адаптивність (mobile)
   - кнопка Close
*/

body.has-audio-player {
  padding-bottom: 92px;
}

/* iOS safe area */
.vm-audio-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 1035;
  background: rgba(10, 10, 14, 0.94);
  border-top: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  color: #fff;
}

.vm-audio-inner {
  padding: 10px 0;
  display: grid;
  grid-template-columns: 1fr 180px 260px;
  gap: 12px;
  align-items: center;
}

.vm-audio-now {
  min-width: 0;
}

.vm-audio-title {
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vm-audio-artist {
  opacity: .75;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 16px;
}

.vm-audio-progress {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  align-items: center;
}

.vm-audio-time {
  font-size: 12px;
  opacity: .8;
  text-align: center;
}

.vm-audio-seek {
  width: 100%;
}

.vm-audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vm-audio-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.vm-audio-btn:hover { background: rgba(255,255,255,.12); }

.vm-audio-btn-primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.vm-audio-btn-close {
  width: 34px;
  height: 34px;
  font-size: 16px;
  line-height: 1;
}

.vm-audio-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.vm-audio-vol {
  width: 120px;
}

.vm-audio-vol-ico { opacity: .85; }

.vm-audio-link {
  text-decoration: none;
  color: #fff;
  opacity: .9;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  white-space: nowrap;
  touch-action: manipulation;
}
.vm-audio-link:hover { opacity: 1; background: rgba(255,255,255,.12); }

/* Focus styles */
.vm-audio-btn:focus-visible,
.vm-audio-link:focus-visible,
.vm-audio-seek:focus-visible,
.vm-audio-vol:focus-visible {
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}

/* Slight visual accent when player is visible */
body.has-audio-player .vm-audio-dock {
  box-shadow: 0 -10px 30px rgba(0,0,0,.25);
}

@media (max-width: 992px) {
  .vm-audio-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .vm-audio-right {
    justify-content: space-between;
  }
  .vm-audio-vol { width: 140px; }
  body.has-audio-player { padding-bottom: 140px; }
}

@media (max-width: 520px) {
  body.has-audio-player { padding-bottom: 155px; }

  .vm-audio-inner {
    padding: 8px 0;
    gap: 8px;
  }

  .vm-audio-btn {
    width: 36px;
    height: 36px;
  }

  .vm-audio-vol { width: 130px; }

  .vm-audio-link {
    padding: 6px 8px;
    border-radius: 10px;
  }
}