/* RHYTHM BINGO CALLER (/rhythm-bingo). Made for a projector: large type, high contrast, and a white stage in both
   themes, because the notation is black and a classroom screen washes out a dark page. The set's cover color (set by
   bingo-caller.js as --rb-accent) marks the count-off, the buttons and the called board. */
.rb-caller { --rb-ink: #16161d; --rb-accent: #1e5aa8; --rb-accent-d: #153f77; --rb-line: #d9dae6; --rb-soft: #f4f5fa;
    max-width: 1080px; margin: 0 auto; background: #fff; color: var(--rb-ink); border: 1px solid var(--rb-line); border-radius: 16px;
    overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.06); display: flex; flex-direction: column; font-family: Inter, system-ui, sans-serif; }
.rb-caller [hidden] { display: none !important; }
.rb-top { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--rb-line); background: var(--rb-soft); }
.rb-brand b { font: 700 20px Fraunces, Georgia, serif; margin-right: 12px; }
.rb-brand span { color: #4b4b57; font-size: 14px; }
.rb-ctrls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 14px; }
.rb-ctrls label { display: inline-flex; align-items: center; gap: 6px; }
.rb-ctrls select, .rb-ctrls button { font: inherit; color: var(--rb-ink); padding: 6px 10px; border: 1px solid #b9bac8; border-radius: 8px; background: #fff; cursor: pointer; min-height: 36px; }
.rb-modes { display: inline-flex; }
.rb-modes button { border-radius: 0; margin-left: -1px; }
.rb-modes button:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.rb-modes button:last-child { border-radius: 0 8px 8px 0; }
.rb-modes button[aria-pressed="true"] { background: var(--rb-accent); color: #fff; border-color: var(--rb-accent); }
.rb-chk input { width: 18px; height: 18px; accent-color: var(--rb-accent); }
#rb-fs { font-size: 18px; line-height: 1; padding: 6px 11px; }

.rb-intro { text-align: center; padding: 48px 24px 40px; }
.rb-intro p { font-size: 18px; line-height: 1.5; max-width: 640px; margin: 0 auto 24px; }
.rb-intro .rb-small { font-size: 14px; color: #555; margin: 18px auto 0; }

.rb-main { display: grid; grid-template-columns: 1fr 270px; min-height: 520px; }
.rb-stage { padding: 20px 32px 24px; display: flex; flex-direction: column; min-width: 0; }
.rb-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
#rb-callno { font: 700 40px Fraunces, Georgia, serif; }
#rb-status { color: #4b4b57; font-size: 17px; }
#rb-back { margin-left: auto; font: inherit; font-size: 15px; padding: 8px 14px; border-radius: 8px; border: 1px solid #b9bac8; background: #fff; color: var(--rb-ink); cursor: pointer; }

.rb-countoff { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; height: 52px; opacity: .45; transition: opacity .15s; }
.rb-countoff::before { content: 'Count-off'; font: 700 13px Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #444; margin-right: 4px; }
.rb-countoff.live { opacity: 1; }
.rb-countoff i { font: 800 30px/52px Inter, sans-serif; font-style: normal; width: 52px; text-align: center; border-radius: 50%; color: #444; }
.rb-countoff i.on { background: var(--rb-accent); color: #fff; }

.rb-show { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 280px; }
.rb-q { display: flex; align-items: flex-start; width: min(100%, 900px); }
.rb-q .rp-tsw { width: 8.3%; flex: none; }
.rb-q .rp-barwrap { width: 91.7%; flex: none; position: relative; }
.rb-q svg { display: block; width: 100%; height: auto; overflow: visible; }
.rb-q .rp-count { position: relative; height: 60px; margin-top: 10px; font: 700 32px Inter, sans-serif; }
.rb-q .rp-count.rp-has-holds { height: 80px; }
.rb-q .rp-syl { position: absolute; top: 0; transform: translateX(-50%); min-width: 50px; height: 50px; line-height: 50px; text-align: center; }
.rb-q .rp-circ { border: 3px solid var(--rb-ink); border-radius: 50%; transition: background .08s; }
.rb-q .rp-kod.rp-circ { border: 0; border-radius: 10px; padding: 0 6px; white-space: nowrap; min-width: 0; }
.rb-q .rp-syl.now { background: var(--rb-accent); color: #fff; border-color: var(--rb-accent); }
.rb-q .rp-hold { position: absolute; top: 62px; border-top: 5px solid var(--rb-ink); border-radius: 3px; }
.rb-q .rb-hidden { font-size: 24px; font-weight: 600; color: #6b6b78; text-align: center; height: auto; }

.rb-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.rb-big { font: 700 20px Inter, sans-serif; padding: 14px 26px; border-radius: 12px; border: 2px solid var(--rb-ink); background: #fff; color: var(--rb-ink); cursor: pointer; min-width: 170px; }
.rb-primary { background: var(--rb-accent); border-color: var(--rb-accent); color: #fff; }
.rb-ghost { border-color: #9a9aa8; color: #333; }

.rb-side { border-left: 1px solid var(--rb-line); padding: 20px; background: var(--rb-soft); }
.rb-side h2 { font: 700 20px Fraunces, Georgia, serif; margin: 0 0 10px; color: var(--rb-ink); }
.rb-side p { font-size: 13px; color: #4b4b57; margin: 12px 0 0; }
.rb-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.rb-board button { font: 700 13px Inter, sans-serif; aspect-ratio: 1; padding: 0; min-width: 0; border-radius: 7px; border: 1px solid #a5a7bb; background: #fff; color: #6b6b78; }
.rb-board button.called { background: var(--rb-accent-d); border-color: var(--rb-accent-d); color: #fff; cursor: pointer; }
.rb-board button.viewing { outline: 3px solid #f59e0b; outline-offset: 1px; }
.rb-caller button:focus-visible, .rb-caller select:focus-visible { outline: 3px solid var(--rb-accent); outline-offset: 2px; }

/* full screen for the projector (or filling the window where element full screen is missing) */
.rb-caller:fullscreen, .rb-caller.rb-big { max-width: none; width: 100vw; height: 100vh; border-radius: 0; border: 0; }
.rb-caller.rb-big { position: fixed; inset: 0; z-index: 1000; }
.rb-caller:fullscreen .rb-main, .rb-caller.rb-big .rb-main { flex: 1; min-height: 0; }
.rb-caller:fullscreen #rb-callno { font-size: 56px; }
.rb-caller:fullscreen .rb-q { width: min(100%, 1200px); }
.rb-caller:fullscreen .rb-q .rp-count { font-size: 40px; height: 72px; }
.rb-caller:fullscreen .rb-q .rp-count.rp-has-holds { height: 96px; }
.rb-caller:fullscreen .rb-q .rp-syl { min-width: 62px; height: 62px; line-height: 62px; }
.rb-caller:fullscreen .rb-q .rp-hold { top: 76px; }

/* print the cards: four set covers */
.rb-sets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 18px 0 10px; }
.rb-set { display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--border, #e7e5e4); border-radius: 12px; overflow: hidden; background: var(--card, #fff); transition: transform .15s, box-shadow .15s; }
.rb-set:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.rb-set img { display: block; width: 100%; height: auto; }
.rb-set-t { padding: 10px 12px 4px; font-size: 13.5px; line-height: 1.35; flex: 1; }
.rb-set-t b { display: block; font-size: 15px; }
.rb-set-p { padding: 0 12px 12px; font-weight: 700; color: var(--accent, #0b7c72); }
.rb-bundle a, .rb-free a { font-weight: 600; }
.rb-page details { border-bottom: 1px solid var(--border, #e7e5e4); padding: 10px 0; }
.rb-page summary { cursor: pointer; font-weight: 600; }
.rb-page details p { margin: 8px 0 4px; }

@media (max-width: 900px) {
    .rb-main { grid-template-columns: 1fr; }
    .rb-side { border-left: 0; border-top: 1px solid var(--rb-line); }
    .rb-board { grid-template-columns: repeat(10, minmax(0, 1fr)); }
    .rb-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .rb-stage { padding: 16px; }
    #rb-callno { font-size: 30px; }
    .rb-q .rp-count { font-size: 18px; height: 40px; }
    .rb-q .rp-count.rp-has-holds { height: 52px; }
    .rb-q .rp-syl { min-width: 28px; height: 28px; line-height: 28px; }
    .rb-q .rp-circ { border-width: 2px; }
    .rb-q .rp-hold { top: 36px; border-top-width: 3px; }
    .rb-big { font-size: 17px; padding: 12px 18px; min-width: 0; flex: 1; }
    .rb-board { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .rb-countoff, .rb-q .rp-circ, .rb-set { transition: none; } }
/* a projector page: the floating donate button would sit on the called board */
.rb-page ~ #bmc-wbtn, body:has(.rb-page) #bmc-wbtn, body:has(.rb-page) iframe[title*="Buy Me"] { display: none !important; }
/* the content below the caller reads top to bottom, one section after another (no sidebar column) */
.rb-page .educational-content .content-wrapper { display: block; max-width: 960px; }
.rb-page .educational-content .guide-section { margin-bottom: 40px; }
.rb-page .educational-content .guide-section > p, .rb-page details { max-width: 72ch; }
.rb-buy p a { color: var(--accent, #0b7c72); }
