/* Plugin markup styles. Colours and fonts come from tokens.css — nothing
   is hard-coded here either. Kept deliberately quiet so it sits inside the
   existing cjas.no theme rather than fighting it. */

.cjas-card { background:var(--surface); border:1px solid var(--hairline);
  border-radius:var(--r-card); overflow:hidden; margin:0 0 20px; }

.cjas-day { margin:0; padding:12px 16px; font-family:var(--font-form); font-size:14px; }
.cjas-hijri { color:var(--text-muted); margin-inline-start:8px; }
.cjas-times { width:100%; border-collapse:collapse; font-family:var(--font-body); }
.cjas-times th { font-family:var(--font-form); font-size:11px; letter-spacing:1px;
  text-transform:uppercase; color:var(--text-muted); font-weight:500;
  text-align:right; padding:9px 16px; background:var(--tint-green); }
.cjas-times th:first-child { text-align:left; }
.cjas-times td { padding:11px 16px; border-top:1px solid var(--hairline);
  text-align:right; font-variant-numeric:tabular-nums; }
.cjas-times td:first-child { text-align:left; font-family:var(--font-head); font-weight:600; }
.cjas-times td.jam { color:var(--green); font-weight:700; }
.cjas-times tr.is-next { background:var(--green-soft); }
/* --gold-text, not --gold: #A0700F on cream is 4.12:1 and this is 13px text.
   The brand fill is untouched everywhere it is a fill. */
.cjas-override { margin:0; padding:10px 16px; font-family:var(--font-form);
  font-size:13px; color:var(--gold-text); background:var(--tint-cream); }

.cjas-next { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap;
  background:var(--green); color:#fff; border-radius:var(--r-card); padding:16px 20px; }
.cjas-next .k { font-family:var(--font-form); font-size:12px; letter-spacing:1.2px;
  text-transform:uppercase; opacity:.8; }
.cjas-next .n { font-family:var(--font-head); font-weight:700; font-size:26px; }
.cjas-next .t { font-family:var(--font-head); font-weight:600; font-size:26px;
  color:#FFD98A; margin-inline-start:auto; font-variant-numeric:tabular-nums; }

.cjas-events { list-style:none; margin:0; padding:0; }
.cjas-events li { display:flex; gap:14px; align-items:center;
  padding:14px 0; border-bottom:1px solid var(--hairline); }
.cjas-events .d { width:56px; flex-shrink:0; text-align:center;
  background:var(--tint-green); border-radius:var(--r-btn); padding:8px 0; }
.cjas-events .d b { display:block; font-family:var(--font-head); font-size:21px;
  line-height:1; color:var(--green); }
.cjas-events .d span { font-family:var(--font-form); font-size:10.5px; color:var(--text-muted); }
.cjas-events .b { display:flex; flex-direction:column; gap:3px; }
.cjas-events .b strong { font-family:var(--font-head); font-size:17px; font-weight:600; }
.cjas-events .b em { font-style:normal; font-size:14px; color:var(--text-muted); }
.cjas-events .live { margin-inline-start:auto; background:var(--danger); color:#fff;
  font-family:var(--font-form); font-size:11px; letter-spacing:1px;
  padding:3px 9px; border-radius:999px; }
.cjas-events .b a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
/* A cancelled event stays listed, struck through and badged AVLYST (core
   rule 29) — the badge carries the meaning, the strike only reinforces it. */
.cjas-events .is-cancelled .b strong, .cjas-event.is-cancelled .cjas-event__title { text-decoration:line-through; color:var(--text-muted); }
.cjas-events .cancelled, .cjas-event__badge { margin-inline-start:auto; border:1px solid var(--danger); color:var(--danger);
  font-family:var(--font-form); font-size:11px; letter-spacing:1px; padding:2px 9px; border-radius:999px; }
.cjas-event { padding:18px 22px; }
.cjas-event__badge { display:inline-block; margin:0 0 8px; }
.cjas-event__badge.live { background:var(--danger); color:#fff; }
.cjas-event__title { font-family:var(--font-head); font-size:26px; margin:0 0 6px; }
.cjas-event__when, .cjas-event__where { font-family:var(--font-form); font-size:15px; color:var(--text-muted); margin:0 0 4px; }
.cjas-event__body { font-size:16px; margin:12px 0 0; }

.cjas-strip { display:flex; gap:10px; align-items:baseline; flex-wrap:wrap;
  background:var(--tint-cream); border-inline-start:4px solid var(--gold);
  border-radius:var(--r-card); padding:13px 16px; margin:0 0 12px; }
/* Ink, not red — same rule as .cjas-janazah below. Red reads as an error;
   this is a death announcement. */
.cjas-strip.janazah { border-inline-start-color:var(--ink); }
.cjas-strip .k { font-family:var(--font-form); font-size:10.5px; letter-spacing:1.2px;
  text-transform:uppercase; color:var(--gold-text); }
.cjas-strip.janazah .k { color:var(--ink); }
.cjas-strip strong { font-family:var(--font-head); font-size:16px; }
.cjas-strip span:not(.k) { font-size:14px; color:var(--text-muted); }

.cjas-empty { font-family:var(--font-form); font-size:14px; color:var(--text-muted); }
.cjas-note { font-family:var(--font-form); font-size:13px; color:var(--danger);
  border:1px dashed var(--danger); border-radius:var(--r-btn); padding:9px 13px; }

/* --- Week grid (CA-64) ------------------------------------------------- */
.cjas-scroll { overflow-x: auto; }              /* wide table scrolls, page does not */
.cjas-week th[scope="row"] { text-align: start; white-space: nowrap; font-weight: 600; }
.cjas-week .is-today { background: var(--tint-green); }
.cjas-week .is-closed td { color: var(--grey-text); font-style: italic; }
.cjas-closed { text-align: start; }
.cjas-badge {
  font-family: var(--font-form); font-size: 11px; letter-spacing: .04em;
  background: var(--gold-soft); color: var(--gold-text);
  padding: 1px 6px; border-radius: 4px; margin-inline-start: 6px; vertical-align: middle;
}
.cjas-foot { font-family: var(--font-form); font-size: 13px; color: var(--grey-text); margin: 10px 0 0; }

/* --- Janazah strip (CA-65, CA-61) -------------------------------------- */
/* Ink, not red. Red reads as an error; this is a death announcement. */
.cjas-janazah {
  background: var(--ink); color: var(--white);
  padding: 18px 22px; border-radius: var(--r-card);
  border-inline-start: 5px solid var(--gold); margin: 0 0 20px;
}
.cjas-janazah__label {
  font-family: var(--font-form); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; opacity: .72; margin: 0 0 4px;
}
.cjas-janazah__name { font-family: var(--font-head); font-size: 26px; font-weight: 700; margin: 0; }
.cjas-janazah__when { font-size: 16px; margin: 6px 0 0; }
.cjas-janazah__body { font-size: 15px; opacity: .85; margin: 8px 0 0; }

/* --- Forms (CA-66) ----------------------------------------------------- */
.cjas-form .cjas-field { margin: 0 0 16px; }
.cjas-form label { display: block; font-family: var(--font-form); font-size: 15px; margin-bottom: 5px; }
.cjas-form input, .cjas-form textarea { width: 100%; }
/* Off-screen rather than display:none — a bot that reads CSS skips a hidden
   field, but fills one it can see in the DOM. */
.cjas-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cjas-note--ok    { border: 0; border-inline-start: 4px solid var(--green); background: var(--tint-green); padding: 14px 18px; border-radius: var(--r-card); color: var(--text); }
.cjas-note--error { border: 0; border-inline-start: 4px solid var(--danger); background: rgba(192,57,43,.08); padding: 14px 18px; border-radius: var(--r-card); color: var(--text); }
/* Information, not an error: .cjas-note is the red admin-only error box, and
   the nikah form's "we need the prøvingsattest" line was rendered in it —
   a family's first sight of the form was a red dashed warning. */
.cjas-info { font-family: var(--font-form); font-size: 14px; background: var(--tint-cream);
  border-inline-start: 4px solid var(--gold); border-radius: var(--r-btn); padding: 10px 14px; }
.cjas-form { padding: 18px 22px; }
.cjas-privacy { font-family: var(--font-form); font-size: 13px; color: var(--grey-text); margin: 14px 0 0; }

/* --- Documents + request status (CA-27, CA-50) ------------------------- */
.cjas-docs { border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 12px 16px 4px; margin: 0 0 16px; }
.cjas-docs legend { font-family: var(--font-form); font-size: 15px; font-weight: 600; padding: 0 6px; }
.cjas-docs input[type="file"] { font-family: var(--font-form); font-size: 14px; }
.cjas-file-msg { display: block; font-family: var(--font-form); font-size: 13px; color: var(--danger); margin-top: 4px; }
.cjas-file-msg:empty { display: none; }
.cjas-missing-list { margin: 4px 0 8px 20px; }
.cjas-status { padding: 18px 22px; }
.cjas-status__ref { font-family: var(--font-form); font-size: 14px; color: var(--text-muted); margin: 0 0 6px; }
.cjas-status__state { font-family: var(--font-head); font-size: 22px; margin: 0 0 4px; }
.cjas-status__explain { margin: 0 0 4px; }
.cjas-status__updated { font-family: var(--font-form); font-size: 13px; color: var(--grey-text); margin: 0 0 12px; }
.cjas-docs-form { padding: 16px 0 0; border-top: 1px solid var(--hairline); margin-top: 12px; }
.cjas-docs-form h3 { font-family: var(--font-head); font-size: 18px; margin: 0 0 10px; }
