/**
 * Adria Audio News — Audio Player Styles (Compact)
 *
 * Single-row slim bar. All controls inline.
 * Design tokens: AdriaZone system (hltv-profile-style.css)
 *
 * Player states (data-state):
 *   idle · loading · ready · playing · paused · error
 */

/* ============================================
   Player Container — slim single row
   ============================================ */
.adria-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;

    background: #161a21;
    border: 1px solid #30363d;
    border-left: 3px solid #e94560;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 20px;

    position: relative;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.adria-audio-player::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(233,69,96,0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

.adria-audio-player.adria-player--playing {
    border-color: #e94560;
    box-shadow: 0 0 0 1px rgba(233,69,96,0.15), 0 2px 12px rgba(233,69,96,0.07);
}

.adria-audio-player.adria-player--error {
    border-left-color: #6e7681;
    opacity: 0.7;
}

/* ============================================
   Controls (left) — play + stop
   ============================================ */
.adria-player__controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Play / Pause */
.adria-btn-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e94560;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 1px 8px rgba(233,69,96,0.3);
}

.adria-btn-play:hover:not(:disabled) {
    background: #f05370;
    transform: scale(1.07);
    box-shadow: 0 2px 12px rgba(233,69,96,0.45);
}

.adria-btn-play:active:not(:disabled) { transform: scale(0.95); }

.adria-btn-play:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.adria-btn-play .adria-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.adria-btn-play .adria-icon--play { margin-left: 1px; }

/* Stop */
.adria-btn-stop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 5px;
    color: #6e7681;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.adria-btn-stop svg { width: 10px; height: 10px; }

.adria-btn-stop:hover:not(:disabled) {
    color: #c9d1d9;
    border-color: #8fa3b3;
    background: #1c2333;
}

.adria-btn-stop:disabled { opacity: 0.3; cursor: not-allowed; }

.adria-audio-player[data-state="idle"]  .adria-btn-stop,
.adria-audio-player[data-state="error"] .adria-btn-stop {
    pointer-events: none;
    opacity: 0.2;
}

/* ============================================
   Waveform icon
   ============================================ */
.adria-player__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    width: 20px;
}

.adria-wave-icon { width: 20px; height: 16px; }

.adria-wave-bar {
    fill: #6e7681;
    transform-origin: bottom center;
    transition: fill 0.25s ease;
}

.adria-audio-player.adria-player--playing .adria-wave-bar {
    fill: #e94560;
    animation: adriaBarPulse 1.2s ease-in-out infinite;
}

.adria-audio-player.adria-player--playing .adria-wave-bar--1 { animation-delay: 0s;    animation-duration: 0.9s;  }
.adria-audio-player.adria-player--playing .adria-wave-bar--2 { animation-delay: 0.15s; animation-duration: 1.1s;  }
.adria-audio-player.adria-player--playing .adria-wave-bar--3 { animation-delay: 0.05s; animation-duration: 0.8s;  }
.adria-audio-player.adria-player--playing .adria-wave-bar--4 { animation-delay: 0.2s;  animation-duration: 1.0s;  }
.adria-audio-player.adria-player--playing .adria-wave-bar--5 { animation-delay: 0.1s;  animation-duration: 0.95s; }

@keyframes adriaBarPulse {
    0%,  100% { transform: scaleY(0.35); opacity: 0.65; }
    50%       { transform: scaleY(1.0);  opacity: 1.0;  }
}

/* ============================================
   Label + badge (inline)
   ============================================ */
.adria-player__label-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.adria-player__badge {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.7px;
    color: #e94560;
    background: rgba(233,69,96,0.1);
    border: 1px solid rgba(233,69,96,0.2);
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1.6;
}

.adria-player__label {
    font-size: 11px;
    font-weight: 600;
    color: #8fa3b3;
    white-space: nowrap;
}

/* ============================================
   Main: progress + time (flex row, fills space)
   ============================================ */
.adria-player__main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Progress bar */
.adria-player__progress-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    padding: 6px 0;
    cursor: pointer;
    outline: none;
}

.adria-player__progress-wrap:focus-visible .adria-player__progress-track {
    outline: 2px solid #58a6ff;
    outline-offset: 2px;
    border-radius: 99px;
}

.adria-player__progress-track {
    position: relative;
    height: 3px;
    background: #21262d;
    border-radius: 99px;
    overflow: visible;
    transition: height 0.1s ease;
}

.adria-player__progress-wrap:hover .adria-player__progress-track {
    height: 4px;
}

.adria-player__progress-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c23152 0%, #e94560 100%);
    border-radius: 99px;
    transition: width 0.05s linear;
    pointer-events: none;
}

.adria-player__progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #e94560;
    border: 2px solid #161a21;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(233,69,96,0.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.adria-player__progress-wrap:hover .adria-player__progress-thumb,
.adria-player__progress-wrap:focus-within .adria-player__progress-thumb {
    opacity: 1;
}

body.adria-dragging .adria-player__progress-thumb {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.25);
}

/* Disable progress in non-seekable states */
.adria-audio-player[data-state="idle"]    .adria-player__progress-wrap,
.adria-audio-player[data-state="loading"] .adria-player__progress-wrap,
.adria-audio-player[data-state="error"]   .adria-player__progress-wrap {
    cursor: default;
    pointer-events: none;
    opacity: 0.4;
}

/* Time */
.adria-player__time-row {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.adria-player__time-current,
.adria-player__time-total {
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #8fa3b3;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.adria-player__time-current { color: #c9d1d9; }

.adria-player__time-sep {
    font-size: 9px;
    color: #6e7681;
}

.adria-audio-player[data-state="idle"] .adria-player__time-current,
.adria-audio-player[data-state="idle"] .adria-player__time-total,
.adria-audio-player[data-state="idle"] .adria-player__time-sep { opacity: 0.35; }

/* ============================================
   Speed buttons (right)
   ============================================ */
.adria-player__speed-group {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.adria-speed-btn {
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #6e7681;
    font-size: 9px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 2px 5px;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.adria-speed-btn:hover:not(:disabled) {
    color: #c9d1d9;
    border-color: #58a6ff;
    background: rgba(88,166,255,0.07);
}

.adria-speed-btn.adria-speed-btn--active {
    color: #e94560;
    border-color: rgba(233,69,96,0.5);
    background: rgba(233,69,96,0.09);
}

.adria-speed-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ============================================
   Spinner
   ============================================ */
@keyframes adriaSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.adria-icon--spinner.adria-spin { animation: adriaSpin 0.8s linear infinite; }

/* ============================================
   Loading pulse on label
   ============================================ */
.adria-audio-player[data-state="loading"] .adria-player__label {
    animation: adriaLabelPulse 1.4s ease-in-out infinite;
}

@keyframes adriaLabelPulse {
    0%,  100% { opacity: 1; }
    50%       { opacity: 0.45; }
}

/* ============================================
   Mobile
   ============================================ */
@media (max-width: 600px) {
    .adria-audio-player { gap: 8px; padding: 7px 10px; }
    .adria-player__label-group { display: none; }
    .adria-btn-play  { width: 30px; height: 30px; }
    .adria-btn-stop  { width: 22px; height: 22px; }
    .adria-btn-play .adria-icon { width: 12px; height: 12px; }
    .adria-btn-stop svg         { width: 9px;  height: 9px;  }
    .adria-speed-btn { font-size: 8px; padding: 2px 4px; }
    .adria-player__time-current,
    .adria-player__time-total { font-size: 9px; }
}

@media (max-width: 380px) {
    .adria-player__speed-group { display: none; }
    .adria-player__icon        { display: none; }
}

/* ============================================
   Voice Warning Strip (browser mode — no Serbian voice)
   ============================================ */
.adria-voice-warning {
    font-size: 11px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0 0 6px 6px;
    padding: 6px 12px;
    margin-top: -16px;  /* tuck under the player */
    margin-bottom: 16px;
    line-height: 1.5;
}
