/* status.theitexperience.com: page-specific styles on top of the website's styles.css (from the old /status page, plus
   incidents with updates, maintenance, the subscribe pages). */
.st-section { background: var(--bg-secondary); padding-top: 60px; }
.status-wrap { max-width: 880px; margin: 0 auto; }

/* Status colour tokens (mirror the Uptime Kuma theme) */
.ok      { --c: #34d399; }
.warn    { --c: #fbbf24; }
.down    { --c: #f87171; }
.maint   { --c: #60a5fa; }
.unknown { --c: #7e8a9e; }

/* Overall banner */
.status-overall { display: flex; align-items: center; gap: 18px; background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: var(--radius); padding: 26px 30px; margin-bottom: 18px; }
.status-overall .ov-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex-shrink: 0; position: relative; animation: itx-orb-breathe 2.4s ease-in-out infinite; }
.status-overall .ov-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--c); animation: itx-orb-ping 2.4s var(--ease-out) infinite; }
@keyframes itx-orb-ping { 0% { transform: scale(1); opacity: 0.55; } 70% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes itx-orb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .status-overall .ov-dot, .status-overall .ov-dot::after { animation: none; } }
.status-overall .ov-text { display: flex; flex-direction: column; gap: 3px; }
.ov-label { font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.ov-sub { font-size: 0.86rem; color: var(--text-muted); }
.status-overall .ov-side { margin-left: auto; text-align: right; }
#lastUpdated { font-size: 0.82rem; color: var(--text-muted); }
.stale-note { font-size: 0.82rem; color: #fbbf24; background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.25); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; }

/* Get updates strip */
.st-sub-cta { display: flex; align-items: center; gap: 18px; justify-content: space-between; background: linear-gradient(135deg, rgba(59,143,245,0.10), rgba(59,143,245,0.03)); border: 1px solid var(--accent-border); border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 26px; }
.st-sub-cta strong { display: block; font-family: var(--font-display); font-size: 1.02rem; }
.st-sub-cta span { font-size: 0.88rem; color: var(--text-secondary); }
.st-sub-cta .btn-primary { white-space: nowrap; flex-shrink: 0; padding: 11px 22px; }
.st-sub-cta .st-sub-manage { display: inline-block; margin-top: 6px; font-size: 0.84rem; color: var(--accent-light); }
.st-already { max-width: 640px; text-align: center; margin-top: 0; }
.st-already a { color: var(--accent-light); }
.st-unsub p strong { color: var(--text-primary); }

.st-h2 { font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-secondary); margin: 30px 0 14px; padding-left: 2px; }
#events > .st-h2:first-child { margin-top: 6px; }

/* Incident / maintenance card */
.incident { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--c, var(--accent)); border-radius: var(--radius-sm); padding: 18px 22px; margin-bottom: 14px; }
.inc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.inc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); flex-shrink: 0; }
.inc-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin: 0; }
.inc-title a { color: var(--text-primary); text-decoration: none; }
.inc-title a:hover { color: var(--accent-light); text-decoration: underline; }
.inc-badge { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-pill); color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 33%, transparent); }
.inc-badge.imp { color: var(--text-secondary); background: transparent; border-color: var(--border); }
.inc-meta { font-size: 0.86rem; color: var(--text-secondary); margin: 2px 0 4px; }
.inc-meta strong { color: var(--text-primary); font-weight: 600; }
.inc-upd { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.inc-upd:first-of-type { border-top: 0; padding-top: 4px; }
.inc-upd-head { font-size: 0.84rem; margin-bottom: 4px; }
.inc-upd-head strong { color: var(--text-primary); }
.inc-upd-head span { color: var(--text-muted); margin-left: 6px; }
.inc-body { font-size: 0.93rem; color: var(--text-secondary); line-height: 1.65; overflow-wrap: anywhere; }
.inc-body a { color: var(--accent); text-decoration: underline; }
.inc-body strong { color: var(--text-primary); font-weight: 700; }
.inc-body code { background: var(--bg-secondary); padding: 1px 6px; border-radius: 5px; font-size: 0.85em; }
.inc-older { margin-top: 10px; }
.inc-older summary { cursor: pointer; font-size: 0.84rem; color: var(--accent-light); }
.inc-older[open] summary { margin-bottom: 4px; }

/* Service groups */
.svc-group { margin-top: 34px; }
.svc-group-name { font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-secondary); margin-bottom: 14px; padding-left: 2px; }
.svc-list { display: flex; flex-direction: column; gap: 10px; }
.svc-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr auto; align-items: center; gap: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 22px; transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out); }
.svc-row:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.svc-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.svc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.svc-name { font-weight: 600; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-hb { display: flex; gap: 3px; align-items: center; }
.beat { flex: 1 1 4px; max-width: 9px; height: 26px; border-radius: 2px; background: rgba(138,148,166,0.15); }
.beat.up { background: #34d399; } .beat.down { background: #f87171; } .beat.warn { background: #fbbf24; } .beat.maint { background: #60a5fa; } .beat.empty { background: rgba(138,148,166,0.15); }
.svc-meta { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.svc-uptime { font-size: 0.85rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.svc-badge { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; padding: 5px 12px; border-radius: var(--radius-pill); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); }

/* Legend */
.status-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-muted); }
.status-legend span { display: inline-flex; align-items: center; gap: 7px; }
.status-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-legend .st-legend-note { margin-left: auto; }

/* Past incidents + history */
.st-past { margin-top: 38px; }
.st-past-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; color: var(--text-primary); text-decoration: none; transition: border-color .25s; }
.st-past-row:hover { border-color: var(--border-hover); }
.st-past-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.95rem; }
.st-past-title small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.st-past-date { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.st-muted { color: var(--text-muted); font-size: 0.92rem; }
.st-more { margin-top: 12px; font-size: 0.9rem; }
.st-more a, .st-back a, .st-fine a, .st-msg a:not(.btn-secondary), .st-who a { color: var(--accent-light); }
.st-back { margin: -20px 0 18px; font-size: 0.9rem; }
.st-day + .st-day { margin-top: 10px; }

/* Forms (subscribe, manage, confirm) */
.st-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 18px; }
.st-form { max-width: 640px; }
.st-center { text-align: center; margin-left: auto; margin-right: auto; }
.st-label { display: block; font-weight: 600; margin-bottom: 8px; }
.st-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text-primary); background: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-sm); padding: 12px 14px; }
.st-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.st-fieldset { border: 0; padding: 0; margin: 24px 0 0; }
.st-fieldset legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.st-radio, .st-check { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 0.97rem; }
.st-radio input, .st-check input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; margin: 0; }
.st-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 20px; margin: 8px 0 0 28px; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.st-picks.off { opacity: 0.45; }
.st-pick-group { display: contents; }
.st-pick-label { display: none; }
.st-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.st-submit { margin-top: 26px; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.st-fine { font-size: 0.82rem; color: var(--text-muted); margin-top: 18px; line-height: 1.6; }
.st-error, .st-ok { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 18px; font-size: 0.92rem; }
.st-error { color: #fecaca; background: rgba(248,113,113,0.10); border: 1px solid rgba(248,113,113,0.35); }
.st-ok { color: #bbf7d0; background: rgba(52,211,153,0.10); border: 1px solid rgba(52,211,153,0.35); }
.st-who { margin: 0 0 6px; color: var(--text-secondary); }
.st-who strong { color: var(--text-primary); }
.st-unsub { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 20px 30px; }
.st-unsub p { margin: 0; color: var(--text-secondary); }
.st-unsub .btn-secondary { cursor: pointer; font: inherit; font-weight: 600; }
.st-msg p { color: var(--text-secondary); line-height: 1.7; }
.st-msg p strong { color: var(--text-primary); }
.st-msg .btn-secondary { display: inline-block; margin-top: 8px; }
.footer-all { display: inline-block; margin-top: 10px; font-size: 0.88rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.btn-primary, .btn-secondary { text-decoration: none; }

/* read by screen readers only (the "status changed" announcement) */
.st-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  /* phones: name + badge on the first line, the bars + uptime under them, so the service name gets the width it needs
     (with the uptime next to the badge, names were cut to about 70 px: "Billing P...") */
  .svc-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main badge" "hb up"; gap: 14px 12px; padding: 16px 18px; }
  .svc-main { grid-area: main; } .svc-hb { grid-area: hb; }
  .svc-meta { display: contents; }
  .svc-badge { grid-area: badge; justify-self: end; }
  .svc-uptime { grid-area: up; justify-self: end; }
  .svc-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
  .status-overall { flex-wrap: wrap; padding: 22px 22px; }
  .status-overall .ov-side { margin-left: 0; width: 100%; text-align: left; }
  .st-sub-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .st-sub-cta .btn-primary { text-align: center; justify-content: center; }
  .st-card { padding: 22px 18px; }
  .st-picks { margin-left: 0; grid-template-columns: 1fr; }
  .status-legend .st-legend-note { margin-left: 0; }
  .inc-upd-head span { display: block; margin: 2px 0 0; }
}
