/* =============================================================================
   ArtHaus Website Accessibility Styles
   ============================================================================= */

/* Skip Links for Screen Readers - Hidden by Default */
.skip-link {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: bold;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.skip-link:focus,
.skip-link:active {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.skip-link:hover {
    background: #333;
    color: #fff;
}

/* Focus Management */
*:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Ensure focus is visible on interactive elements */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Custom focus for buttons with background */
.btn-arthaus:focus,
.hover-slider:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px #007cba;
}

/* Enhanced focus for navigation */
.nav a:focus,
.dropdown-nav-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    background-color: rgba(0, 124, 186, 0.1);
}

/* Enhanced Focus Management for Dropdown Navigation */
.dropdown-nav-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    background-color: rgba(0, 124, 186, 0.1);
    border-radius: 2px;
}

/* Focus styles for dropdown toggle buttons */
span[role="button"]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    background-color: rgba(0, 124, 186, 0.15);
    border-radius: 2px;
}

/* Enhanced focus for custom button elements */
[role="button"]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    background-color: rgba(0, 124, 186, 0.1);
}

/* Ensure all interactive elements have visible focus */
[tabindex="0"]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Keyboard navigation enhancements */
.nav-drop span[role="button"] {
    display: inline-block;
    cursor: pointer;
    padding: 4px;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.nav-drop span[role="button"]:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Dropdown keyboard access is handled in main.css (:focus-within / .is-open).
   The submenus are hidden with visibility+opacity, so display:block cannot
   reveal them — the rules that used to live here never took effect. */

/* Screen Reader Only Text */
/* M-15 — .visually-hidden is used by the sitewide search modal but was
   only defined in home.css, which only the homepage loads: its live-region
   text rendered as visible unstyled copy on every other page. */
.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Preserve Original Font Weights for Converted Headings */
h1.heading-lg,
h1.heading-xl,
h2.heading-lg,
h2.heading-xl,
h2.heading-md,
h2.heading-collection,
h3.heading-sm,
h3.heading-md,
h3.heading-lg {
    font-weight: inherit !important;
    /* Use the original CSS weight, not browser default */
    margin: 0 !important;
    /* Remove browser default margins */
    line-height: inherit !important;
    /* Keep original line height */
    text-transform: none !important;
    /* Prevent unwanted uppercase */
}

/* Specific overrides for common heading class combinations */
h1.heading-lg span.change-font,
h2.heading-lg span.change-font,
h2.heading-xl span.change-font,
h3.heading-lg span.change-font {
    font-weight: inherit !important;
    text-transform: none !important;
}

/* Reset text transform for all converted headings */
h1[class*="heading-"],
h2[class*="heading-"],
h3[class*="heading-"] {
    text-transform: none !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    *:focus {
        outline: 3px solid;
        outline-offset: 2px;
    }

    .skip-link {
        border: 2px solid #fff;
    }

    .text-orange {
        color: #b35900 !important;
        /* Darker orange for better contrast */
    }

    .dropdown-nav-btn:focus,
    span[role="button"]:focus,
    [role="button"]:focus,
    [tabindex="0"]:focus {
        outline: 3px solid;
        outline-offset: 2px;
        background-color: rgba(255, 255, 0, 0.3);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .skip-link {
        transition: none;
    }

    .animated,
    .wow,
    .slick-slide {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Color Contrast Improvements */
.sub-heading.text-orange {
    color: #b35900;
    /* Darker orange for better contrast ratio */
}

.text-orange {
    color: #b35900;
    /* Improved contrast while maintaining brand colors */
}

/* Minimum Font Size Enforcement */
.slick-dots button {
    font-size: 11px !important;
    /* Ensure minimum 11px font size */
    line-height: 1.4;
    min-width: 11px;
    min-height: 11px;
}

/* Improved Button Accessibility */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button:disabled:focus {
    outline: 2px solid #999;
}

/* Enhanced Link Styles - Screen Reader Only */
a[target="_blank"]::after {
    content: " (opens in new tab)";
    /* Screen reader only - visually hidden */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Alternative: Visual icon for external links (optional) */

/* Form Accessibility Improvements */
/* M-01 — removed: ::after does not generate a box on <input> or <select>,
   so this required-field marker never rendered. Required fields are marked
   in the markup instead (see includes/book-a-tour-universal.php). */

/* Improved Table Accessibility */
table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

table th,
table td {
    border: 1px solid #949494;   /* N-02 — was #ddd, 1.36:1 against white */
    padding: 8px;
}

/* Carousel/Slider Accessibility */
[role="region"][aria-label] {
    border: none;
}

.slick-dots {
    text-align: center;
    margin-top: 20px;
}

.slick-dots button {
    background: transparent;
    border: 2px solid #333;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    margin: 0 5px;
    text-indent: -9999px;
    overflow: hidden;
}

.slick-dots .slick-active button {
    background: #333;
}

.slick-dots button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print Styles for Accessibility */
@media print {

    .skip-link,
    .burger,
    .slick-dots,
    .slick-arrow {
        display: none !important;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="mailto"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Mobile Accessibility Improvements */
@media (max-width: 768px) {
    .skip-link {
        left: 10px;
        right: 10px;
        width: auto;
        text-align: center;
    }

    /* M-01 — removed: this had no effect on inline links (min-height does not
       apply to non-replaced inline boxes) while distorting every inline-block
       chip and icon control below 768px. Target size is AAA; revisit per
       component rather than globally. */

    /* Adjust focus indicators for mobile */
    *:focus {
        outline-width: 3px;
    }

    span[role="button"]:focus,
    .dropdown-nav-btn:focus {
        outline-width: 3px;
        outline-offset: 1px;
    }

}

/* Keyboard Navigation Enhancements */

/* Loading States for Screen Readers */

/* Preserve original styling for converted heading elements */
h1.heading-lg,
h1.heading-xl,
h2.heading-lg,
h2.heading-xl,
h2.heading-md,
h2.heading-collection,
h3.heading-sm,
h3.heading-md {
    font-weight: inherit !important;
    margin: 0 !important;
    line-height: inherit !important;
    text-transform: none !important;
}

/* Additional overrides for nested spans */
h1.heading-lg span.change-font,
h2.heading-lg span.change-font,
h2.heading-md span.change-font {
    font-weight: inherit !important;
    text-transform: none !important;
}

/* Footer heading styles preservation */
.footer-section h2.heading-md {
    font-size: var(--heading-md) !important;
    /* Ensure 48px font size is maintained */
    font-family: inherit !important;
    color: inherit !important;
}

/* Ensure no unwanted margins on footer headings */
.tour-box-blk h2 {
    margin: 0 !important;
    padding: 0 !important;
}

/* ------------------------------------------------------------------
   Note (M-01/M-02): blocks that targeted markup which does not exist
   — [aria-modal], [aria-busy], input[required]::after, .show-external-icon
   and the 44px touch-target override — were removed on 2026-08-18.
   The focus, contrast and dropdown fixes this file used to attempt are
   now in css/main.css, appended last and marked !important where they
   have to beat an existing !important, so load order no longer decides
   whether they take effect. ------------------------------------------ */
