/* Accessibility Styles for IMPRESSO Website */

/* Skip Link - Hidden by default, visible on focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
    font-weight: 600;
    transition: top 0.3s ease;
    font-size: 14px;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #1e40af;
    outline-offset: 2px;
}

/* Focus Indicators for all interactive elements */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
    transition: outline 0.2s ease;
}

/* Enhanced focus for buttons */
button:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Focus for links */
a:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Ensure focus indicators are never hidden */
*:focus {
    outline-style: solid !important;
}

/* Remove default browser outline and replace with custom */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast focus for dark backgrounds */
.navbar a:focus,
.mobile-menu a:focus,
.footer a:focus {
    outline-color: #00f5ff;
    background-color: rgba(0, 245, 255, 0.1);
}

/* Focus for navigation buttons */
.btn-nav:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 3px solid #00f5ff;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(0, 245, 255, 0.2);
}

/* Ensure sufficient contrast for focus indicators */
/* Blue (#3b82f6) on dark background (#0a0a14) has contrast ratio > 3:1 */
/* Cyan (#00f5ff) on dark background (#0a0a14) has contrast ratio > 3:1 */

/* Screen reader only text (visually hidden but accessible) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus trap for modals (if needed) */
.modal-open {
    overflow: hidden;
}

/* Keyboard navigation helper */
.keyboard-user *:focus {
    outline: 3px solid #3b82f6 !important;
    outline-offset: 2px !important;
}
