/* ---- Floating trigger button ---- */
#accessibility-trigger {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
    background-color: #8B1A1A;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    font-size: 20px;
}
#accessibility-trigger:focus { outline: 3px solid #fff; }

/* ---- Side panel ---- */
#accessibility-panel {
    position: fixed;
    left: -330px;
    top: 0;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 99998;
    box-shadow: 2px 0 12px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    font-family: Arial, sans-serif;
    font-size: 13px;
}
#accessibility-panel.open { left: 0; }

/* Panel header */
#acc-header {
    background-color: #8B1A1A;
    color: #fff;
    padding: 18px 14px 14px;
    text-align: center;
    position: relative;
}
#acc-header .acc-icon-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 6px;
}
#acc-header h2 { font-size: 15px; margin: 4px 0 2px; color:#fff; }
#acc-header p { font-size: 11px; margin:0; color: #eee; }
#acc-header p a { color: #ffd; text-decoration: underline; cursor: pointer; background:none; border:none; font-size:11px; }

#acc-close {
    position: absolute; top: 10px; right: 10px;
    background: none; border: none; color: #fff;
    font-size: 20px; cursor: pointer; line-height:1;
}

/* Panel scrollable body */
#acc-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 10px;
}

/* Section titles */
.acc-section-title {
    font-weight: bold;
    font-size: 12px;
    color: #333;
    margin: 10px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

/* Module grid */
.acc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.acc-btn {
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 4px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #333;
    text-align: center;
    min-height: 60px;
    transition: background 0.15s, border-color 0.15s;
    gap: 4px;
}
.acc-btn:hover { background: #ffe8e8; border-color: #8B1A1A; }
.acc-btn.active { background: #8B1A1A; color: #fff; border-color: #8B1A1A; }
.acc-btn svg { width: 20px; height: 20px; flex-shrink:0; }

/* Font-size / line-height stepper button */
.acc-stepper {
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #333;
    min-height: 60px;
    justify-content: center;
    gap: 4px;
}
.acc-stepper .stepper-row {
    display: flex; align-items: center; gap: 6px;
}
.acc-stepper button {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #8B1A1A;
    border: none; color: #fff;
    font-size: 16px; line-height:1;
    cursor: pointer; display:flex; align-items:center; justify-content:center;
}
.acc-stepper span { font-size: 11px; min-width: 42px; text-align:center; }

/* Reset button */
#acc-reset {
    background: #8B1A1A;
    color: #fff;
    border: none;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0;
    margin-top: 8px;
    flex-shrink: 0;
}
#acc-reset:hover { background: #6a1212; }

/* ---- Statement / Accessibility Commitment page ---- */
#acc-statement-page {
    display: none;
    flex-direction: column;
    height: 100%;
}
#acc-statement-page.visible { display: flex; }
#acc-statement-back {
    background: none; border: 1px solid #999;
    border-radius: 4px; padding: 4px 14px;
    cursor: pointer; font-size: 13px;
    margin: 12px 12px 4px;
    align-self: flex-start;
}
#acc-statement-content {
    flex:1; overflow-y: auto; padding: 4px 14px 16px;
    font-size: 12px; line-height: 1.6; color: #222;
}
#acc-statement-content h3 { font-size: 14px; font-weight:bold; margin-bottom:6px; }
#acc-statement-content h4 { font-size: 13px; font-weight:bold; margin: 12px 0 4px; }
#acc-statement-content p { margin: 0 0 8px; }
#acc-statement-content ul { margin: 4px 0 8px 18px; padding:0; }
#acc-statement-content ul li { margin-bottom: 3px; }
#acc-statement-content a { color: #8B1A1A; }
#acc-statement-content strong { font-weight: bold; }

/* ---- PANEL ISOLATION: accessibility panel always keeps its own styling ---- */
#accessibility-panel, #accessibility-panel *,
#accessibility-trigger, #accessibility-trigger * {
    filter: none !important;
    -webkit-filter: none !important;
}
#accessibility-panel { background: #fff !important; color: #333 !important; }
#acc-header { background-color: #8B1A1A !important; color: #fff !important; }
#acc-header h2, #acc-header p, #acc-header a { color: #fff !important; background: none !important; }
#acc-header .acc-icon-circle { border-color: #fff !important; }
#acc-reset { background: #8B1A1A !important; color: #fff !important; }
.acc-btn { background: #f5f5f5 !important; color: #333 !important; border-color: #e0e0e0 !important; }
.acc-btn.active { background: #8B1A1A !important; color: #fff !important; border-color: #8B1A1A !important; }
.acc-stepper { background: #f5f5f5 !important; color: #333 !important; border-color: #e0e0e0 !important; }
.acc-stepper button { background: #8B1A1A !important; color: #fff !important; }
.acc-section-title { color: #333 !important; background: none !important; }
#accessibility-trigger { background-color: #8B1A1A !important; color: #fff !important; }

/* ---- Main panel view (hides when statement showing) ---- */
#acc-main-view { display: flex; flex-direction: column; height: 100%; }
#acc-main-view.hidden { display: none; }

/* ---- ng-cloak override: keep trigger visible before Angular bootstraps ---- */
[ng-cloak] #accessibility-trigger,
[ng\:cloak] #accessibility-trigger { display: flex !important; visibility: visible !important; opacity: 1 !important; }

/* ================================================================
   CSP-SAFE DYNAMIC CLASSES
   All accessibility feature styles are pre-written here.
   JavaScript toggles them via classList on <body> — no inline
   style injection needed, fully compatible with style-src 'self'.
   ================================================================ */

/* ---- Font Size steps ---- */
body.acc-fs--3 *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 8px !important; }
body.acc-fs--2 *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 10px !important; }
body.acc-fs--1 *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 12px !important; }
body.acc-fs-1  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 16px !important; }
body.acc-fs-2  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 20px !important; }
body.acc-fs-3  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 24px !important; }
body.acc-fs-4  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 28px !important; }
body.acc-fs-5  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-size: 34px !important; }

/* ---- Line Height steps ---- */
body.acc-lh--2 *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { line-height: 1.1 !important; }
body.acc-lh--1 *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { line-height: 1.3 !important; }
body.acc-lh-1  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { line-height: 1.7 !important; }
body.acc-lh-2  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { line-height: 1.9 !important; }
body.acc-lh-3  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { line-height: 2.1 !important; }
body.acc-lh-4  *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { line-height: 2.3 !important; }

/* ---- Readable Font ---- */
/* FIX: Changed from Arial (same as page default — no visible effect) to Verdana
   so users can clearly see the font change when this feature is toggled ON.      */
body.acc-readablefont *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) {
    font-family: Verdana, Tahoma, Geneva, sans-serif !important;
    letter-spacing: 0.03em !important;
}

/* ---- Big Cursor ---- */
body.acc-bigcursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3l12 9-7 1-3 7z'/%3E%3C/svg%3E") 0 0, auto !important; }

/* ---- Letter Spacing ---- */
body.acc-letterspacing *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { letter-spacing: 0.12em !important; }

/* ---- Align Text (left-align) ---- */
body.acc-aligntext p:not(#accessibility-panel p),
body.acc-aligntext li:not(#accessibility-panel li),
body.acc-aligntext span:not(#accessibility-panel span),
body.acc-aligntext td:not(#accessibility-panel td),
body.acc-aligntext div:not(#accessibility-panel):not(#accessibility-panel div) { text-align: left !important; }

/* ---- Font Weight (bold) ---- */
body.acc-fontweight *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { font-weight: bold !important; }

/* ---- Light Contrast ---- */
body.acc-lightcontrast { background-color: #fffde7 !important; color: #222 !important; }
body.acc-lightcontrast *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { color: #222 !important; }

/* ---- High Contrast ---- */
body.acc-highcontrast { background-color: #000 !important; color: #fff !important; }
body.acc-highcontrast *:not(#accessibility-panel):not(#accessibility-panel *):not(#accessibility-trigger):not(#accessibility-trigger *) { background-color: transparent !important; color: #fff !important; border-color: #fff !important; }
body.acc-highcontrast a:not(#accessibility-panel a) { color: #ff0 !important; }

/* ---- Monochrome ---- */
body.acc-monochrome .content-wrapper,
body.acc-monochrome .main-header,
body.acc-monochrome .main-sidebar,
body.acc-monochrome .main-footer,
body.acc-monochrome .wrapper > *:not(#accessibility-panel):not(#accessibility-trigger),
body.acc-monochrome .middle-box { -webkit-filter: grayscale(100%) !important; filter: grayscale(100%) !important; }

/* ---- Hide Images ---- */
body.acc-hideimages img:not(#accessibility-panel img),
body.acc-hideimages video,
body.acc-hideimages svg:not(#accessibility-trigger svg):not(#accessibility-panel svg) { visibility: hidden !important; }

/* ---- Highlight Content ---- */
body.acc-highlightcontent p:not(#accessibility-panel p),
body.acc-highlightcontent li:not(#accessibility-panel li),
body.acc-highlightcontent h1, body.acc-highlightcontent h2,
body.acc-highlightcontent h3, body.acc-highlightcontent h4,
body.acc-highlightcontent h5, body.acc-highlightcontent h6,
body.acc-highlightcontent span:not(#accessibility-panel span),
body.acc-highlightcontent label:not(#accessibility-panel label),
body.acc-highlightcontent td:not(#accessibility-panel td) { background-color: #fffacd !important; }

/* ---- Stop Animations ---- */
body.acc-stopanimations *:not(#accessibility-panel):not(#accessibility-panel *),
body.acc-stopanimations *:not(#accessibility-panel):not(#accessibility-panel *)::before,
body.acc-stopanimations *:not(#accessibility-panel):not(#accessibility-panel *)::after { animation: none !important; transition: none !important; }

/* ---- Highlight Links ---- */
body.acc-highlightlinks a:not(#accessibility-panel a) { outline: 2px solid #8B1A1A !important; background: #fff8e1 !important; color: #8B1A1A !important; }

/* ---- Reading Line / Mask visibility ---- */
#acc-reading-line { display: none; }
#acc-reading-line.acc-visible { display: block; }
#acc-mask-top, #acc-mask-bottom { display: none; }
#acc-mask-top.acc-visible, #acc-mask-bottom.acc-visible { display: block; }

/* ---- Language dropdown item classes ---- */
.acc-lang-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px; }
.acc-lang-item-hover { background: #f5f5f5; }
.acc-lang-flag { vertical-align: middle; border-radius: 2px; flex-shrink: 0; }

/* ---- Reading line fixed position (replaces inline style) ---- */
#acc-reading-line {
    position: fixed;
    left: 0;
    width: 100%;
    height: 3px;
    background: #8B1A1A;
    z-index: 99997;
    pointer-events: none;
    top: 50%;
}

/* ---- Reading mask fixed position (replaces inline style) ---- */
#acc-mask-top {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 99996;
    pointer-events: none;
}
#acc-mask-bottom {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 99996;
    pointer-events: none;
}

/* ---- Stepper label divs (replaces inline style in panel HTML) ---- */
.acc-stepper-label {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 2px;
}