/*
 * FAD-44: the web player, More like this to buy, and the /library page.
 * Loaded by story pages whose panel sells, and by /library. Colours are the
 * story page's (FAD-23 contrast pass): #08386E on white 11.6:1, #b54700 with
 * white 5.43:1, #444 on white 9.7:1, #b00020 on white 6.6:1. Every control is
 * at least 44 by 44 px with a 3 px focus ring (WCAG 2.5.5 / 2.4.7).
 */

/* ---- Player ---------------------------------------------------------------- */
.wl-player {
    margin: 16px 0 0;
    padding: 16px;
    border: 2px solid #08386E;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}
.wl-player[hidden] { display: none !important; }
.wl-player-label {
    margin: 0 0 12px;
    font-size: 16px;
    color: #222;
    overflow-wrap: anywhere;
}
#wl-player-label { font-weight: 700; }
.wl-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.wl-player .wl-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}
.wl-position {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 0;
}
.wl-position input[type="range"] {
    flex: 1;
    min-width: 0;
    height: 44px;
    margin: 0;
    accent-color: #08386E;
}
.wl-position input[type="range"]:focus-visible {
    outline: 3px solid #08386E;
    outline-offset: 2px;
}
.wl-player .wl-time {
    font-size: 16px;
    color: #222;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- More like this (R21) ------------------------------------------------------ */
.wl-more {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid #ccc;
    text-align: left;
}
.wl-more[hidden], .wl-more-item[hidden] { display: none !important; }
.wl-more-heading {
    margin: 0 0 12px;
    font-size: 20px;
    color: #08386E;
}
.wl-more .wl-hint { margin: 4px 0 8px; font-size: 15px; color: #444; }
.wl-more .wl-error { margin: 0 0 8px; color: #b00020; font-weight: 700; }
.wl-more .wl-error:empty { margin: 0; }
.wl-more-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.wl-more-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
}
.wl-more-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: #08386E;
    font-weight: 700;
    text-decoration: underline;
}
.wl-more-link:focus-visible { outline: 3px solid #08386E; outline-offset: 2px; }
.wl-more-cover {
    width: 64px;
    height: 64px;
    flex: none;
    object-fit: cover;
    border-radius: 6px;
}
.wl-more-item .wl-note { margin: 0; font-size: 15px; color: #444; }
.wl-more-item .wl-button { margin-top: auto; }
.wl-more-owned { display: inline-block; text-align: center; text-decoration: none; }

/* ---- /library ------------------------------------------------------------------ */
/* feed-styles.css gives every page the blue gradient; content sits on a
   white card, as on story pages (.container). Without it the navy headings
   and dark text sat on blue (David, 2026-10-30). */
.lib-page .lib-main {
    max-width: 760px;
    margin: 0 auto 40px;
    padding: 32px 32px 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(8, 56, 110, 0.4);
    color: #222;
    font-size: 17px;
}
@media (max-width: 600px) {
    .lib-page { padding-left: 12px; padding-right: 12px; }
    .lib-page .lib-main { padding: 20px 16px 28px; border-radius: 14px; }
}
.lib-page .lib-main h1 { color: #08386E; font-size: 30px; margin: 0 0 8px; text-shadow: none; }
.lib-page .lib-main h2 { color: #08386E; font-size: 22px; margin: 28px 0 12px; }
.lib-page [hidden] { display: none !important; }
.lib-page .wl-button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
}
.lib-page .wl-primary { background: #b54700; color: #fff; border: 2px solid #b54700; }
.lib-page .wl-secondary { background: #fff; color: #08386E; border: 2px solid #08386E; }
.lib-page .wl-button:focus-visible,
.lib-page .lib-main a:focus-visible,
.lib-page input:focus-visible { outline: 3px solid #08386E; outline-offset: 3px; }
/* Scoped to the card: the shared footer's buttons keep their own colours
   ("Donate to Live Like Lou" is white on navy; David, 2026-10-30). */
.lib-page .lib-main a:not(.wl-button) { color: #08386E; }
.lib-page .wl-age { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 4px; font-weight: 700; }
.lib-page .wl-age input { width: 28px; height: 28px; margin: 0; flex: none; accent-color: #08386E; }
.lib-page .wl-age input[aria-invalid="true"] { outline: 3px solid #b00020; outline-offset: 2px; }
.lib-page .wl-hint { font-size: 15px; color: #444; }
.lib-page .wl-error { color: #b00020; font-weight: 700; }
.lib-page .wl-error:empty, .lib-page .wl-status:empty { margin: 0; }
.lib-page .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.lib-field { display: block; margin: 12px 0 6px; font-weight: 700; }
.lib-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    min-height: 48px;
    margin: 0 0 12px;
    padding: 10px 12px;
    font: inherit;
    border: 2px solid #555;
    border-radius: 8px;
}
.lib-input[aria-invalid="true"] { border-color: #b00020; }
.lib-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lib-page .lib-main .lib-panel h2 { margin-top: 0; }
.lib-panel {
    margin: 16px 0;
    padding: 16px;
    border: 2px solid #08386E;
    border-radius: 12px;
    background: #fff;
}
.lib-account { margin: 0 0 8px; }
.lib-link {
    min-height: 44px;
    padding: 0 4px;
    background: none;
    border: 0;
    color: #08386E;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.lib-list { list-style: none; margin: 0; padding: 0; }
.lib-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid #ddd;
}
.lib-cover {
    width: 88px;
    height: 88px;
    flex: none;
    object-fit: cover;
    border-radius: 8px;
    background: #eef2f7;
}
.lib-body { flex: 1; min-width: 0; }
.lib-title { margin: 0 0 4px; font-size: 19px; overflow-wrap: anywhere; }
.lib-meta { margin: 0 0 8px; font-size: 15px; color: #444; }
.lib-state { margin: 12px 0; }
.lib-support { margin-top: 32px; font-size: 15px; color: #444; }
@media (max-width: 420px) {
    .lib-cover { width: 64px; height: 64px; }
    .wl-controls .wl-button { padding: 12px 16px; }
}
.lib-page .skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    padding: 12px 16px;
    background: #fff;
    color: #08386E;
    font-weight: 700;
    border-radius: 8px;
    z-index: 10;
}
.lib-page .skip-link:focus { top: 16px; }
.lib-pw-rules { list-style: none; margin: 0 0 12px; padding: 0; font-size: 15px; color: #444; }
.lib-rule { margin: 0 0 4px; }
.lib-rule-mark { display: inline-block; width: 1.2em; font-weight: 700; color: #444; }
.lib-rule-ok, .lib-rule-ok .lib-rule-mark { color: #08386E; }
