/* Accessibility Enhancements for CNInnovationWeb */

/* Skip Links Enhancement */
.skip-link:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Enhanced Focus Indicators */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus,
.form-control:focus,
.form-check-input:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-outline-primary {
        border-width: 2px;
    }
    
    .nav-link {
        border-bottom: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        border-bottom-color: currentColor;
    }
}

/* Reduced Motion Support */
@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;
    }
}

/* Screen Reader Only Content */
.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;
}

/* Back to Top Button Enhancement */
.toTop:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Form Error Enhancement */
.invalid-feedback {
    font-weight: 500;
}

/* Alert Enhancement */
.alert[role="alert"] {
    border-left: 4px solid;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-success {
    border-left-color: #28a745;
}

/* Loading State Enhancement */
.spinner-border {
    border-width: 0.15em;
}

/* Ensure text remains readable */
.text-muted {
    color: #6c757d !important;
}

@media (prefers-contrast: high) {
    .text-muted {
        color: #495057 !important;
    }
}

/* Better button focus states */
.btn-dark:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

/* Dropdown accessibility */
.dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.dropdown-item:focus {
    background-color: #f8f9fa;
    color: #16181b;
}

/* Mobile accessibility improvements */
@media (max-width: 768px) {
    .skip-link {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}