/* ============================================================
   Sticky Audio Player for Al7an Library — RTL, Purple Theme
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   Site purple palette (mirrors #7e4296 from la7n-page-head.php)
   ────────────────────────────────────────────────────────────── */
:root {
    --player-slate-dark: #0f172a;
    /* Slate 900 — player bg */
    --player-slate-mid: #334155;
    /* Slate 700 — border/track */
    --player-slate-muted: #94a3b8;
    /* Slate 400 — muted text */
    --player-accent: #3b82f6;
    /* Neutral blue accent */
    --player-fill: 0%;
}


/* ────────────────────────────────────────────────────────────
   Inline Play Button — prominent primary CTA
   ──────────────────────────────────────────────────────────── */
.la7n-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    background: var(--player-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.la7n-play-btn:hover,
.la7n-play-btn:focus-visible {
    background: #1e293b;
    /* Neutral dark slate */
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    outline: none;
}

.la7n-play-btn .la7n-play-btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.la7n-play-btn.is-active {
    background: var(--player-accent);
}

/* SoundCloud inline promo */
.la7n-soundcloud-promo {
    font-size: 0.85rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.la7n-soundcloud-promo a {
    color: var(--player-accent);
    font-weight: 600;
    text-decoration: none;
}

.la7n-soundcloud-promo a:hover {
    text-decoration: underline;
}

/* ────────────────────────────────────────────────────────────
   Recording row in accordion body — full-width RTL card
   ──────────────────────────────────────────────────────────── */
.la7n-recording-row {
    display: flex;
    flex-direction: column;
    /* Stack by default for small screens */
    align-items: stretch;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 12px;
    width: 100%;
}

@media (min-width: 768px) {
    .la7n-recording-row {
        flex-direction: row;
        /* Side-by-side on larger screens */
        align-items: center;
        justify-content: space-between;
    }
}

.la7n-recording-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    /* color will come from the parent class (e.g. .bg-la7n-light) */
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1 1 auto;
    min-width: 0;
}

.la7n-recording-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Justify buttons to the end */
    gap: 10px;
    flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   Sticky Global Player Bar
   ──────────────────────────────────────────────────────────── */
#la7n-global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Maximum CSS z-index — beats OneSignal bell, chat widgets, etc. */
    z-index: 2147483647;
    background: var(--player-slate-dark);
    color: #fff;
    border-top: 2px solid var(--player-slate-mid);
    padding: 10px 20px;
    display: none;
    /* shown via .visible */
    flex-direction: column;
    /* outer: single column (row inside) */
    gap: 4px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55);
    direction: rtl;
}

#la7n-global-player.visible {
    display: flex;
}


/* Main inner row: track info | center controls | speed+close */
.la7n-player-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
}

/* ── Track info (right side in RTL) ── */
.la7n-player-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 0 0 180px;
    /* fixed width — no shrink/grow confusion */
    text-align: right;
}

.la7n-player-title {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.la7n-player-subtitle {
    font-size: 0.72rem;
    color: var(--player-slate-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* ── Center: controls + progress (takes all remaining space) ── */
.la7n-player-center {
    flex: 1 1 0;
    /* fills the middle */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    direction: ltr;
    /* keep progress bar L→R */
    min-width: 0;
}

.la7n-player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ── Player buttons ── */
.la7n-player-btn {
    background: none;
    border: none;
    color: var(--player-slate-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: color 0.18s, transform 0.15s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}


.la7n-player-btn:hover {
    color: #fff;
    transform: scale(1.18);
}

.la7n-skip-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Play / Pause circle */
.la7n-player-btn.play-pause-btn {
    background: #fff;
    color: var(--player-slate-dark);
    font-size: 1rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.15s, background 0.2s;
    padding: 0;
    flex-shrink: 0;
}


.la7n-player-btn.play-pause-btn:hover {
    background: var(--player-accent);
    color: #fff;
    transform: scale(1.1);
}


/* ── Progress row ── */
.la7n-player-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.la7n-time {
    font-size: 0.7rem;
    color: var(--player-slate-muted);
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* Slider — always shows thumb and filled track (fill driven by JS via --player-fill) */
.la7n-progress-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    /* JS updates --player-fill on this element via style.setProperty */
    background: linear-gradient(to right,
            var(--player-accent) var(--player-fill, 0%),
            var(--player-slate-mid) var(--player-fill, 0%));
    outline: none;
    cursor: pointer;
    transition: height 0.15s;
}


.la7n-progress-range:hover {
    height: 6px;
}

/* Thumb — always visible */
.la7n-progress-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid var(--player-accent);
}


/* ── Right controls (left side in RTL): Speed + Close ── */
.la7n-player-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    /* don't grow/shrink */
    flex-direction: row;
    direction: ltr;
    /* keep select/close in natural order */
}

.la7n-speed-select {
    background: var(--player-slate-mid);
    color: #fff;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.78rem;
    cursor: pointer;
    outline: none;
    transition: background 0.18s;
}

.la7n-speed-select:hover {
    background: var(--player-accent);
}


/* ── Responsive ── */
@media (max-width: 576px) {
    .la7n-player-info {
        display: none;
    }

    .la7n-player-right {
        flex: 0 0 auto;
    }

    #la7n-global-player {
        padding: 8px 10px;
        gap: 8px;
    }
}