/**
 * Fix Accessibility Contrast Issues
 * Ensures WCAG AA compliance (4.5:1 for normal text, 3:1 for large text)
 */

/* Fix button contrast issues */
.btn-location,
.btn-auth {
    background-color: #0056b3 !important;
    color: #ffffff !important;
    border: 2px solid #0056b3 !important;
}

.btn-location:hover,
.btn-auth:hover {
    background-color: #004494 !important;
    border-color: #004494 !important;
}

/* Fix light gray text on light backgrounds */
a[href*="/search.html"],
a[href*="/events-"],
a[href*="/fc-koeln.html"],
a[href*="/forum.html"],
a[href*="/hilfe.html"],
a[href*="/impressum.html"] {
    color: #333333 !important;
}

/* Fix author section contrast */
h3:contains("Über den Autor"),
div[style*="background: #f8f9fa"] {
    background: #ffffff !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
}

div[style*="background: #f8f9fa"] p {
    color: #212529 !important;
}

/* Fix loading text contrast */
.section-placeholder p,
p[style*="text-align:center;padding:20px"] {
    color: #495057 !important;
    background-color: #ffffff !important;
}

/* Fix SSL badge text */
div[style*="font-size: 12px; color: #666"] {
    color: #495057 !important;
}

/* Fix cookie banner contrast */
#cookie-consent-banner {
    background-color: #ffffff !important;
    color: #212529 !important;
    border: 2px solid #dee2e6 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
}

#cookie-consent-banner a {
    color: #0056b3 !important;
    text-decoration: underline !important;
}

#cookie-consent-banner button {
    background-color: #0056b3 !important;
    color: #ffffff !important;
    border: none !important;
}

#cookie-consent-banner button:hover {
    background-color: #004494 !important;
}

/* Dark mode specific fixes */
body.dark-mode .section-placeholder {
    background-color: #1a1a1a !important;
}

body.dark-mode .section-placeholder p {
    color: #e9ecef !important;
}

body.dark-mode {
    background-color: #121212 !important;
    color: #e9ecef !important;
}

body.dark-mode a {
    color: #66b3ff !important;
}

body.dark-mode button {
    background-color: #0056b3 !important;
    color: #ffffff !important;
    border-color: #0056b3 !important;
}

/* Ensure minimum touch target size (44x44px) */
button, 
a,
input[type="button"],
input[type="submit"] {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 12px !important;
}

/* High contrast for form elements */
input,
select,
textarea {
    border: 2px solid #495057 !important;
    color: #212529 !important;
    background-color: #ffffff !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #0056b3 !important;
    outline: 2px solid #0056b3 !important;
    outline-offset: 2px !important;
}