/**
 * Accessibility styles for EU4LMIApp
 */

/* Screen reader only class */
.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;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2B78D4;
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus styles */
.show-focus-outlines a:focus,
.show-focus-outlines button:focus,
.show-focus-outlines input:focus,
.show-focus-outlines select:focus,
.show-focus-outlines textarea:focus,
.show-focus-outlines [tabindex]:focus {
    outline: 3px solid #2B78D4 !important;
    outline-offset: 2px !important;
}

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

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

.high-contrast a:visited {
    color: #00ffff !important;
}

.high-contrast button,
.high-contrast .btn {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

.high-contrast button:hover,
.high-contrast .btn:hover {
    background-color: #333 !important;
    color: #ffff00 !important;
}

.high-contrast img {
    filter: grayscale(100%) contrast(120%);
}

.high-contrast .navbar,
.high-contrast .footer,
.high-contrast .card,
.high-contrast .logo-grid {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}

.high-contrast .nav-link {
    color: #fff !important;
}

.high-contrast .nav-link.active {
    color: #ffff00 !important;
    text-decoration: underline;
}

/* Disclaimer and FAQ answers in high contrast mode */
.high-contrast .disclaimer,
.high-contrast .faq-answer {
    background-color: #000 !important;
    border-color: #ffff00 !important;
    border-width: 4px !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px #fff !important;
}

.high-contrast .disclaimer h4,
.high-contrast .faq-question {
    color: #ffff00 !important;
}

.high-contrast .bg-light {
    background-color: #000 !important;
    color: #fff !important;
}

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

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

/* Adjustable text size support */
html {
    font-size: 16px; /* Base font size */
}

/* Ensure all text sizes use relative units */
body {
    font-size: 1rem;
    line-height: 1.5;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5, h6 {
    font-size: 1rem;
}

/* Ensure buttons and interactive elements are large enough for touch */
button, 
.btn,
input[type="button"],
input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
}

/* Ensure form controls have sufficient spacing */
input, 
select, 
textarea {
    margin-bottom: 1rem;
}

/* Ensure labels are associated with form controls */
label {
    display: block;
    margin-bottom: 0.5rem;
}

/* Accessibility panel */
.accessibility-panel {
    position: fixed;
    right: -250px;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    background: #fff;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    padding: 15px;
    transition: right 0.3s;
    z-index: 1000;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}

.accessibility-panel.open {
    right: 0;
}

.accessibility-toggle {
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #2B78D4;
    color: white;
    border: none;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accessibility-panel h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.accessibility-panel .btn-group {
    margin-bottom: 15px;
    width: 100%;
}

.accessibility-panel .btn {
    margin-right: 5px;
}

/* Ensure sufficient color contrast */
.text-muted {
    color: #6c757d !important; /* Ensure this meets WCAG AA contrast requirements */
} 