/* /status (roadmap #32, audit WEB-25): the status page. Loaded only by status.php, after rx.css (a built file that is not edited).
   Light, calm, no dark fills. Colour is never the only signal: every state also has its words (banner, pill, legend, table). */

.rx-st {
  --st-ok-bg: #EAF7EC;      --st-ok-fg: #1E6B2A;      --st-ok-bar: #2E9E57;
  --st-warn-bg: #FFF5D9;    --st-warn-fg: #7A4E00;    --st-warn-bar: #B57600;
  --st-down-bg: #FDEBEA;    --st-down-fg: #B42318;    --st-down-bar: #D64545;
  --st-unk-bg: #F3F1F7;     --st-unk-fg: #413F4C;     --st-unk-bar: #B9B5C6;
  --st-sch-bg: #F3E8FF;     --st-sch-fg: #6B21A8;
}
.rx-st-hero { padding-block: 72px 56px; }
.rx-st-hero .rx-hero__inner { max-width: 720px; gap: 18px; }
.rx-st-hero .rx-h1 { font-size: clamp(34px, calc(25px + 1.6vw), 48px); line-height: 1.18; }
.rx-st-body { padding-top: 24px; }
.rx-st__col { max-width: 880px; display: flex; flex-direction: column; gap: 40px; }
.rx-st-block > h2 { margin: 0 0 8px; font-size: 24px; line-height: 32px; font-weight: 500; color: var(--rx-ink-900); }
.rx-st-block > .rx-st-lead { margin: 0 0 20px; color: var(--rx-ink-500); max-width: 680px; }
.rx-st-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the placeholders: a visitor with JavaScript reads "checking", one without reads that live status needs it */
.rx-st-nojs-only { display: none; }
html:not(.rx-js) .rx-st-legend { display: none; }   /* a legend for a strip that needs JavaScript */
html:not(.rx-js) .rx-st-nojs-only { display: inline; }
html:not(.rx-js) .rx-st-js-only { display: none; }
.rx-st-noscript { margin: 0; padding: 14px 18px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-card); background: var(--rx-violet-50); color: var(--rx-ink-700); }
.rx-st-noscript a { color: var(--rx-violet-650); text-decoration: underline; text-underline-offset: 2px; }

/* the overall banner */
.rx-st-banner { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-card); background: var(--st-unk-bg); color: var(--st-unk-fg); }
.rx-st-banner__dot { flex: none; width: 14px; height: 14px; margin-top: 7px; border-radius: 50%; background: var(--st-unk-bar); }
.rx-st-banner__body { min-width: 0; }
.rx-st-banner__title { margin: 0; font-size: 22px; line-height: 30px; font-weight: 500; }
.rx-st-banner__detail, .rx-st-banner__time { margin: 6px 0 0; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.rx-st-banner__time:empty { display: none; }
.rx-st-banner[data-state="ok"]          { background: var(--st-ok-bg);   color: var(--st-ok-fg); }
.rx-st-banner[data-state="ok"] .rx-st-banner__dot { background: var(--st-ok-bar); }
.rx-st-banner[data-state="degraded"]    { background: var(--st-warn-bg); color: var(--st-warn-fg); }
.rx-st-banner[data-state="degraded"] .rx-st-banner__dot { background: var(--st-warn-bar); }
.rx-st-banner[data-state="down"]        { background: var(--st-down-bg); color: var(--st-down-fg); }
.rx-st-banner[data-state="down"] .rx-st-banner__dot { background: var(--st-down-bar); }

/* the pills: components, incident states */
.rx-st-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: var(--rx-r-pill); font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; background: var(--st-unk-bg); color: var(--st-unk-fg); }
.rx-st-pill[data-state="ok"], .rx-st-pill[data-state="closed"] { background: var(--st-ok-bg); color: var(--st-ok-fg); }
.rx-st-pill[data-state="degraded"], .rx-st-pill[data-state="open"] { background: var(--st-warn-bg); color: var(--st-warn-fg); }
.rx-st-pill[data-state="down"] { background: var(--st-down-bg); color: var(--st-down-fg); }
.rx-st-pill[data-state="scheduled"] { background: var(--st-sch-bg); color: var(--st-sch-fg); }

/* the components */
.rx-st-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rx-line); border-radius: var(--rx-r-card); background: var(--rx-white); box-shadow: var(--rx-shadow-card); }
.rx-st-comp { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 18px 22px; }
.rx-st-comp + .rx-st-comp { border-top: 1px solid var(--rx-line); }
.rx-st-comp__name { margin: 0; font-size: 18px; line-height: 26px; font-weight: 500; color: var(--rx-ink-900); }
.rx-st-comp__text { margin: 4px 0 0; font-size: 15px; line-height: 23px; color: var(--rx-ink-500); max-width: 620px; }

/* the 90-day strip */
.rx-st-card { padding: 22px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-card); background: var(--rx-white); box-shadow: var(--rx-shadow-card); }
.rx-st-strip { display: flex; gap: 1px; height: 56px; align-items: stretch; touch-action: pan-y; cursor: default; }
.rx-st-strip:empty { display: none; }
.rx-st-bar { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--st-unk-bar); }
.rx-st-bar[data-r="good"] { background: var(--st-ok-bar); }
.rx-st-bar[data-r="partial"] { background: var(--st-warn-bar); }
.rx-st-bar[data-r="gap"] { background: repeating-linear-gradient(180deg, var(--st-down-bar) 0 4px, #F3C4C4 4px 6px); }
.rx-st-bar.is-on { outline: 2px solid var(--rx-violet-650); outline-offset: 1px; }
.rx-st-ends { display: flex; justify-content: space-between; margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--rx-ink-400); }
.rx-st-readout { min-height: 24px; margin: 10px 0 0; font-size: 15px; line-height: 24px; color: var(--rx-ink-700); }
.rx-st-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; color: var(--rx-ink-500); }
.rx-st-legend li { display: inline-flex; align-items: center; gap: 8px; }
.rx-st-legend i { flex: none; width: 14px; height: 14px; border-radius: 3px; background: var(--st-unk-bar); }
.rx-st-legend i[data-r="good"] { background: var(--st-ok-bar); }
.rx-st-legend i[data-r="partial"] { background: var(--st-warn-bar); }
.rx-st-legend i[data-r="gap"] { background: repeating-linear-gradient(180deg, var(--st-down-bar) 0 3px, #F3C4C4 3px 5px); }
.rx-st-summary { margin: 18px 0 0; font-size: 17px; line-height: 26px; color: var(--rx-ink-900); }
.rx-st-summary small { display: block; font-size: 14px; line-height: 21px; color: var(--rx-ink-500); }
.rx-st-method { margin: 14px 0 0; font-size: 15px; line-height: 23px; color: var(--rx-ink-500); }
.rx-st-loading { margin: 0; color: var(--rx-ink-500); }
.rx-st-details { margin-top: 18px; }
.rx-st-details > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--rx-violet-650); }
.rx-st-details > summary:focus-visible { outline: 2px solid var(--rx-violet-650); outline-offset: 2px; border-radius: 6px; }
.rx-st-tablewrap { max-height: 420px; overflow: auto; margin-top: 8px; border: 1px solid var(--rx-line); border-radius: 10px; }
.rx-st-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.rx-st-table caption { padding: 10px 12px; text-align: start; font-weight: 500; color: var(--rx-ink-700); }
.rx-st-table th, .rx-st-table td { padding: 8px 12px; text-align: start; border-top: 1px solid var(--rx-line); }
.rx-st-table thead th { position: sticky; top: 0; background: var(--rx-violet-50); font-weight: 500; color: var(--rx-ink-700); }

/* incidents */
.rx-st-incidents { display: flex; flex-direction: column; gap: 16px; }
.rx-st-incident { padding: 20px 22px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-card); background: var(--rx-white); box-shadow: var(--rx-shadow-card); scroll-margin-top: calc(var(--rx-header-h, 72px) + 16px); }
.rx-st-incident__title { margin: 0; font-size: 19px; line-height: 27px; font-weight: 500; color: var(--rx-ink-900); overflow-wrap: anywhere; }
.rx-st-incident__meta { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--rx-ink-500); }
.rx-st-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-pill); font-weight: 500; color: var(--rx-ink-700); }
.rx-st-updates { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rx-st-update { padding-inline-start: 14px; border-inline-start: 2px solid var(--rx-violet-200); }
.rx-st-update__time { margin: 0 0 4px; font-size: 14px; line-height: 20px; color: var(--rx-ink-500); }
.rx-st-update__step { margin-inline-start: 6px; font-weight: 500; color: var(--rx-ink-700); }
.rx-st-update__text p { margin: 0 0 8px; font-size: 16px; line-height: 25px; color: var(--rx-ink-700); overflow-wrap: anywhere; }
.rx-st-update__text p:last-child { margin-bottom: 0; }
.rx-st-empty { margin: 0; padding: 18px 22px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-card); background: var(--rx-violet-50); color: var(--rx-ink-700); }
.rx-st-note { margin: 14px 0 0; font-size: 15px; line-height: 23px; color: var(--rx-ink-500); }

/* help */
.rx-st-help p { margin: 0 0 12px; max-width: 680px; color: var(--rx-ink-700); }
.rx-st-help ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.rx-st-help li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--rx-violet-650); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.rx-st-help li a:hover { color: var(--rx-violet-700); }

@media (max-width: 767px) {
  .rx-st-hero { padding-block: 48px 36px; }
  .rx-st__col { gap: 32px; }
  .rx-st-banner { padding: 18px 16px; gap: 12px; }
  .rx-st-banner__title { font-size: 20px; line-height: 28px; }
  .rx-st-comp { flex-direction: column; gap: 10px; padding: 16px; }
  .rx-st-card { padding: 16px; }
  .rx-st-incident { padding: 16px; }
  .rx-st-strip { height: 48px; }
}
@media (prefers-reduced-motion: no-preference) {
  .rx-st-banner, .rx-st-pill, .rx-st-bar { transition: background-color .2s, color .2s; }
}

/* an element the script has not filled in yet stays out of the way (a display rule above must not beat the hidden attribute) */
.rx-st [hidden] { display: none !important; }
