/* calendar.css - the church year, readings, saints and devotional pages (plan T1, T2, T3, T8). Uses the shared
   variables of christian.css (--cx-ink, --cx-muted, --cx-line, --cx-card, --cx-soft, --cx-accent, --cx-serif). */

/* liturgical colour chips */
.cx-col { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .4em; vertical-align: -.05em; border: 1px solid rgba(0,0,0,.25); flex: none; }
.cx-col-white { background: #fbfaf5; }
.cx-col-gold { background: #d4a72c; }
.cx-col-green { background: #2e7d32; }
.cx-col-violet, .cx-col-purple { background: #6a1b9a; }
.cx-col-blue { background: #1f4fa3; }
.cx-col-rose { background: #e48aa8; }
.cx-col-red { background: #c62828; }
.cx-col-black { background: #111; }
.cx-col-none { background: transparent; border-style: dashed; }
html[data-fs-theme="dark"] .cx-col { border-color: rgba(255,255,255,.35); }

/* five calendars side by side */
.cx-calgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.cx-calcard { border: 1px solid var(--cx-line); border-radius: var(--cx-radius, 10px); background: var(--cx-card); padding: 12px 14px; min-width: 0; }
.cx-calcard header small { display: block; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; color: var(--cx-muted); }
.cx-calcard h3 { font-family: var(--cx-serif); font-size: 1.05rem; margin: 4px 0 6px; line-height: 1.3; }
.cx-calmeta { font-size: .86rem; color: var(--cx-muted); margin: 4px 0; }
.cx-calalso { list-style: none; margin: 6px 0; padding: 0; font-size: .9rem; }
.cx-calalso li { margin: 3px 0; }
.cx-calalso small { color: var(--cx-muted); }
.cx-calfast { font-size: .88rem; margin: 6px 0 0; }
.cx-calob { font-size: .85rem; font-weight: 600; color: var(--cx-accent-ink); margin: 6px 0 0; }
.cx-calabout { font-size: .9rem; margin: 8px 0 0; }

/* month grid */
.cx-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 10px 0; }
.cx-month-h { font-size: .75rem; text-align: center; color: var(--cx-muted); padding: 2px 0; }
.cx-month-d { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 74px; padding: 4px 5px; border: 1px solid var(--cx-line); border-radius: 6px; background: var(--cx-card); color: var(--cx-ink); text-decoration: none; font-size: .72rem; line-height: 1.2; overflow: hidden; }
.cx-month-d b { font-size: .85rem; }
.cx-month-d .cx-col { position: absolute; top: 6px; right: 2px; }
.cx-month-d span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cx-month-d.is-feast { background: var(--cx-soft); }
.cx-month-d.is-sun b { color: var(--cx-accent-ink); }
.cx-month-d.is-today { outline: 2px solid var(--cx-accent); outline-offset: -2px; }
.cx-month-d:hover { border-color: var(--cx-accent); }
.cx-month-fast { font-style: normal; font-size: .65rem; color: var(--cx-muted); margin-top: auto; }
@media (max-width: 560px) {
  .cx-month-d { min-height: 46px; font-size: .62rem; padding: 3px; }
  .cx-month-d span { display: none; }
  .cx-month-d.is-feast span { display: -webkit-box; -webkit-line-clamp: 2; }
}

/* year view */
.cx-calyear { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.cx-calmonth h3 { font-family: var(--cx-serif); font-size: 1.05rem; margin: 10px 0 4px; }
.cx-calmonth ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.cx-calmonth li { margin: 3px 0; }
.cx-calmonth a { color: var(--cx-ink); text-decoration: none; }
.cx-calmonth a:hover { text-decoration: underline; }
.cx-calmonth time { display: inline-block; min-width: 3.4em; color: var(--cx-muted); }
.cx-keydates th { text-align: left; font-weight: 500; }
.cx-caltabs { margin: 8px 0 4px; }
.cx-tablewrap { overflow-x: auto; }
.cx-monthlist td, .cx-monthlist th { vertical-align: top; }
.cx-caljump { margin-top: 12px; flex-wrap: wrap; }
.cx-caljump label { align-self: center; margin-right: 8px; }

/* topic tool and lists */
.cx-datelist { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.cx-datelist a { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; text-decoration: none; color: var(--cx-ink); padding: 6px 8px; border: 1px solid var(--cx-line); border-radius: 6px; background: var(--cx-card); }
.cx-datelist a span { color: var(--cx-muted); }

/* readings */
.cx-reading { border-top: 1px solid var(--cx-line); padding: 10px 0; }
.cx-reading h3 { font-size: 1rem; margin: 0 0 4px; }
.cx-reading h3 small { font-weight: 400; color: var(--cx-muted); }
.cx-reading .cx-passage { font-family: var(--cx-serif); font-size: 1.02rem; line-height: 1.65; margin: 6px 0; }
.cx-reading .cx-passage sup { font-size: .65em; color: var(--cx-muted); margin-right: 2px; }
.cx-passage-more { font-size: .9rem; }
.cx-tradtabs { position: sticky; top: 0; z-index: 2; background: var(--cx-bg, inherit); padding: 6px 0; }

/* saints */
.cx-saint { border: 1px solid var(--cx-line); border-radius: var(--cx-radius, 10px); background: var(--cx-card); padding: 14px 16px; margin: 12px 0; }
.cx-saint h2, .cx-saint h3 { font-family: var(--cx-serif); margin: 0 0 4px; }
.cx-saint .cx-life { color: var(--cx-muted); font-size: .9rem; margin: 0 0 6px; }
.cx-saint blockquote { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--cx-gold, #b8860b); font-family: var(--cx-serif); font-size: .97rem; }
.cx-saint blockquote footer { font-family: inherit; font-size: .82rem; color: var(--cx-muted); margin-top: 6px; }
.cx-calbadges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cx-calbadges span { font-size: .75rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--cx-line); background: var(--cx-soft); }
.cx-saintlist { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 24px; }
.cx-saintlist li { break-inside: avoid; margin: 0 0 6px; }
.cx-saintlist small { color: var(--cx-muted); }

/* devotional */
.cx-devo { max-width: 46rem; }
.cx-devo .cx-devo-verse { font-family: var(--cx-serif); font-style: italic; font-size: 1.15rem; margin: 6px 0 2px; }
.cx-devo .cx-devo-ref { color: var(--cx-muted); font-size: .9rem; margin: 0 0 12px; }
.cx-devo p { line-height: 1.7; }
.cx-devo .cx-devo-credit { font-size: .82rem; color: var(--cx-muted); border-top: 1px solid var(--cx-line); padding-top: 8px; }
.cx-dl-verse { margin: 6px 0; line-height: 1.65; font-family: var(--cx-serif); }
.cx-dl-verse a { font-family: system-ui, sans-serif; font-size: .8rem; color: var(--cx-muted); margin-left: 4px; }
.cx-switch { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }
/* Phones: the four-column day list is wider than the screen; show each day as a short stacked row instead. */
@media (max-width: 560px) {
  .cx-monthlist thead { display: none; }
  .cx-monthlist tr { display: grid; grid-template-columns: 3.4em 1fr; column-gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--cx-line); }
  .cx-monthlist th, .cx-monthlist td { display: block; padding: 0; border: 0; }
  .cx-monthlist th[scope=row] { grid-row: span 3; }
  .cx-monthlist td:nth-child(n+3) { grid-column: 2; font-size: .84rem; color: var(--cx-muted); }
  .cx-monthlist td:empty { display: none; }
}
