/*
 * SchoolStream accessibility baseline (WCAG 2.1 A/AA).
 * Injected into every HTML page by Accessibility\AccessibilityResponseFilter after the page's own styles,
 * so it wins over the legacy "outline: none" rules.
 */

/* 2.4.7 Focus Visible / 1.4.11 Non-text Contrast: a clear focus indicator for keyboard users */
html body *:focus-visible,
html body td[role="menuitem"]:focus,
html body [data-a11y-clickable]:focus-visible {
    outline: 3px solid #1a5fb4 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.85) !important;
}

/* 2.4.1 Bypass Blocks: skip link, visible when focused */
.a11y-skip-link {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.a11y-skip-link:focus {
    left: 8px;
    top: 8px;
    width: auto;
    height: auto;
    z-index: 2147483647;
    padding: 8px 14px;
    background: #ffffff;
    color: #0b3a6e;
    border: 3px solid #1a5fb4;
    font: bold 14px Arial, sans-serif;
    text-decoration: underline;
}

/* text only for screen readers */
.a11y-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 1.4.3 Contrast: legacy link blue (#0099FF, 3.0:1) and grey captions (#808080, 3.9:1) */
a[style*="#0099FF"], a[style*="#0099ff"] {
    color: #0063a8 !important;
}

/* 1.4.1 Use of Color: validation errors also carry an icon and text, links stay underlined on focus */
a:focus-visible {
    text-decoration: underline !important;
}

/* 1.4.1 Use of Color: links inside running text are underlined, not identified by color alone */
p a[href]:not([class*="btn"]):not([role="button"]),
dd a[href]:not([class*="btn"]):not([role="button"]),
.gs-row__desc a[href],
.ef-help a[href] {
    text-decoration: underline;
}

/* 2.2.1 Timing Adjustable: session expiry warning (session-timeout.js) */
.ss-session-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(7, 59, 69, 0.55);
}
.ss-session-dialog {
    box-sizing: border-box;
    width: 100%;
    max-width: 460px;
    padding: 24px;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2a30;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    font: 14px/1.5 "Segoe UI", Arial, sans-serif;
    text-align: left;
}
.ss-session-dialog h2 {
    margin: 0 0 10px;
    color: #073B45;
    font-size: 18px;
    font-weight: 600;
}
.ss-session-dialog p {
    margin: 0 0 18px;
}
.ss-session-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.ss-session-btn {
    min-height: 36px;
    padding: 6px 18px;
    border: 1px solid #0D6E7F;
    border-radius: 6px;
    background: #ffffff;
    color: #0D6E7F;
    font: 600 14px "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}
.ss-session-btn--primary {
    background: #0D6E7F;
    color: #ffffff;
}
.ss-session-btn:hover {
    background: #E6F6F9;
}
.ss-session-btn--primary:hover {
    background: #0E7A8C;
}