/* Sectra Ortho Online Status: status page and IDS7 Info Panel (ORTHO-5738).
   Styled with Sectra's SPX design tokens (tokens.css, from the brand-identity skill in
   ortho-dev-handbook). Values come from var(--...) tokens; the build adds a plain-value
   fallback before each one, in case the IDS7 Info Panel hosts an engine without CSS
   variables. Exceptions, marked below:
   - the "dim" backgrounds: SPX defines them as a token colour at 30 % opacity "applied at use
     site", so they are rgba() of that token;
   - spacing: the SPX --spacing-* tokens are still unset (REPLACE_ME), so it is 4 px steps.
   Contrast: where an SPX token fails WCAG AA for text on light backgrounds (--role-link,
   --color-primary-hover, --color-focus, green/yellow text), a darker ramp step is used. */

/* ---- Base ---- */
html { font-size: 14px; font-size: var(--root-font-size); }
html, body { margin: 0; padding: 0; }
body {
    background: #f7f9fc; background: var(--role-bg);
    color: rgba(0,0,0,0.87); color: var(--role-fg-1);
    font-family: 'Open Sans', 'Segoe UI', system-ui, sans-serif; font-family: var(--font-sans);
    line-height: 1.5; line-height: var(--leading-normal);
}
a { color: #265ba0; color: var(--color-blue-600); }
a:hover { color: #15437f; color: var(--color-blue-700); }
a:focus, button:focus, summary:focus { outline: 2px solid #15437f; outline: 2px solid var(--color-blue-700); outline-offset: 2px; }
.dark a { color: #7aa1dc; color: var(--role-link); }
.dark a:focus, .dark button:focus { outline-color: #679DE4; outline-color: var(--color-focus); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 12px; background: #fbfcfe; background: var(--role-bg-raised); color: #265ba0; color: var(--color-blue-600); }
.skip-link:focus { left: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { display: inline-block; flex: none; width: 16px; height: 16px; vertical-align: middle; }
.icon svg { display: block; width: 100%; height: 100%; }

/* ---- Top bar (the SPX menu bar is always dark) ---- */
.topbar { background: #071326; background: var(--role-bg); color: rgba(255,255,255,0.92); color: var(--role-fg-1); }
.topbar-inner, .page, .footer-inner { max-width: 1040px; margin: 0 auto; padding: 0 2rem; padding: 0 var(--gutter-horizontal); box-sizing: border-box; }
.topbar-inner { height: 52px; display: flex; align-items: center; }
.topbar .logo { height: 18px; width: auto; }
.topbar .product { margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,0.14); border-left: 1px solid var(--role-border); color: rgba(255,255,255,0.65); color: var(--role-fg-2); }

/* ---- Page ---- */
html.page-mode body { min-height: 100vh; display: flex; flex-direction: column; }
html.page-mode .page { flex: 1 0 auto; width: 100%; }
.page { padding-top: 28px; padding-bottom: 40px; }
h1 { font-size: 2em; font-size: var(--type-heading-medium-size); font-weight: 300; font-weight: var(--type-heading-medium-weight); line-height: 1.2; line-height: var(--type-heading-medium-leading); color: #000000; color: var(--role-fg); margin: 0 0 8px; }
.lead { margin: 0 0 24px; max-width: 760px; color: rgba(0,0,0,0.60); color: var(--role-fg-2); }
.global-notices { margin-bottom: 16px; }
.global-notices .notice { margin-bottom: 8px; }

/* ---- Server card: raised surface on the page background, whitespace over borders ---- */
.card {
    box-sizing: border-box;
    max-width: 640px;
    background: #fbfcfe; background: var(--role-bg-raised);
    border: 1px solid rgba(0,0,0,0.08); border: 1px solid var(--role-divider);
    border-radius: 4px; border-radius: var(--radius-control);
    box-shadow: 0 1px 2px rgba(7, 19, 38, 0.08); box-shadow: var(--shadow-sm);
    padding: 16px 20px 20px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; }
.card-title { font-size: 1.5em; font-size: var(--type-heading-minor-size); font-weight: 300; font-weight: var(--type-heading-minor-weight); line-height: 1.2; line-height: var(--type-heading-minor-leading); color: #000000; color: var(--role-fg); margin: 0 12px 0 0; min-width: 0; }
.card-text { margin: 12px 0 0; }
.notices { margin-top: 14px; }

/* ---- Status chip: SPX chips are square-cornered, dim background, icon + text ---- */
.pill {
    flex: none;
    display: inline-flex; align-items: center;
    height: 24px; padding: 0 8px;
    border-radius: 2px; border-radius: var(--radius-chip);
    font-size: 12px; font-weight: 600; font-weight: var(--weight-semibold);
    color: rgba(0,0,0,0.87); color: var(--role-fg-1);
    white-space: nowrap;
}
.pill .icon { margin-right: 6px; }
.pill-ok { background: rgba(81, 194, 96, 0.30); }                         /* --color-success-dim */
.pill-ok .icon { color: #2f893b; color: var(--color-green-700); }
.pill-planned, .pill-maintenance { background: rgba(60, 115, 187, 0.30); } /* --color-primary, dim */
.pill-planned .icon, .pill-maintenance .icon { color: #265ba0; color: var(--color-blue-600); }
.pill-degraded { background: rgba(255, 199, 56, 0.30); }                  /* --color-warning-dim */
.pill-degraded .icon { color: #b67a28; color: var(--color-yellow-700); }
.pill-outage { background: rgba(248, 37, 18, 0.30); }                     /* --color-error-dim */
.pill-outage .icon { color: #CE1F0F; color: var(--color-error); }
.pill-unknown, .pill-nostatus { background: rgba(128, 128, 128, 0.20); }
.pill-unknown .icon, .pill-nostatus .icon { color: #808080; color: var(--color-gray-500); }

/* ---- Notices: SPX alert, standard (tinted) style. Colour always with icon and text. ---- */
.notice {
    display: flex; align-items: flex-start;
    padding: 10px 12px;
    margin-top: 8px;
    border-radius: 2px; border-radius: var(--radius-chip);
    background: rgba(60, 115, 187, 0.20);                                 /* information/alert: blue */
    color: rgba(0,0,0,0.87); alert: blue */
    color: var(--role-fg-1);
}
.notice:first-child { margin-top: 0; }
.notice > .icon { width: 18px; height: 18px; margin: 2px 10px 0 0; color: #265ba0; color: var(--color-blue-600); }
.notice-body { min-width: 0; }
.notice-degraded { background: rgba(255, 199, 56, 0.30); }               /* system warning */
.notice-degraded > .icon { color: #b67a28; color: var(--color-yellow-700); }
.notice-outage { background: rgba(248, 37, 18, 0.20); }                  /* system error */
.notice-outage > .icon { color: #CE1F0F; color: var(--color-error); }
.notice-head { font-size: 0.85em; font-size: var(--type-secondary-info-size); color: rgba(0,0,0,0.60); color: var(--role-fg-2); }
.notice-tag { font-weight: 600; font-weight: var(--weight-semibold); color: rgba(0,0,0,0.87); color: var(--role-fg-1); margin-right: 8px; }
.notice-title { font-weight: 600; font-weight: var(--weight-semibold); margin-top: 2px; }
.notice-message { margin: 2px 0 0; }
.notice-link { display: inline-block; margin-top: 4px; }

/* ---- Landing, footer ---- */
.landing { max-width: 640px; background: #fbfcfe; background: var(--role-bg-raised); border: 1px solid rgba(0,0,0,0.08); border: 1px solid var(--role-divider); border-radius: 4px; border-radius: var(--radius-control); box-shadow: 0 1px 2px rgba(7, 19, 38, 0.08); box-shadow: var(--shadow-sm); padding: 16px 20px; }
.landing p { margin: 0 0 10px; }
.landing p:last-child { margin-bottom: 0; }
.landing-ok { color: #2f893b; color: var(--color-green-700); }
.footer { border-top: 1px solid rgba(0,0,0,0.08); border-top: 1px solid var(--role-divider); background: #fbfcfe; background: var(--role-bg-raised); font-size: 0.85em; font-size: var(--type-secondary-info-size); color: rgba(0,0,0,0.60); color: var(--role-fg-2); }
.footer-inner { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; }
.footer-status, .footer-address { margin: 2px 0; }
.refresh-error, .load-error { color: #CE1F0F; color: var(--color-error); }

}
@media (max-width: 600px) {
    .topbar-inner, .page, .footer-inner { padding-left: 16px; padding-right: 16px; }
    .card-head { flex-direction: column; }
    .pill { margin-top: 8px; }
}

/* ---- IDS7 Info Panel (/<id>/panel), dark polarity to match IDS7's information window ---- */
.panel-mode .page-only { display: none; }
.panel-mode body { background: #071326; background: var(--role-bg); color: rgba(255,255,255,0.92); color: var(--role-fg-1); }
.panel-mode .page { max-width: none; padding: 8px 10px; }
.panel-mode h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.panel-note { margin: 0 0 8px; color: rgba(255,255,255,0.65); color: var(--role-fg-2); }
/* All normal: a quiet line. Anything else: a filled SPX alert, to draw the eye. */
.panel-line { display: flex; align-items: center; font-size: 1.1em; font-weight: 600; font-weight: var(--weight-semibold); margin: 2px 0 8px; padding: 8px 10px; border-radius: 4.5px; border-radius: var(--radius-panel); }
.panel-line .icon { width: 18px; height: 18px; margin-right: 8px; }
.panel-ok { color: #51c260; color: var(--color-green-500); padding-left: 0; }
.panel-planned, .panel-maintenance { background: #3C73BB; background: var(--color-primary); color: #ffffff; color: var(--color-white-500); }
.panel-degraded { background: #FFC738; background: var(--color-warning); color: #071326; color: var(--color-asphalt-500); }
.panel-outage { background: #CE1F0F; background: var(--color-error); color: #ffffff; color: var(--color-white-500); }
.panel-unknown, .panel-nostatus { color: rgba(255,255,255,0.65); color: var(--role-fg-2); padding-left: 0; }
.panel-mode .notice { margin: 0 0 8px; background: rgba(60, 115, 187, 0.30); color: rgba(255,255,255,0.92); color: var(--role-fg-1); }
.panel-mode .notice > .icon { color: #A9CAF6; color: var(--color-tint); }
.panel-mode .notice-degraded { background: rgba(255, 199, 56, 0.20); }
.panel-mode .notice-degraded > .icon { color: #FFC738; color: var(--color-warning); }
.panel-mode .notice-outage { background: rgba(248, 37, 18, 0.30); }
.panel-mode .notice-outage > .icon { color: #fb7c71; color: var(--color-red-300); }
.panel-mode .notice-head { color: rgba(255,255,255,0.65); color: var(--role-fg-2); }
.panel-mode .notice-tag { display: block; color: rgba(255,255,255,0.92); color: var(--role-fg-1); }
.panel-mode .notice-title { color: #ffffff; color: var(--role-fg); }
.panel-foot { display: flex; flex-wrap: wrap; align-items: center; font-size: 0.85em; font-size: var(--type-secondary-info-size); color: rgba(255,255,255,0.65); color: var(--role-fg-2); }
.panel-foot a, .panel-foot .panel-refresh { display: inline-flex; align-items: center; min-height: 44px; }
.panel-refresh { margin: 0 0 0 12px; padding: 0; border: 0; background: none; font: inherit; color: #7aa1dc; color: var(--role-link); text-decoration: underline; cursor: pointer; }
.panel-refresh .icon { margin-right: 4px; }
.panel-updated { margin-left: 12px; }
.bookmark { margin-top: 16px; }
.bookmark-address { color: rgba(0,0,0,0.60); color: var(--role-fg-2); user-select: all; word-break: break-all; }
.panel-address { margin: 0; font-size: 0.85em; font-size: var(--type-secondary-info-size); color: rgba(255,255,255,0.65); color: var(--role-fg-2); user-select: all; word-break: break-all; }
.panel-mode .refresh-error { color: #fb7c71; color: var(--color-red-300); margin-left: 8px; }
