/* WCAG 2.0 AA Accessibility Compliance Styles */

/* ========================================
   SKIP NAVIGATION & FOCUS MANAGEMENT
   ======================================== */

/* Skip Links - Keyboard Navigation Support */
.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
    background: #000;
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    margin: 8px;
}

/* Enhanced Focus Indicators - WCAG 2.0 AA Compliant */
*:focus {
    outline: 2px solid #FC5856 !important;
    outline-offset: 2px;
}

button:focus,
.btn:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(252, 88, 86, 0.3) !important;
    border-color: #FC5856 !important;
}

/* Remove default focus styles when using custom ones */
button:focus {
    outline: none;
}

/* ========================================
   COLOR CONTRAST & VISUAL ACCESSIBILITY
   ======================================== */

/* Ensure minimum color contrast ratios */
.text-white {
    color: #ffffff !important; /* 4.5:1 contrast ratio */
}

.bg-black {
    background-color: #000000 !important;
}

/* High contrast colors for better visibility */
.high-contrast-link {
    color: #1a73e8;
    text-decoration: underline;
}

.high-contrast-link:hover,
.high-contrast-link:focus {
    color: #1557b0;
    text-decoration: underline;
}

/* Error states with sufficient contrast */
.error-text {
    color: #d93025 !important; /* Meets AAA requirements */
}

/* ========================================
   TYPOGRAPHY & READING ACCESSIBILITY
   ======================================== */

/* Ensure minimum font sizes and readable line heights */
body {
    font-size: 16px; /* WCAG recommended minimum */
    line-height: 1.5; /* 1.5x font size minimum */
}

p, li, td {
    line-height: 1.5;
}

/* Responsive font sizing */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Never go below 16px */
    }
}

/* Heading hierarchy - ensure proper order and visibility */
h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
}

/* ========================================
   INTERACTIVE ELEMENTS ACCESSIBILITY
   ======================================== */

/* Button accessibility - minimum 44x44px target size */
button,
.btn,
a.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
    border-radius: 4px;
}

/* Hide decorative elements from screen readers */
img[role="presentation"],
[aria-hidden="true"] {
    display: inline;
}

/* Decorative separators */
.border-divider,
.border-top,
.border-bottom,
.border-left,
.border-right {
    border-color: #e0e0e0;
}

/* Focus trap for dialogs */
.dialog-container:focus {
    outline: none;
}

.dialog-container *:first-child:focus {
    outline: 2px solid #FC5856;
    outline-offset: 2px;
}

/* ========================================
   VISUAL INDICATORS & STATES
   ======================================== */

/* Loading states - announce to screen readers */
.loading::after {
    content: "Loading...";
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Hover states with adequate visual feedback */
a:hover,
button:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
    text-decoration: underline;
}

/* Disabled state styling */
button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   SCREEN READER UTILITIES
   ======================================== */

/* Screen reader only content */
.sr-only,
.screen-reader-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    padding: 8px 16px !important;
    background: #000 !important;
    color: #fff !important;
    border-radius: 4px !important;
}

/* Skip to content for keyboard users */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 6px;
}

/* ========================================
   VIDEO & MULTIMEDIA ACCESSIBILITY
   ======================================== */

/* Video container accessibility */
.video-container {
    position: relative;
}

.video-container::before {
    content: "Video content: ";
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Ensure video controls are accessible */
video::-webkit-media-controls,
video::-webkit-media-controls-panel {
    background-color: rgba(0,0,0,0.8);
}

/* ========================================
   FORM ACCESSIBILITY
   ======================================== */

/* Form field styling */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px; /* Prevents zoom on iOS */
    line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #FC5856;
    box-shadow: 0 0 0 3px rgba(252, 88, 86, 0.1);
}

/* Label accessibility */
label {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

/* Required field indicators */
.required::after {
    content: " *";
    color: #d93025;
    font-weight: bold;
}

/* Error message styling */
.error-message {
    color: #d93025;
    font-size: 14px;
    margin-top: 4px;
}

/* ========================================
   NAVIGATION ACCESSIBILITY
   ======================================== */

/* Main navigation */
.main-nav a {
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 4px;
}

.main-nav a:hover,
.main-nav a:focus {
    background-color: rgba(252, 88, 86, 0.1);
    text-decoration: underline;
}

/* Breadcrumb navigation */
.breadcrumb-nav {
    font-size: 14px;
    margin-bottom: 16px;
}

.breadcrumb-nav a {
    color: #1a73e8;
    text-decoration: underline;
}

.breadcrumb-nav a:hover,
.breadcrumb-nav a:focus {
    color: #1557b0;
}

/* ========================================
   MEDIA QUERIES FOR RESPONSIVE ACCESSIBILITY
   ======================================== */

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    * {
        border-color: ButtonText;
    }

    button,
    .btn {
        border: 2px solid;
    }
}

/* Print styles for accessibility */
@media print {
    a[href]::after {
        content: " (" attr(href) ")";
    }

    .skip-link,
    .sr-only {
        display: none !important;
    }
}

/* ========================================
   CAROUSEL & INTERACTIVE COMPONENTS
   ======================================== */

/* Carousel navigation buttons */
.carousel-btn {
    min-width: 44px;
    min-height: 44px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.carousel-btn:hover,
.carousel-btn:focus {
    background: rgba(252, 88, 86, 0.8);
    border-color: #FC5856;
}

/* Accordion styling for FAQ */
.accordion-header {
    cursor: pointer;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f9fa;
    width: 100%;
    text-align: left;
}

.accordion-header:hover,
.accordion-header:focus {
    background: #e9ecef;
}

.accordion-content {
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

/* ========================================
   ACCESSIBILITY UTILITIES
   ======================================== */

/* Live region for announcements */
.live-region {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Hide element visually but keep for screen readers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Show visually hidden when focused */
.visually-hidden:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    padding: 8px 16px !important;
    margin: 4px !important;
    background: #000 !important;
    color: #fff !important;
    border-radius: 4px !important;
}
