/* WCAG 2.1 Accessibility Enhancements */

/* Screen reader only content */
.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;
}

/* Enhanced focus indicators */
.btn:focus,
input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 3px solid #005fcc !important;
    outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .skip-link {
        background: #000000;
        border: 2px solid #ffffff;
    }
    
    .btn:focus,
    input:focus,
    select:focus,
    textarea:focus,
    button:focus,
    a:focus {
        outline: 3px solid #000000 !important;
        background-color: #ffff00 !important;
        color: #000000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .skip-link {
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced error message styling */
.alert[role="alert"] {
    border-left: 4px solid #d32f2f;
    background-color: #ffebee;
    color: #d32f2f;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    font-weight: 500;
}

/* Language selector improvements */
.language-selector {
    margin-top: 10px;
}

.language-selector .label {
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.language-selector .label:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

/* Form fieldset improvements */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 1em;
}

/* Enhanced button sizing for touch targets */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
}

/* Improved contrast for text */
.anonfont {
    color: #000000;
}

/* Enhanced panel accessibility */
.panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.panel-heading {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px 15px;
}

.panel-body {
    padding: 15px;
}

/* Status message improvements */
.status_label {
    display: block;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    color: #0d47a1;
}

/* Error message improvements */
.bg-danger {
    background-color: #ffebee !important;
    color: #d32f2f !important;
    border: 1px solid #d32f2f !important;
}

/* Focus management for dropdowns */
.wcag-combobox-input:focus + .wcag-combobox-button {
    border-color: #005fcc;
}

/* Mobile accessibility enhancements */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .col-md-6,
    .col-md-8,
    .col-md-12 {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-md-offset-2,
    .col-md-offset-3 {
        margin-left: 0;
    }
}
