/**
 * Easy Read Theme / Old Fart Mode
 * 
 * Larger text for better readability, especially on dashboards.
 * Keeps navigation reasonable, focuses scaling on content areas.
 */

/* ============================================
   Global Font Scaling - Content Areas Only
   Don't scale the navbar/menu as aggressively
   ============================================ */
[data-accessibility="easy-read"],
html.easy-read-mode {
    line-height: 1.6 !important;
}

/* Scale main content areas more aggressively */
[data-accessibility="easy-read"] main,
[data-accessibility="easy-read"] .container,
[data-accessibility="easy-read"] .container-fluid,
[data-accessibility="easy-read"] .dashboard-container,
[data-accessibility="easy-read"] [role="main"],
html.easy-read-mode main,
html.easy-read-mode .container,
html.easy-read-mode .container-fluid,
html.easy-read-mode .dashboard-container,
html.easy-read-mode [role="main"] {
    font-size: 1.2rem !important;
}

/* ============================================
   Dashboard Specific - Bigger Text
   ============================================ */
[data-accessibility="easy-read"] .dashboard-card,
html.easy-read-mode .dashboard-card {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .metric-card__title,
html.easy-read-mode .metric-card__title {
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] .metric-card__number,
html.easy-read-mode .metric-card__number {
    font-size: 3rem !important;
}

[data-accessibility="easy-read"] .metric-card__subtitle,
html.easy-read-mode .metric-card__subtitle {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .dashboard-card__header h5,
[data-accessibility="easy-read"] .dashboard-card__header h6,
html.easy-read-mode .dashboard-card__header h5,
html.easy-read-mode .dashboard-card__header h6 {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .dashboard-card__header small,
html.easy-read-mode .dashboard-card__header small {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .quick-action-btn,
html.easy-read-mode .quick-action-btn {
    font-size: 1.05rem !important;
}

[data-accessibility="easy-read"] .quick-action-btn i,
html.easy-read-mode .quick-action-btn i {
    font-size: 1.4rem !important;
}

[data-accessibility="easy-read"] .utilization-label,
[data-accessibility="easy-read"] .utilization-value,
html.easy-read-mode .utilization-label,
html.easy-read-mode .utilization-value {
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] .utilization-details,
html.easy-read-mode .utilization-details {
    font-size: 1.05rem !important;
}

[data-accessibility="easy-read"] .status-item,
html.easy-read-mode .status-item {
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] .job-item__name,
html.easy-read-mode .job-item__name {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .job-item__meta,
html.easy-read-mode .job-item__meta {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .job-item__hours,
html.easy-read-mode .job-item__hours {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .quick-stat__number,
html.easy-read-mode .quick-stat__number {
    font-size: 2rem !important;
}

[data-accessibility="easy-read"] .quick-stat__label,
html.easy-read-mode .quick-stat__label {
    font-size: 0.95rem !important;
}

[data-accessibility="easy-read"] .alert-banner,
html.easy-read-mode .alert-banner {
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] .vacation-employee,
html.easy-read-mode .vacation-employee {
    font-size: 1.05rem !important;
}

[data-accessibility="easy-read"] .empty-state p,
html.easy-read-mode .empty-state p {
    font-size: 1.1rem !important;
}

/* ============================================
   Navigation - Keep it reasonable
   Don't bloat the menu
   ============================================ */
[data-accessibility="easy-read"] .navbar,
html.easy-read-mode .navbar {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .nav-link,
html.easy-read-mode .nav-link {
    font-size: 1.05rem !important;
    padding: 10px 14px !important;
}

[data-accessibility="easy-read"] .dropdown-item,
html.easy-read-mode .dropdown-item {
    font-size: 1.05rem !important;
    padding: 10px 16px !important;
}

[data-accessibility="easy-read"] .dropdown-menu,
html.easy-read-mode .dropdown-menu {
    font-size: 1.15rem !important;
}

/* Big easy-to-tap checkboxes in menu for geezer mode */
[data-accessibility="easy-read"] .dropdown-menu .form-check-input:not(.form-switch .form-check-input),
[data-accessibility="easy-read"] .navbar .form-check-input:not(.form-switch .form-check-input),
[data-accessibility="easy-read"] .offcanvas .form-check-input:not(.form-switch .form-check-input),
html.easy-read-mode .dropdown-menu .form-check-input:not(.form-switch .form-check-input),
html.easy-read-mode .navbar .form-check-input:not(.form-switch .form-check-input),
html.easy-read-mode .offcanvas .form-check-input:not(.form-switch .form-check-input) {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    margin-top: 0 !important;
    margin-right: 12px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    border: 2px solid #666 !important;
    border-radius: 6px !important;
}

[data-accessibility="easy-read"] .dropdown-menu .form-check-input:checked:not(.form-switch .form-check-input),
[data-accessibility="easy-read"] .navbar .form-check-input:checked:not(.form-switch .form-check-input),
[data-accessibility="easy-read"] .offcanvas .form-check-input:checked:not(.form-switch .form-check-input),
html.easy-read-mode .dropdown-menu .form-check-input:checked:not(.form-switch .form-check-input),
html.easy-read-mode .navbar .form-check-input:checked:not(.form-switch .form-check-input),
html.easy-read-mode .offcanvas .form-check-input:checked:not(.form-switch .form-check-input) {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Big toggle switches for geezer mode - must override the checkbox rules above */
[data-accessibility="easy-read"] .form-switch .form-check-input,
html.easy-read-mode .form-switch .form-check-input,
body.easy-read-mode .form-switch .form-check-input {
    width: 4.5em !important;
    height: 2.25em !important;
    min-width: 4.5em !important;
    min-height: 2.25em !important;
    cursor: pointer !important;
    border-radius: 2.25em !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e") !important;
}

[data-accessibility="easy-read"] .form-switch .form-check-input:checked,
html.easy-read-mode .form-switch .form-check-input:checked,
body.easy-read-mode .form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

[data-accessibility="easy-read"] .dropdown-menu .form-check-label,
[data-accessibility="easy-read"] .navbar .form-check-label,
[data-accessibility="easy-read"] .offcanvas .form-check-label,
html.easy-read-mode .dropdown-menu .form-check-label,
html.easy-read-mode .navbar .form-check-label,
html.easy-read-mode .offcanvas .form-check-label {
    font-size: 1.15rem !important;
    font-weight: normal !important;
}

[data-accessibility="easy-read"] .dropdown-menu small,
[data-accessibility="easy-read"] .offcanvas small,
html.easy-read-mode .dropdown-menu small,
html.easy-read-mode .offcanvas small {
    font-size: 0.9rem !important;
}

/* Mobile offcanvas - slightly larger for touch */
[data-accessibility="easy-read"] .offcanvas .nav-link,
html.easy-read-mode .offcanvas .nav-link {
    font-size: 1.1rem !important;
    padding: 14px 18px !important;
}

/* ============================================
   Headings
   ============================================ */
[data-accessibility="easy-read"] h1,
html.easy-read-mode h1 {
    font-size: 2.2rem !important;
}

[data-accessibility="easy-read"] h2,
html.easy-read-mode h2 {
    font-size: 1.9rem !important;
}

[data-accessibility="easy-read"] h3,
html.easy-read-mode h3 {
    font-size: 1.6rem !important;
}

[data-accessibility="easy-read"] h4,
[data-accessibility="easy-read"] h5,
[data-accessibility="easy-read"] h6,
html.easy-read-mode h4,
html.easy-read-mode h5,
html.easy-read-mode h6 {
    font-size: 1.3rem !important;
}

/* ============================================
   Form Controls - Larger touch targets
   ============================================ */
[data-accessibility="easy-read"] .form-control,
[data-accessibility="easy-read"] .form-select,
[data-accessibility="easy-read"] input[type="text"],
[data-accessibility="easy-read"] input[type="tel"],
[data-accessibility="easy-read"] input[type="email"],
[data-accessibility="easy-read"] input[type="password"],
[data-accessibility="easy-read"] input[type="number"],
[data-accessibility="easy-read"] input[type="date"],
[data-accessibility="easy-read"] input[type="time"],
[data-accessibility="easy-read"] textarea,
[data-accessibility="easy-read"] select,
html.easy-read-mode .form-control,
html.easy-read-mode .form-select,
html.easy-read-mode input[type="text"],
html.easy-read-mode input[type="tel"],
html.easy-read-mode input[type="email"],
html.easy-read-mode input[type="password"],
html.easy-read-mode input[type="number"],
html.easy-read-mode input[type="date"],
html.easy-read-mode input[type="time"],
html.easy-read-mode textarea,
html.easy-read-mode select {
    font-size: 1.1rem !important;
    min-height: 50px !important;
    padding: 10px 14px !important;
}

[data-accessibility="easy-read"] .form-label,
[data-accessibility="easy-read"] label:not(.form-check-label),
html.easy-read-mode .form-label,
html.easy-read-mode label:not(.form-check-label) {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

/* Regular checkboxes in forms (not in menu) */
[data-accessibility="easy-read"] .form-check-input:not(.navbar .form-check-input):not(.dropdown-menu .form-check-input):not(.offcanvas .form-check-input),
html.easy-read-mode .form-check-input:not(.navbar .form-check-input):not(.dropdown-menu .form-check-input):not(.offcanvas .form-check-input) {
    width: 1.3em !important;
    height: 1.3em !important;
}

/* ============================================
   Buttons
   ============================================ */
[data-accessibility="easy-read"] .btn,
[data-accessibility="easy-read"] button:not(.navbar-toggler):not(.btn-close):not(.accordion-button),
html.easy-read-mode .btn,
html.easy-read-mode button:not(.navbar-toggler):not(.btn-close):not(.accordion-button) {
    font-size: 1.1rem !important;
    min-height: 48px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
}

[data-accessibility="easy-read"] .btn-sm,
html.easy-read-mode .btn-sm {
    font-size: 1.15rem !important;
    min-height: 42px !important;
    padding: 8px 14px !important;
}

/* ============================================
   Cards
   ============================================ */
[data-accessibility="easy-read"] .card,
html.easy-read-mode .card {
    border-radius: 12px !important;
}

[data-accessibility="easy-read"] .card-body,
html.easy-read-mode .card-body {
    padding: 1.25rem !important;
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] .card-title,
html.easy-read-mode .card-title {
    font-size: 1.25rem !important;
}

[data-accessibility="easy-read"] .card-text,
html.easy-read-mode .card-text {
    font-size: 1.1rem !important;
}

/* Employee cards in scheduler */
[data-accessibility="easy-read"] .card .name,
[data-accessibility="easy-read"] .employee-name,
html.easy-read-mode .card .name,
html.easy-read-mode .employee-name {
    font-size: 1.4rem !important;
}

[data-accessibility="easy-read"] .card .job,
[data-accessibility="easy-read"] .job-name,
html.easy-read-mode .card .job,
html.easy-read-mode .job-name {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .card .top-line,
[data-accessibility="easy-read"] .top-line,
html.easy-read-mode .card .top-line,
html.easy-read-mode .top-line {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .card .notes,
[data-accessibility="easy-read"] .notes,
html.easy-read-mode .card .notes,
html.easy-read-mode .notes {
    font-size: 1.05rem !important;
}

/* ============================================
   Tables
   ============================================ */
[data-accessibility="easy-read"] table,
html.easy-read-mode table {
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] th,
[data-accessibility="easy-read"] td,
html.easy-read-mode th,
html.easy-read-mode td {
    padding: 12px 14px !important;
}

/* ============================================
   Modals
   ============================================ */
[data-accessibility="easy-read"] .modal-content,
html.easy-read-mode .modal-content {
    border-radius: 20px !important;
}

[data-accessibility="easy-read"] .modal-title,
html.easy-read-mode .modal-title {
    font-size: 1.35rem !important;
}

[data-accessibility="easy-read"] .modal-body,
html.easy-read-mode .modal-body {
    padding: 1.25rem !important;
    font-size: 1.1rem !important;
}

/* ============================================
   Alerts
   ============================================ */
[data-accessibility="easy-read"] .alert,
html.easy-read-mode .alert {
    font-size: 1.1rem !important;
    padding: 1rem 1.25rem !important;
    border-radius: 10px !important;
}

/* ============================================
   Small text helpers - make them readable
   ============================================ */
[data-accessibility="easy-read"] small:not(.dropdown-menu small):not(.offcanvas small),
[data-accessibility="easy-read"] .small:not(.dropdown-menu .small),
[data-accessibility="easy-read"] .text-muted:not(.dropdown-menu .text-muted),
html.easy-read-mode small:not(.dropdown-menu small):not(.offcanvas small),
html.easy-read-mode .small:not(.dropdown-menu .small),
html.easy-read-mode .text-muted:not(.dropdown-menu .text-muted) {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .badge,
html.easy-read-mode .badge {
    font-size: 0.95rem !important;
    padding: 0.4em 0.6em !important;
}

/* ============================================
   Links - More visible
   ============================================ */
[data-accessibility="easy-read"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):not(.quick-action-btn),
html.easy-read-mode a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):not(.quick-action-btn) {
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

/* ============================================
   Mobile Select Picker
   ============================================ */
[data-accessibility="easy-read"] .mobile-select-trigger,
html.easy-read-mode .mobile-select-trigger {
    min-height: 52px !important;
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] .picker-list-item,
html.easy-read-mode .picker-list-item {
    min-height: 52px !important;
    font-size: 1.15rem !important;
    padding: 14px 20px !important;
}

/* ============================================
   Accordion
   ============================================ */
[data-accessibility="easy-read"] .accordion-button,
html.easy-read-mode .accordion-button {
    font-size: 1.1rem !important;
    padding: 1rem 1.25rem !important;
}

/* ============================================
   Print - Reset to normal sizes
   ============================================ */
@media print {
    [data-accessibility="easy-read"] *,
    html.easy-read-mode * {
        font-size: revert !important;
    }
    
    [data-accessibility="easy-read"] .btn,
    html.easy-read-mode .btn {
        min-height: auto !important;
        padding: 4px 8px !important;
    }
}

/* ============================================
   Map Lookup Page Specific Overrides
   These have higher specificity to override inline styles
   ============================================ */
[data-accessibility="easy-read"] .sidebar .form-row select,
[data-accessibility="easy-read"] .sidebar .form-row input,
[data-accessibility="easy-read"] .sidebar .form-row button,
[data-accessibility="easy-read"] .sidebar select,
[data-accessibility="easy-read"] .sidebar input,
[data-accessibility="easy-read"] .form-section select,
[data-accessibility="easy-read"] .form-section input,
[data-accessibility="easy-read"] .form-section button,
html.easy-read-mode .sidebar .form-row select,
html.easy-read-mode .sidebar .form-row input,
html.easy-read-mode .sidebar .form-row button,
html.easy-read-mode .sidebar select,
html.easy-read-mode .sidebar input,
html.easy-read-mode .form-section select,
html.easy-read-mode .form-section input,
html.easy-read-mode .form-section button {
    font-size: 1.15rem !important;
    min-height: 52px !important;
    padding: 12px 16px !important;
}

[data-accessibility="easy-read"] .sidebar .form-row label,
[data-accessibility="easy-read"] .sidebar label,
[data-accessibility="easy-read"] .form-section label,
[data-accessibility="easy-read"] .form-section h3,
html.easy-read-mode .sidebar .form-row label,
html.easy-read-mode .sidebar label,
html.easy-read-mode .form-section label,
html.easy-read-mode .form-section h3 {
    font-size: 1.15rem !important;
}

[data-accessibility="easy-read"] .sidebar .checkbox-item label,
[data-accessibility="easy-read"] .checkbox-item label,
html.easy-read-mode .sidebar .checkbox-item label,
html.easy-read-mode .checkbox-item label {
    font-size: 1.1rem !important;
}

[data-accessibility="easy-read"] .sidebar .checkbox-item input[type="checkbox"],
[data-accessibility="easy-read"] .checkbox-item input[type="checkbox"],
html.easy-read-mode .sidebar .checkbox-item input[type="checkbox"],
html.easy-read-mode .checkbox-item input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
}

[data-accessibility="easy-read"] .action-buttons button,
[data-accessibility="easy-read"] .btn-primary,
[data-accessibility="easy-read"] .btn-secondary,
[data-accessibility="easy-read"] .btn-danger,
html.easy-read-mode .action-buttons button,
html.easy-read-mode .btn-primary,
html.easy-read-mode .btn-secondary,
html.easy-read-mode .btn-danger {
    font-size: 1.1rem !important;
    min-height: 52px !important;
    padding: 12px 20px !important;
}

/* ============================================
   Mobile Navigation Grid - Larger Icons
   Default is 96px, geezer mode is 112px
   ============================================ */
[data-accessibility="easy-read"] .nav-icon-bg,
html.easy-read-mode .nav-icon-bg,
body.easy-read-mode .nav-icon-bg,
.easy-read-mode .offcanvas .nav-icon-bg,
html[data-accessibility="easy-read"] .nav-icon-bg {
    width: 112px !important;
    height: 112px !important;
    border-radius: 24px !important;
}

[data-accessibility="easy-read"] .nav-icon-bg i,
html.easy-read-mode .nav-icon-bg i,
body.easy-read-mode .nav-icon-bg i,
.easy-read-mode .offcanvas .nav-icon-bg i,
html[data-accessibility="easy-read"] .nav-icon-bg i {
    font-size: 56px !important;
}

[data-accessibility="easy-read"] .nav-level-2 .nav-icon-bg,
html.easy-read-mode .nav-level-2 .nav-icon-bg,
body.easy-read-mode .nav-level-2 .nav-icon-bg,
.easy-read-mode .offcanvas .nav-level-2 .nav-icon-bg,
html[data-accessibility="easy-read"] .nav-level-2 .nav-icon-bg {
    width: 96px !important;
    height: 96px !important;
    border-radius: 20px !important;
}

[data-accessibility="easy-read"] .nav-level-2 .nav-icon-bg i,
html.easy-read-mode .nav-level-2 .nav-icon-bg i,
body.easy-read-mode .nav-level-2 .nav-icon-bg i,
.easy-read-mode .offcanvas .nav-level-2 .nav-icon-bg i,
html[data-accessibility="easy-read"] .nav-level-2 .nav-icon-bg i {
    font-size: 48px !important;
}

[data-accessibility="easy-read"] .nav-tile-label,
html.easy-read-mode .nav-tile-label,
body.easy-read-mode .nav-tile-label,
html[data-accessibility="easy-read"] .nav-tile-label {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
}

[data-accessibility="easy-read"] .nav-tile,
html.easy-read-mode .nav-tile,
body.easy-read-mode .nav-tile,
html[data-accessibility="easy-read"] .nav-tile {
    min-height: 140px !important;
    padding: 20px 16px !important;
}

