/* VerificaIMEI.ro — widget de accesibilitate (vezi /js/a11y.js) */

/* ══ Widget ══════════════════════════════════════════════════════════════ */
.a11y-root, .a11y-root * { box-sizing: border-box; }
/* Colțul din stânga-jos (dreapta e ocupată de „Instalează aplicația”) */
.a11y-root {
    --a11y-bottom: 16px;
    --a11y-teal: #00735d;
    position: fixed;
    left: calc(16px + env(safe-area-inset-left, 0px));
    bottom: calc(var(--a11y-bottom) + env(safe-area-inset-bottom, 0px));
    z-index: 9998;
    font: 400 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #0f172a;
    transition: bottom .25s ease;
}
.a11y-fab {
    position: relative;
    width: 48px; height: 48px;
    margin: 0; padding: 0;
    border: 2px solid #fff; border-radius: 50%;
    background: var(--a11y-teal); color: #fff;
    display: grid; place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(15,23,42,.28);
    -webkit-tap-highlight-color: transparent;
}
.a11y-fab:hover { background: #005f4d; }
.a11y-fab:focus-visible, .a11y-panel button:focus-visible {
    outline: 3px solid #f59e0b; outline-offset: 2px;
}
.a11y-dot {
    position: absolute; top: -2px; right: -2px; /* pe buton, nu pe pagină */
    width: 14px; height: 14px; border-radius: 50%;
    background: #f59e0b; border: 2px solid #fff;
}
.a11y-dot[hidden] { display: none; }

.a11y-panel {
    position: absolute; left: 0; bottom: 60px;
    width: min(330px, calc(100vw - 32px));
    max-height: min(560px, calc(100vh - var(--a11y-bottom) - 140px));
    max-height: min(560px, calc(100dvh - var(--a11y-bottom) - 140px));
    overflow-y: auto; overscroll-behavior: contain;
    background: #fff;
    border: 1px solid #d5dce5; border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15,23,42,.25);
    padding: 16px;
}
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.a11y-title { margin: 0; font: 700 17px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #0f172a; }
.a11y-close {
    width: 36px; height: 36px; margin: 0; padding: 0;
    border: 0; border-radius: 10px; background: #f1f4f8; color: #0f172a;
    display: grid; place-items: center; cursor: pointer;
}
.a11y-close:hover { background: #e3e8ee; }

.a11y-text {
    display: grid; grid-template-columns: 1fr 44px 56px 44px; align-items: center; gap: 6px;
    padding: 10px; margin-bottom: 10px;
    background: #f6f8fb; border: 1px solid #e3e8ee; border-radius: 12px;
}
.a11y-text-label { font-weight: 600; font-size: 14px; }
.a11y-text-value { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.a11y-step {
    height: 40px; margin: 0; padding: 0;
    border: 1px solid #cdd5df; border-radius: 10px; background: #fff; color: #0f172a;
    font: 700 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; cursor: pointer;
}
.a11y-step-big { font-size: 18px; }
.a11y-step:disabled { opacity: .4; cursor: default; }

.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-toggle {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    min-height: 76px; margin: 0; padding: 10px;
    border: 1.5px solid #e3e8ee; border-radius: 12px; background: #fff; color: #0f172a;
    font: 600 13.5px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    text-align: left; cursor: pointer;
}
.a11y-toggle:hover { border-color: #9fb0c3; }
.a11y-toggle[aria-pressed="true"] { border-color: var(--a11y-teal); background: #e7f4f1; }
.a11y-toggle-mark {
    width: 22px; height: 22px; border-radius: 6px; border: 2px solid #9fb0c3; background: #fff;
    display: grid; place-items: center;
}
.a11y-toggle[aria-pressed="true"] .a11y-toggle-mark { border-color: var(--a11y-teal); background: var(--a11y-teal); }
.a11y-toggle[aria-pressed="true"] .a11y-toggle-mark::after {
    content: ""; width: 10px; height: 6px; margin-top: -3px;
    border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg);
}
.a11y-reset {
    width: 100%; min-height: 44px; margin: 12px 0 0; padding: 8px;
    border: 1.5px solid #cdd5df; border-radius: 12px; background: #fff; color: #0f172a;
    font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; cursor: pointer;
}
.a11y-reset:disabled { opacity: .45; cursor: default; }
.a11y-note { margin: 10px 0 0; font-size: 12.5px; color: #4b5563; }

/* nu acoperi bannerul de cookies și meniul mobil deschis */
body:has(.cookie-banner.show) .a11y-root,
body:has(.cookie-modal-overlay.open) .a11y-root,
body:has(.nav-links.active) .a11y-root { display: none; }

@media print { .a11y-root { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .a11y-root { transition: none; } }

/* ══ Moduri aplicate pe pagină (clase pe <html>) ═════════════════════════ */

/* Mărime text: site-ul folosește rem → scalăm rădăcina */
html.a11y-t1:not(.a11y-zoom) { font-size: 115%; }
html.a11y-t2:not(.a11y-zoom) { font-size: 130%; }
html.a11y-t3:not(.a11y-zoom) { font-size: 150%; }
/* Pagini cu text în px (raportul): mărim conținutul, nu și widgetul */
html.a11y-zoom.a11y-t1 body > :not(.a11y-root) { zoom: 1.12; }
html.a11y-zoom.a11y-t2 body > :not(.a11y-root) { zoom: 1.25; }
html.a11y-zoom.a11y-t3 body > :not(.a11y-root) { zoom: 1.4; }
html[class*="a11y-t"] body { overflow-wrap: break-word; }

/* Contrast ridicat: textele gri devin aproape negre, chenarele mai vizibile */
html.a11y-contrast {
    --slate: #1f2937; --slate-2: #273444; --white: #000;
    --muted: #1f2937; --faint: #374151; --text: #000;
    --border: #6b7686; --line: #8a95a5;
    --teal: #005e4c;
}
html.a11y-contrast body { color: #000; }
html.a11y-contrast :where(p, li, td, th, dd, dt, small, label, figcaption, blockquote):not(:is(button, [class*="btn"], [class*="cta"], .a11y-root) *) { color: #111 !important; }
html.a11y-contrast a:not([class*="btn"]):not([class*="cta"]):not(.a11y-root *) { color: #004d3e !important; }
html.a11y-contrast ::placeholder { color: #374151 !important; opacity: 1; }

/* Evidențiază linkurile + focus foarte vizibil */
html.a11y-links a:not(.a11y-root *) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important; }
html.a11y-links a:not([class*="btn"]):not([class*="cta"]):not(.a11y-root *) { background-color: rgba(255, 213, 79, .35); }
html.a11y-links :focus-visible { outline: 3px solid #f59e0b !important; outline-offset: 2px !important; }

/* Font ușor de citit */
html.a11y-font body, html.a11y-font body :not(svg):not(svg *):not(code):not(pre):not(kbd) {
    font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
    letter-spacing: .03em !important;
    word-spacing: .08em !important;
}

/* Spațiere mărită (WCAG 1.4.12) */
html.a11y-spacing body :where(p, li, td, th, dd, dt, label, blockquote, summary):not(.a11y-root *) { line-height: 1.8 !important; }
html.a11y-spacing body :where(p, li) { margin-bottom: .9em; }

/* Oprește animațiile (stările finale rămân corecte) */
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
}

/* Cursor mare */
html.a11y-cursor, html.a11y-cursor body, html.a11y-cursor body * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M4 2l26 18-12 2 7 13-5 3-7-13-9 8z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}
html.a11y-cursor body :is(a, button, [role="button"], summary, label, select),
html.a11y-cursor body :is(a, button, [role="button"], summary) * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M4 2l26 18-12 2 7 13-5 3-7-13-9 8z' fill='%2300735d' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, pointer !important;
}
