/* =============================================================================
   Article audio ("האזנה לכתבה") - compact single-line player.

   Sits between the article meta row and the article body, so it must stay short:
   one line, ~36px, and it must not push the body down noticeably.

   Collapsed:  [>]  האזנה לכתבה                6:16   1x
   Playing:    [||] [-10] ====----  1:23 / 6:16 [+10]  1x

   RTL page; the progress track itself runs left-to-right like every media
   scrubber, which is also what keeps the seek maths simple.
   ============================================================================= */

.fa-aud {
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 4px 2px 8px;
    font-family: inherit;
    line-height: 1.2;
}

/* ---- play / pause ---- */
.fa-aud-play {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2980b9;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fa-aud-play:hover { background: #20648f; }
.fa-aud-play svg { width: 13px; height: 13px; fill: currentColor; display: block; }

/* ---- label, visible only until playback starts ---- */
.fa-aud-label {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: #33475b;
    white-space: nowrap;
}

.fa-aud.is-open .fa-aud-label { display: none; }

/* ---- skip buttons, revealed with the track ---- */
.fa-aud-skip {
    flex: 0 0 auto;
    display: none;
    padding: 0 4px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #6b7783;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fa-aud-skip:hover { color: #2980b9; }
.fa-aud.is-open .fa-aud-skip { display: block; }

/* ---- progress track ---- */
.fa-aud-track {
    display: none;
    flex: 1 1 auto;
    direction: ltr;
    position: relative;
    height: 4px;
    min-width: 60px;
    border-radius: 2px;
    background: #dfe3e8;
    cursor: pointer;
    touch-action: none;
}

.fa-aud.is-open .fa-aud-track { display: block; }

/* Widens the pointer/touch target without adding visible height. */
.fa-aud-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -9px;
    bottom: -9px;
}

.fa-aud-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: 2px;
    background: #2980b9;
    transition: width .1s linear;
}

.fa-aud-fill::after {
    content: "";
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2980b9;
}

/* ---- times ---- */
.fa-aud-time {
    flex: 0 0 auto;
    margin-inline-start: auto;
    font-size: 12px;
    color: #6b7783;
    direction: ltr;
    unicode-bidi: embed;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fa-aud.is-open .fa-aud-time { margin-inline-start: 0; }

/* ---- speed ---- */
.fa-aud-rate {
    flex: 0 0 auto;
    min-width: 34px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid #d5dbe1;
    border-radius: 11px;
    background: #fff;
    color: #6b7783;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.fa-aud-rate:hover { border-color: #2980b9; color: #2980b9; }

/* ---- focus, keyboard users ---- */
.fa-aud-play:focus-visible,
.fa-aud-skip:focus-visible,
.fa-aud-rate:focus-visible,
.fa-aud-track:focus-visible {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}

/* Waiting for playback to actually begin. */
.fa-aud.is-busy .fa-aud-play { opacity: .55; pointer-events: none; }

/* ---- narrow screens: keep every control, tighten the spacing ---- */
@media (max-width: 480px) {
    .fa-aud { gap: 8px; }
    .fa-aud-label { font-size: 12.5px; }
    .fa-aud-skip { padding: 0 2px; font-size: 11px; }
    .fa-aud-time { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .fa-aud-fill { transition: none; }
}
