/* BibleSlide Reviews. Palette = the three official colours (navy #0b2454, blue #0649b8, gold #e5a51b) with the
   home page's neutrals. Works inside the home page (.bsh tokens) and inside the app (own fallbacks). */
.bsrv, .bsrv-dialog {
  --rv-navy: var(--bsh-ink, #0b2454);
  --rv-blue: var(--bsh-blue, #0649b8);
  --rv-blue-2: var(--bsh-blue-2, #043a96);
  --rv-gold: var(--bsh-gold, #e5a51b);
  --rv-text: var(--bsh-text, #2a3350);
  --rv-muted: var(--bsh-muted, #475569);
  --rv-line: var(--bsh-line, #e2e8f0);
  --rv-ivory: var(--bsh-ivory, #f8fafc);
}
.bsrv { background: var(--rv-ivory); }
.bsrv-wrap { max-width: 980px; }
.bsrv-head { text-align: center; margin-bottom: 1.5rem; }
.bsrv-head .bsh-gold-rule { display: block; margin: 0 auto 1rem; }
.bsrv-intro { margin: .75rem auto 0; max-width: 40rem; color: var(--rv-muted); }
.bsrv-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1.25rem; margin: 0 0 1.5rem; }
.bsrv-avg { margin: 0; color: var(--rv-navy); font-size: 1.1rem; }
.bsrv-avg strong { font-size: 2.4rem; line-height: 1; }
.bsrv-count { margin: 0; color: var(--rv-muted); }
.bsrv-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.bsrv-star { fill: none; stroke: var(--rv-gold); stroke-width: 1.5; stroke-linejoin: round; }
.bsrv-star.is-full { fill: var(--rv-gold); }
.bsrv-star.is-half { fill: var(--rv-gold); fill-opacity: .5; }
.bsrv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.bsrv-card { margin: 0; padding: 1.25rem; background: #fff; border: 1px solid var(--rv-line); border-radius: 14px; box-shadow: 0 14px 34px -26px rgba(11, 36, 84, .45); display: flex; flex-direction: column; gap: .6rem; }
.bsrv-text { margin: 0; color: var(--rv-text); }
.bsrv-text p { margin: 0; overflow-wrap: anywhere; }
.bsrv-by { margin-top: auto; display: flex; flex-wrap: wrap; gap: .1rem .6rem; align-items: baseline; font-size: .875rem; color: var(--rv-muted); }
.bsrv-by strong { color: var(--rv-navy); }
.bsrv-link { margin-left: auto; padding: .25rem 0; background: none; border: 0; color: var(--rv-muted); text-decoration: underline; font: inherit; font-size: .8rem; cursor: pointer; min-height: 32px; }
.bsrv-link:hover { color: var(--rv-blue); }
.bsrv-empty, .bsrv-note { text-align: center; color: var(--rv-muted); max-width: 42rem; margin: 0 auto 1.25rem; }
.bsrv-note { font-size: .875rem; margin: 1rem auto 0; }
.bsrv-more, .bsrv-actions { text-align: center; margin: 1.5rem 0 0; }
.bsrv-list + .bsrv-more { margin-top: 2rem; }
.bsrv a:focus-visible, .bsrv button:focus-visible, .bsrv-dialog :is(a, button, input, textarea, select):focus-visible { outline: 3px solid var(--rv-blue); outline-offset: 2px; }

/* dialog */
.bsrv-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--rv-text); box-shadow: 0 40px 90px -30px rgba(11, 36, 84, .6); font: 400 1rem/1.5 var(--bsh-sans, "Inter", system-ui, sans-serif); }
.bsrv-dialog::backdrop { background: rgba(11, 36, 84, .55); }
.bsrv-dlg-in { padding: 1.25rem 1.25rem 1.5rem; overflow-y: auto; max-height: calc(100vh - 24px); }
.bsrv-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.bsrv-dlg-title { margin: 0; font-size: 1.25rem; color: var(--rv-navy); }
.bsrv-x { width: 44px; height: 44px; border: 1px solid var(--rv-line); border-radius: 10px; background: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--rv-navy); }
.bsrv-form { display: grid; gap: 1rem; }
.bsrv-field { display: grid; gap: .35rem; }
.bsrv-field > label, .bsrv-rate legend { font-weight: 600; color: var(--rv-navy); }
.bsrv-dialog :is(input[type="text"], textarea, select) { width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--rv-line); border-radius: 10px; font: inherit; color: var(--rv-text); background: #fff; }
.bsrv-dialog textarea { resize: vertical; min-height: 7rem; }
.bsrv-help { font-size: .85rem; color: var(--rv-muted); }
.bsrv-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.bsrv-check input { margin-top: .25rem; width: 18px; height: 18px; flex: none; accent-color: var(--rv-blue); }
.bsrv-consent { padding: .75rem; background: var(--rv-ivory); border: 1px solid var(--rv-line); border-radius: 10px; }
.bsrv-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bsrv-rate { display: flex; flex-wrap: wrap; gap: 2px; border: 0; padding: 0; margin: 0; }
.bsrv-rate legend { width: 100%; padding: 0; margin-bottom: .25rem; }
.bsrv-rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bsrv-rate label { display: inline-grid; place-items: center; width: 44px; height: 44px; cursor: pointer; border-radius: 10px; }
.bsrv-rate label .bsrv-star { width: 32px; height: 32px; fill: none; }
.bsrv-rate label.is-on .bsrv-star { fill: var(--rv-gold); }
.bsrv-rate input:focus-visible + label { outline: 3px solid var(--rv-blue); outline-offset: 2px; }
.bsrv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bsrv-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.bsrv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6em 1.2em; border-radius: 10px; border: 1.5px solid var(--rv-line); background: #fff; color: var(--rv-navy); font: 600 1rem/1.2 inherit; text-decoration: none; cursor: pointer; }
.bsrv-dialog .bsrv-btn-primary, .bsrv-dialog a.bsrv-btn-primary { background: var(--rv-blue); border-color: var(--rv-blue); color: #fff; }
.bsrv-dialog .bsrv-btn-primary:hover { background: var(--rv-blue-2); color: #fff; }
.bsrv-dialog a.bsrv-btn:not(.bsrv-btn-primary) { color: var(--rv-blue); }
.bsrv-btn-danger { border-color: var(--rv-navy); }
.bsrv-btn:disabled { opacity: .55; cursor: progress; }
.bsrv-err { margin: 0; color: #b42318; font-weight: 600; }
.bsrv-err:empty, .bsrv-ok:empty { display: none; }
.bsrv-ok { margin: 0; color: var(--rv-navy); font-weight: 600; padding: .6rem .8rem; background: rgba(6, 73, 184, .08); border-radius: 10px; }
.bsrv-msg { margin: 0 0 1rem; }
.bsrv-status { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: var(--rv-ivory); border-left: 4px solid var(--rv-gold); }
.bsrv-status.is-approved { border-left-color: var(--rv-blue); }
@media (max-width: 520px) { .bsrv-row .bsrv-btn { flex: 1 1 100%; } .bsrv-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { .bsrv-card { transition: transform .18s ease, box-shadow .18s ease; } .bsrv-card:hover { transform: translateY(-2px); } }
/* in the app (light theme) the dialog keeps its own white surface */
