/* CBM Wednesday Study audio player (js/audio-player.js) */

.cbmws-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    margin: 0 0.15rem 0 0.35rem;
    padding: 0;
    border: 1px solid var(--cbm-primary, #2F5233);
    border-radius: 50%;
    background: #fff;
    color: var(--cbm-primary, #2F5233);
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}
.cbmws-play:hover,
.cbmws-play.is-playing {
    background: var(--cbm-primary, #2F5233);
    color: #fff;
}

.cbmws-player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom));
    background: var(--cbm-primary, #2F5233);
    color: #fff;
    box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.25);
}
.cbmws-player[hidden] { display: none; }
.cbmws-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 1140px;
    margin: 0 auto;
}
.cbmws-note { color: #f0c040; font-size: 1.3rem; }
.cbmws-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    font-weight: 600;
}
.cbmws-btns { display: flex; gap: 0.25rem; flex: 0 0 auto; }
.cbmws-btns button,
.cbmws-resume {
    min-width: 2.4rem;
    min-height: 2.2rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 0.25rem;
    background: transparent;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}
.cbmws-btns button:hover,
.cbmws-resume:hover { background: rgba(255, 255, 255, 0.15); }
.cbmws-resume { display: block; margin: 0.35rem auto 0; }
.cbmws-resume[hidden] { display: none; }
.cbmws-player audio {
    display: block;
    width: 100%;
    max-width: 1140px;
    height: 2.4rem;
    margin: 0.35rem auto 0;
}
/* keep the page's end (footer, last studies) reachable above the bar */
body.cbmws-open { padding-bottom: 8rem; }

@media (max-width: 575.98px) {
    .cbmws-player { padding-left: 0.5rem; padding-right: 0.5rem; }
    .cbmws-row { gap: 0.3rem; }
    .cbmws-note, .cbmws-wide { display: none; }
    .cbmws-title { font-size: 0.8rem; }
    .cbmws-btns { gap: 0.2rem; }
    .cbmws-btns button { min-width: 2.2rem; padding: 0.2rem 0.35rem; }
    /* the site title is wider than a phone screen, which widens the page
       (and the fixed bar) past the screen edge */
    .navbar-brand { white-space: normal; max-width: calc(100% - 5rem); font-size: 1rem; line-height: 1.3; }
}
