/* Accessibility Styles for Digital Harmony */

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid #00C9D7;
    outline-offset: 2px;
}

/* Focus indicators */
*:focus {
    outline: 2px solid #00C9D7;
    outline-offset: 2px;
}

/* Remove default focus styles and apply custom ones */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #00C9D7;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --glass-base: rgba(255, 255, 255, 0.9);
        --text-muted: rgba(255, 255, 255, 0.95);
    }
    
    .glass-panel {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid #fff;
    }
    
    .nav-item,
    .nav-link {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

/* 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;
    }
    
    .floating-orb,
    .bubble,
    .gradient-bg {
        animation: none !important;
    }
}

/* Screen reader only content */
.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;
}

/* Ensure sufficient color contrast */
.text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Make interactive elements more accessible */
button,
a,
.nav-item,
.service-tile {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Improve button accessibility */
.player-btn {
    position: relative;
}

.player-btn:focus::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #00C9D7;
    border-radius: inherit;
    pointer-events: none;
}

/* Error and success states */
.error {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.success {
    color: #00ff7f;
    border-color: #00ff7f;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    .background-container,
    .floating-elements,
    .media-player,
    .loading-screen {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass-panel {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .sidebar {
        position: static !important;
        background: white !important;
        border: 1px solid #ccc !important;
    }
}

/* Keyboard navigation improvements */
.nav-item:focus,
.service-tile:focus {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.15);
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .nav-item,
    .player-btn,
    button {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Dark mode specific accessibility */
@media (prefers-color-scheme: dark) {
    /* Already handled by main theme, but ensure accessibility */
    .skip-link {
        background: #000;
        color: #fff;
    }
}

/* Focus management for modals and overlays */
.modal:focus {
    outline: none;
}

.modal-content:focus {
    outline: 2px solid #00C9D7;
    outline-offset: -2px;
}

/* Ensure text readability */
.welcome-title,
.intro-heading,
.service-title,
.stat-number {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Status indicators accessibility */
.status-dot {
    position: relative;
}

.status-dot::after {
    content: 'Online';
    position: absolute;
    left: -9999px;
    font-size: 0;
}

/* Improve contrast for secondary text */
.profile-status,
.current-date,
.service-desc,
.stat-label {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
