/* ==========================================================================
   Listen to this blog — audio player widget
   Renders controls only. No article text is injected, duplicated or hidden.
   ========================================================================== */

.lp {
    --lp-accent: #F07100;
    --lp-accent-dark: #d96500;
    --lp-border: #ececf1;
    --lp-muted: #6b6b78;

    display: block;
    margin: 0 0 26px;
    padding: 14px 16px;
    border: 1px solid var(--lp-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

/* ── Header row ── */
.lp__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.lp__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(240, 113, 0, 0.12);
    color: var(--lp-accent);
    flex: 0 0 auto;
}

.lp__title {
    font-size: 15px;
    font-weight: 700;
    color: #1b1b1b;
    line-height: 1.2;
}

/* Speed toggle sits at the far right of the header */
.lp__speed {
    margin-left: auto;
    min-width: 52px;
    padding: 5px 10px;
    border: 1px solid var(--lp-border);
    border-radius: 999px;
    background: #fafafc;
    color: #33333a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.lp__speed:hover {
    border-color: var(--lp-accent);
    color: var(--lp-accent);
}

/* ── Controls row ── */
.lp__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--lp-border);
    border-radius: 50%;
    background: #fff;
    color: #33333a;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.lp__btn:hover {
    border-color: var(--lp-accent);
    color: var(--lp-accent);
}

.lp__btn--play {
    width: 42px;
    height: 42px;
    border-color: transparent;
    background: var(--lp-accent);
    color: #fff;
}

.lp__btn--play:hover {
    background: var(--lp-accent-dark);
    border-color: transparent;
    color: #fff;
}

/* Visible focus ring for keyboard users */
.lp__btn:focus-visible,
.lp__speed:focus-visible {
    outline: 2px solid var(--lp-accent);
    outline-offset: 2px;
}

/* Play / pause glyph swap is driven by the .is-playing state on the root */
.lp__pause { display: none; }
.lp.is-playing .lp__play { display: none; }
.lp.is-playing .lp__pause { display: block; }

/* ── Progress + time ── */
.lp__bar {
    flex: 1 1 auto;
    min-width: 0;
}

.lp__track {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: #ededf2;
    overflow: hidden;
}

.lp__fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--lp-accent);
    transition: width .15s linear;
}

.lp__time {
    margin-top: 6px;
    font-size: 12px;
    color: var(--lp-muted);
    font-variant-numeric: tabular-nums;
}

/* ── Mobile ── */
@media (max-width: 575px) {
    .lp { padding: 12px 13px; }
    .lp__controls { gap: 8px; }
    .lp__btn { width: 34px; height: 34px; }
    .lp__btn--play { width: 40px; height: 40px; }
    .lp__title { font-size: 14px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .lp__fill { transition: none; }
}
