/* Additional Accessibility Styles for AccessPress Theme */

/* High Contrast Mode */
.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

.high-contrast .site-header {
    background: #000 !important;
    border-color: #fff !important;
}

.high-contrast .widget {
    background: #111 !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

.high-contrast a {
    color: #ffff00 !important;
}

.high-contrast a:hover,
.high-contrast a:focus {
    color: #ffffff !important;
    background: #0000ff !important;
}

.high-contrast button,
.high-contrast input[type="submit"],
.high-contrast input[type="button"] {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

/* Enhanced Focus Styles */
.enhanced-focus *:focus {
    outline: 3px solid #005fcc !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 1px #fff, 0 0 0 4px #005fcc !important;
}

/* Reduced Motion Styles */
.prefers-reduced-motion *,
.prefers-reduced-motion *::before,
.prefers-reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

.prefers-reduced-motion {
    scroll-behavior: auto !important;
}

/* Screen Reader Only Content */
.sr-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;
}

/* Focus Within Styles for Better Navigation */
.main-navigation:focus-within .menu-toggle {
    background: #f5f5f5;
}

/* Improved Form Accessibility */
.required {
    color: #d63638;
    font-weight: bold;
}

.form-notes {
    font-size: 0.875rem;
    color: #666;
    display: block;
    margin-top: 0.25rem;
}

/* Error States */
.error input,
.error textarea,
.error select {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.error-message {
    color: #d63638;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Success States */
.success input,
.success textarea,
.success select {
    border-color: #00a32a;
    box-shadow: 0 0 0 1px #00a32a;
}

.success-message {
    color: #00a32a;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top-color: #005fcc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Keyboard Navigation Indicators */
.keyboard-navigation .main-navigation a:focus {
    background: #005fcc;
    color: #fff;
}

/* ARIA Live Region Styles */
#accesspress-live-region {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Print Accessibility */
@media print {
    .skip-link,
    .menu-toggle,
    .main-navigation,
    .widget-area,
    .site-footer {
        display: none !important;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    .entry-content a {
        text-decoration: underline;
        color: #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --link-color: #66b3ff;
        --border-color: #333;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .site-header {
        background: var(--bg-color);
        border-color: var(--border-color);
    }
    
    .widget {
        background: #2a2a2a;
        border-color: var(--border-color);
    }
    
    a {
        color: var(--link-color);
    }
}

/* Large Text Support */
@media (min-resolution: 192dpi) {
    body {
        font-size: 1.125rem;
    }
    
    .entry-title {
        font-size: 2.25rem;
    }
}

/* Touch Device Improvements */
@media (pointer: coarse) {
    .main-navigation a,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }
    
    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

