/* Accessibility Color Contrast Enhancement CSS */

/* Accessibility Panel Styles */
.accessibility-panel {
    position: fixed;
    top: 80px;
    right: -320px;
    width: 300px;
    background-color: #fff;
    border-radius: 8px;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #0d6efd;
}

.accessibility-panel.show {
    right: 20px;
}

.accessibility-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.accessibility-panel-body {
    padding: 15px;
}

#accessibilityToggleBtn {
    position: relative;
}

#accessibilityToggleBtn .fa-universal-access {
    font-size: 1.2rem;
}

/* Applied styles for high contrast mode */

/* High contrast mode */
body.high-contrast {
    background-color: #000;
    color: #fff;
}

body.high-contrast .navbar {
    background-color: #000 !important;
    border-bottom: 1px solid #fff;
}

body.high-contrast .navbar-brand,
body.high-contrast .nav-link {
    color: #fff !important;
}

body.high-contrast .card {
    background-color: #000;
    border: 1px solid #fff;
    color: #fff;
}

body.high-contrast .card-header {
    background-color: #333;
    color: #fff;
    border-bottom: 1px solid #fff;
}

body.high-contrast .btn-primary {
    background-color: #0050ff;
    border-color: #fff;
    color: #fff;
}

body.high-contrast .btn-success {
    background-color: #00aa00;
    border-color: #fff;
    color: #fff;
}

body.high-contrast .btn-danger {
    background-color: #cc0000;
    border-color: #fff;
    color: #fff;
}

body.high-contrast .btn-outline-primary {
    background-color: #000;
    border-color: #0050ff;
    color: #0050ff;
}

body.high-contrast .table {
    color: #fff;
    border-color: #fff;
}

body.high-contrast .table th,
body.high-contrast .table td {
    border-color: #fff;
}

body.high-contrast .badge.bg-danger {
    background-color: #ff0000 !important;
    color: #fff;
}

body.high-contrast .badge.bg-success {
    background-color: #00cc00 !important;
    color: #000;
}

body.high-contrast .diagnosis-item {
    border-color: #fff;
}

body.high-contrast .risk-explanation {
    background-color: #333;
    color: #fff;
}

/* High-risk scenarios page specific */
body.high-contrast .category-card {
    border: 2px solid #fff;
}

body.high-contrast .category-title {
    color: #fff;
}

body.high-contrast .diagnosis-item {
    border-bottom: 1px solid #666;
}

body.high-contrast .risk-high-icon {
    color: #ff6666;
}

body.high-contrast a {
    color: #00ccff;
}

body.high-contrast .text-danger {
    color: #ff6666 !important;
}

body.high-contrast .text-success {
    color: #66ff66 !important;
}

/* Large text mode */
body.large-text {
    font-size: 120%;
}

body.large-text h1 {
    font-size: 2.5rem;
}

body.large-text h2 {
    font-size: 2.25rem;
}

body.large-text h3 {
    font-size: 2rem;
}

body.large-text h4 {
    font-size: 1.75rem;
}

body.large-text .navbar-brand {
    font-size: 1.5rem;
}

body.large-text .nav-link {
    font-size: 1.2rem;
}

body.large-text .btn {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
}

/* Focus indicator styles */
body.enhanced-focus a:focus,
body.enhanced-focus button:focus,
body.enhanced-focus input:focus,
body.enhanced-focus select:focus,
body.enhanced-focus textarea:focus {
    outline: 3px solid #ffcc00 !important;
    outline-offset: 2px !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    body.reduced-motion * {
        transition: none !important;
        animation: none !important;
    }
}

/* Dyslexia friendly text mode */
body.dyslexia-friendly {
    font-family: 'Open Sans', 'Arial', sans-serif;
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
    line-height: 1.5;
}

body.dyslexia-friendly p {
    max-width: 50em;
}

/* Color-blind friendly colors */
body.color-blind-friendly .bg-danger {
    background-color: #0072B2 !important; /* Blue */
}

body.color-blind-friendly .bg-success {
    background-color: #E69F00 !important; /* Orange */
}

body.color-blind-friendly .text-danger {
    color: #0072B2 !important; /* Blue */
}

body.color-blind-friendly .text-success {
    color: #E69F00 !important; /* Orange */
}

body.color-blind-friendly .badge.risk-high {
    background-color: #0072B2 !important; /* Blue */
}

body.color-blind-friendly .badge.risk-low {
    background-color: #E69F00 !important; /* Orange */
}

/* High-risk scenarios color-blind specific styles */
body.color-blind-friendly .badge.bg-danger {
    background-color: #0072B2 !important; /* Blue */
    color: #fff;
}

body.color-blind-friendly .risk-high-icon {
    color: #0072B2 !important; /* Blue */
}

body.color-blind-friendly .stats-badge {
    background-color: #0072B2 !important; /* Blue */
}

/* Better visibility for accessibility panel with contrast modes */
body.high-contrast .accessibility-panel {
    background-color: #000;
    border-left: 4px solid #fff;
    color: #fff;
}

body.high-contrast .accessibility-panel-header {
    border-bottom: 1px solid #fff;
}

body.high-contrast .btn-close {
    filter: invert(1);
}

body.high-contrast .form-check-input {
    background-color: #333;
    border-color: #fff;
}

body.high-contrast .form-check-input:checked {
    background-color: #0050ff;
    border-color: #fff;
}