/* css/a11y.css - the site's own accessibility button + menu + statement (user, 2026-10-12: no outside plugin, no
   mention of anyone else). Built by js/a11y.js, loaded on every page from inc/menu.asp. Everything of the widget lives
   under #dm-a11y, and every page mode below leaves #dm-a11y out, so the menu itself never changes under the user */

/* ===== the widget ===== */
#dm-a11y, #dm-a11y * { box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; letter-spacing: normal; word-spacing: normal; text-transform: none; }
#dm-a11y { direction: rtl; color: #1f2937; font-size: 15px; line-height: 1.4; }
#dm-a11y button { font: inherit; color: inherit; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
#dm-a11y [hidden] { display: none !important; }
#dm-a11y svg { display: block; flex-shrink: 0; }

/* the round button, bottom left */
#dm-a11y-btn {
    position: fixed; left: 16px; bottom: 16px; z-index: 2147483000; width: 52px; height: 52px; padding: 0;
    border-radius: 50%; border: 2px solid #c21415; background: #fff; color: #c21415;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
#dm-a11y #dm-a11y-btn { color: #c21415; } /* over "#dm-a11y button { color: inherit }" */
#dm-a11y-btn svg { width: 32px; height: 32px; }
#dm-a11y-btn:hover, #dm-a11y-btn[aria-expanded="true"] { background: #fdecec; }
#dm-a11y button:focus-visible { outline: 3px solid #c21415; outline-offset: 2px; }

/* the menu, above the button */
#dm-a11y-panel {
    position: fixed; left: 16px; bottom: 80px; z-index: 2147483000; width: 340px; max-width: calc(100vw - 32px);
    max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.dm-a11y-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px;
    border-bottom: 2px solid #c21415; position: sticky; top: 0; background: #fff; z-index: 1;
}
.dm-a11y-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 18px; font-weight: bold; color: #c21415; }
.dm-a11y-title svg { width: 24px; height: 24px; }
#dm-a11y .dm-a11y-x {
    width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1px solid #e5e7eb; background: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: bold; line-height: 1;
}
#dm-a11y .dm-a11y-x:hover { background: #fdecec; color: #c21415; border-color: #c21415; }
.dm-a11y-body { padding: 4px 14px 8px; }
.dm-a11y-group { padding: 10px 0; border-bottom: 1px solid #f0f1f3; }
.dm-a11y-group:last-child { border-bottom: 0; }
.dm-a11y-gtitle { margin: 0 0 8px; font-size: 14px; font-weight: bold; color: #6b7280; }

/* text size: - 100% + */
.dm-a11y-size { display: flex; align-items: center; gap: 8px; }
#dm-a11y .dm-a11y-size button {
    flex: 1; height: 42px; padding: 0 8px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font-weight: bold; font-size: 15px;
}
#dm-a11y .dm-a11y-size button:hover { border-color: #c21415; background: #fdecec; color: #c21415; }
#dm-a11y .dm-a11y-size button:disabled { opacity: .4; cursor: default; background: #fff; border-color: #e5e7eb; color: inherit; }
.dm-a11y-size-val { min-width: 56px; text-align: center; font-weight: bold; font-size: 16px; }

/* on / off options, two in a row */
.dm-a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#dm-a11y .dm-a11y-opt {
    display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; text-align: right;
    border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font-size: 14px; line-height: 1.25;
}
#dm-a11y .dm-a11y-opt:hover { border-color: #c21415; background: #fdecec; }
#dm-a11y .dm-a11y-opt .dm-a11y-check {
    width: 18px; height: 18px; flex-shrink: 0; border: 2px solid #9ca3af; border-radius: 5px; position: relative;
}
#dm-a11y .dm-a11y-opt[aria-pressed="true"] { border-color: #c21415; background: #fdecec; color: #c21415; font-weight: bold; }
#dm-a11y .dm-a11y-opt[aria-pressed="true"] .dm-a11y-check { border-color: #c21415; background: #c21415; }
#dm-a11y .dm-a11y-opt[aria-pressed="true"] .dm-a11y-check::after {
    content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* reset + statement */
.dm-a11y-foot { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid #e5e7eb; }
#dm-a11y .dm-a11y-foot button {
    flex: 1; height: 42px; padding: 0 8px; border-radius: 10px; font-size: 14px; font-weight: bold;
    border: 1px solid #e5e7eb; background: #fff;
}
#dm-a11y .dm-a11y-foot button:hover { border-color: #c21415; background: #fdecec; color: #c21415; }
#dm-a11y .dm-a11y-foot .dm-a11y-stmt-open { border-color: #c21415; color: #c21415; }

/* the statement window - closes only from its X / its button (never by a click outside it) */
.dm-a11y-overlay {
    position: fixed; inset: 0; z-index: 2147483001; background: rgba(17,24,39,.55);
    display: flex; align-items: center; justify-content: center; padding: 12px;
}
.dm-a11y-modal {
    position: relative; width: 760px; max-width: 100%; max-height: calc(100vh - 24px); overflow-y: auto;
    background: #fff; border-radius: 16px; border: 1px solid #e5e7eb; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 22px 26px 24px;
}
.dm-a11y-modal .dm-a11y-x { position: absolute; top: 14px; left: 14px; }
.dm-a11y-modal h2 { margin: 0 0 14px; padding: 0 40px; text-align: center; font-size: 22px; color: #c21415; }
.dm-a11y-modal h3 { margin: 16px 0 6px; font-size: 16px; color: #1f2937; }
.dm-a11y-modal p, .dm-a11y-modal li { margin: 0 0 6px; font-size: 15px; line-height: 1.6; color: #1f2937; }
.dm-a11y-modal ul { margin: 0 0 6px; padding: 0 20px 0 0; }
.dm-a11y-modal a { color: #c21415; }
.dm-a11y-modal .dm-a11y-modal-foot { margin-top: 16px; text-align: center; }
#dm-a11y .dm-a11y-modal .dm-a11y-close-btn {
    height: 42px; padding: 0 28px; border-radius: 10px; border: 1px solid #c21415; background: #c21415; color: #fff; font-weight: bold;
}
#dm-a11y .dm-a11y-modal .dm-a11y-close-btn:hover { background: #a31011; }

@media (max-width: 640px) {
    #dm-a11y-panel { left: 12px; right: 12px; width: auto; max-width: none; bottom: 76px; max-height: calc(100vh - 92px); }
    /* a phone: 20% smaller (user, 2026-10-21 - it filled the screen and its X was out of reach): at most 80% of the
       height the reader actually sees (dvh - an iPhone's 100vh runs under its address bar), and its buttons / spacing a
       fifth smaller; the X stays at its top (its head is sticky) */
    /* ...its height: all the room above the button, of the height the reader actually sees (no 80% cap - user,
       2026-10-21): its whole content (~550px) opens without scrolling on a common phone; a small one scrolls inside it */
    #dm-a11y-panel { max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px); }
    .dm-a11y-head { padding: 9px 12px; }
    .dm-a11y-title { font-size: 16px; }
    .dm-a11y-title svg { width: 20px; height: 20px; }
    .dm-a11y-body { padding: 2px 12px 6px; }
    .dm-a11y-group { padding: 8px 0; }
    .dm-a11y-gtitle { margin-bottom: 6px; font-size: 13px; }
    #dm-a11y .dm-a11y-size button, #dm-a11y .dm-a11y-foot button { height: 36px; font-size: 13px; }
    .dm-a11y-grid { gap: 6px; }
    #dm-a11y .dm-a11y-opt { min-height: 36px; padding: 6px 8px; font-size: 13px; gap: 6px; }
    .dm-a11y-foot { padding: 8px 12px 10px; }
    .dm-a11y-modal { padding: 18px 16px 20px; }
    .dm-a11y-modal h2 { font-size: 20px; }
}

/* ===== what the options do to the page (classes on <html>, set by js/a11y.js and by the early script in inc/menu.asp) ===== */

/* colors - one at a time */
html.dm-a11y-gray body > *:not(#dm-a11y) { filter: grayscale(1); }
html.dm-a11y-invert body { background: #0c0b0a !important; }
html.dm-a11y-invert body > *:not(#dm-a11y) { filter: invert(1) hue-rotate(180deg); }
html.dm-a11y-invert body > *:not(#dm-a11y) :is(img, video, iframe, .video-lite) { filter: invert(1) hue-rotate(180deg); }
html.dm-a11y-invert body > *:not(#dm-a11y) .card-frame-bg { filter: invert(1) hue-rotate(180deg) blur(18px) brightness(.85); }
html.dm-a11y-contrast body,
html.dm-a11y-contrast body *:not(#dm-a11y):not(#dm-a11y *) {
    background-color: #000 !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; text-shadow: none !important;
}
html.dm-a11y-contrast body a:not(#dm-a11y *), html.dm-a11y-contrast body a:not(#dm-a11y *) * { color: #ffeb3b !important; }

/* readable font, text spacing */
html.dm-a11y-font body *:not(#dm-a11y):not(#dm-a11y *) { font-family: Arial, Helvetica, sans-serif !important; }
html.dm-a11y-spacing body :is(p, li, dd, dt, td, th, label, blockquote, figcaption, h1, h2, h3, h4, h5, h6, .text-content, .card-title):not(#dm-a11y *) {
    letter-spacing: .06em !important; word-spacing: .16em !important; line-height: 1.9 !important;
}

/* stop movement */
html.dm-a11y-still *:not(#dm-a11y *), html.dm-a11y-still *::before, html.dm-a11y-still *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* marks: links, headings, the focused element */
html.dm-a11y-links body a:not(#dm-a11y *) { text-decoration: underline !important; outline: 2px solid #c21415 !important; outline-offset: 2px !important; }
html.dm-a11y-headings body :is(h1, h2, h3, h4, h5, h6, .card-title):not(#dm-a11y *) { outline: 2px dashed #c21415 !important; outline-offset: 3px !important; }
html.dm-a11y-focus body *:focus { outline: 3px solid #c21415 !important; outline-offset: 2px !important; box-shadow: 0 0 0 6px rgba(194,20,21,.25) !important; }

/* a big mouse pointer */
html.dm-a11y-cursor, html.dm-a11y-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11-6.5 1 3.8 7.2-2.6 1.4-3.8-7.3L4 19.5z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
