/* Accessibility + readability overrides — loaded after main.css so these win.
   Added 2026-04-23 at user request: "standard font size everybody can read". */

/* --- Base size & line-height -------------------------------------------- */
html { font-size: 16px; }
body, p, span, div, label, a, li, td, th, input, textarea, select, button {
    font-size: 15px;
    line-height: 1.55;
}

/* Headings get explicit scales instead of inheriting tiny */
h1 { font-size: 28px !important; line-height: 1.25; }
h2 { font-size: 24px !important; line-height: 1.3; }
h3 { font-size: 20px !important; line-height: 1.35; }
h4 { font-size: 18px !important; line-height: 1.4; }
h5 { font-size: 16px !important; line-height: 1.45; }

/* --- Forms --- inputs at 16px avoids mobile zoom-on-focus --------------- */
input, textarea, select, .it-input, .form-control {
    font-size: 16px !important;
    line-height: 1.5 !important;
    padding: 10px 14px !important;
    min-height: 44px;                  /* WCAG touch target */
}
label, .it-input-label, .form-label { font-size: 14px !important; font-weight: 600; }

/* Buttons are tap-targets: min 44x44 + readable text */
button, .btn, .it-btn, [role="button"] {
    font-size: 15px !important;
    min-height: 44px;
    padding: 10px 18px !important;
    line-height: 1.4 !important;
}

/* --- Toasts / alerts / small notifications ------------------------------ */
.swal2-popup, .swal2-html-container, .swal2-title,
.toast, .toast-body, .alert, .alert-message,
.notification, .flash-message {
    font-size: 16px !important;
    line-height: 1.5 !important;
}
.swal2-title { font-size: 20px !important; }

/* --- Table text (admin panels are heavy on tables) ---------------------- */
table, table td, table th, .table td, .table th {
    font-size: 14px !important;
    line-height: 1.5 !important;
}
table th, .table th { font-size: 14px !important; font-weight: 700; }

/* --- Contrast boosts (many admin panels use greys that fail WCAG AA) ---- */
body, .text-gray-500, .text-gray-600, .text-muted {
    color: #d9dce3 !important;         /* lift muted greys to AA on dark bg */
}
.text-gray-300, .text-gray-400 { color: #e8eaf0 !important; }
a, a:visited { color: #4da2ff !important; }
a:hover { color: #7ebfff !important; text-decoration: underline; }

/* Error/validation text needs to be visible */
.it-error, .invalid-feedback, .error, [class*="error"] {
    font-size: 14px !important;
    color: #ff6b6b !important;
    font-weight: 600 !important;
}

/* --- Visible focus rings (critical for keyboard users) ------------------ */
*:focus-visible {
    outline: 3px solid #1b6bf8 !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}
input:focus, textarea:focus, select:focus,
.it-input:focus, .form-control:focus {
    outline: 3px solid #1b6bf8 !important;
    outline-offset: 1px !important;
    box-shadow: 0 0 0 4px rgba(27,107,248,0.25) !important;
}

/* --- Respect prefers-reduced-motion ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Skip-to-content link (hidden until focused) ------------------------ */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #1b6bf8;
    color: white;
    padding: 12px 18px;
    font-size: 16px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 6px 0;
}
.skip-to-content:focus { left: 0; }
