/* Faith layer: liturgical banner + nightly examen sheet.
   Uses the Quest tokens from quest.css when present (always dark); the
   fallbacks match those tokens so the module also stands alone.
   --season is set per liturgical colour; nothing else in the app reads it
   unless a page opts in (e.g. as an accent). */

.lit-banner, .lit-sheet {
  --lit-surface: var(--surface, #161A2E);
  --lit-surface2: var(--surface2, #12152A);
  --lit-ink: var(--ink, #F4F5FF);
  --lit-muted: var(--muted, #A2A8CC);
  --lit-line: var(--line, #272C4D);
  --season: #A2A8CC;
}
[data-lit-color="violet"] { --season: #B48CFF; }
[data-lit-color="rose"]   { --season: #FF8FC0; }
[data-lit-color="white"]  { --season: #F3E2B3; }   /* white/gold vestments, warm on dark */
[data-lit-color="gold"]   { --season: #FFC84A; }
[data-lit-color="green"]  { --season: #3DDC97; }
[data-lit-color="red"]    { --season: #FF6B6B; }
[data-lit-color="black"]  { --season: #A2A8CC; }

/* ---- Banner ---------------------------------------------------------- */
.lit-banner {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 14px 18px 14px 20px; border-radius: 20px;
  background: var(--lit-surface); color: var(--lit-ink);
  box-shadow: inset 0 0 0 1px var(--lit-line);
  font-family: 'Inter', system-ui, sans-serif; overflow: hidden;
}
.lit-banner::before {            /* the season's colour as a slim accent bar */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--season);
}
.lit-banner[hidden] { display: none !important; }
.lit-mark {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; color: var(--season);
  background: color-mix(in srgb, var(--season) 16%, transparent);
}
.lit-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lit-season {
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--season);
}
.lit-day { font-family: 'Unbounded', 'Inter', sans-serif; font-weight: 700; font-size: 17px; line-height: 1.2; }
.lit-saint { font-size: 14px; font-weight: 600; color: var(--lit-muted); line-height: 1.35; }
.lit-saint b { color: var(--lit-ink); font-weight: 700; }
.lit-book {
  align-self: flex-start; margin-top: 4px; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; color: var(--lit-ink);
  background: color-mix(in srgb, var(--season) 22%, transparent);
}
.lit-examen-btn {
  flex-shrink: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 0;
  background: transparent; color: var(--lit-ink); cursor: pointer;
  font: 700 14px 'Inter', system-ui, sans-serif;
  box-shadow: inset 0 0 0 1px var(--lit-line);
}
.lit-examen-btn:focus-visible, .lit-sheet button:focus-visible { outline: 3px solid var(--season); outline-offset: 2px; }

/* ---- Nightly examen sheet ------------------------------------------- */
.lit-backdrop {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  padding: 16px; background: rgba(5, 6, 14, .72);
}
.lit-sheet {
  width: min(560px, 100%); border-radius: 28px; padding: 28px 26px 22px;
  background: var(--lit-surface); color: var(--lit-ink);
  box-shadow: inset 0 0 0 1px var(--lit-line), 0 24px 60px rgba(0,0,0,.5);
  font-family: 'Inter', system-ui, sans-serif; display: flex; flex-direction: column; gap: 18px;
}
.lit-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lit-sheet-kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--season); }
.lit-steps { display: flex; gap: 6px; }
.lit-steps span { width: 28px; height: 6px; border-radius: 3px; background: var(--lit-line); }
.lit-steps span.on { background: var(--season); }
.lit-prompt { display: flex; align-items: center; gap: 18px; min-height: 120px; }
.lit-prompt-art { flex-shrink: 0; color: var(--season); }
.lit-prompt-text { font-family: 'Unbounded', 'Inter', sans-serif; font-weight: 700; font-size: 26px; line-height: 1.2; }
.lit-prompt-help { font-size: 15px; font-weight: 600; color: var(--lit-muted); }
.lit-timer { position: relative; height: 8px; border-radius: 999px; background: var(--lit-surface2); overflow: hidden; }
.lit-timer i { position: absolute; inset: 0; transform-origin: left; background: var(--season); }
.lit-actions { display: flex; gap: 10px; }
.lit-actions button {
  min-height: 52px; border-radius: 14px; border: 0; cursor: pointer;
  font: 800 16px 'Inter', system-ui, sans-serif;
}
.lit-say { padding: 0 16px; background: transparent; color: var(--lit-ink); box-shadow: inset 0 0 0 1px var(--lit-line); display: inline-flex; align-items: center; gap: 8px; }
.lit-next { flex: 1; background: var(--season); color: #0D0F1C; }
.lit-close { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--lit-muted); cursor: pointer; box-shadow: inset 0 0 0 1px var(--lit-line); }
.lit-note { font-size: 13px; font-weight: 600; color: var(--lit-muted); text-align: center; }

@media (max-width: 480px) {
  .lit-banner { flex-wrap: wrap; }
  .lit-examen-btn { width: 100%; }
  .lit-prompt-text { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .lit-timer i { transition: none !important; }
}
