/* Accessibility Improvements for PN-OEV */

/* 1. Focus Indicators - Better keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* 2. Improved Color Contrast */
/* Text with blue color needs better contrast */
h1, h2, h3, h4, h5, h6 {
    color: #1a1a1a;
}

/* Better text colors for readability */
body {
    color: #222;
    line-height: 1.6;
}

p {
    color: #444;
}

/* 3. For blue text elements, ensure sufficient contrast */
a[style*="color: blue"],
span[style*="color: blue"],
h2[style*="color: blue"],
h3[style*="color: blue"] {
    color: #0052a3 !important;
}

/* 4. Form Labels */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.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;
}

/* 5. Button Styles - Better accessibility */
button,
.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

button:hover,
.btn:hover {
    text-decoration: underline;
}

/* 6. Better Icon Accessibility */
[class*="icon-"]:before,
[class*="ion-"]:before {
    font-size: 1.2em;
}

/* 7. Image Borders and Captions */
img {
    max-width: 100%;
    height: auto;
}

figure {
    margin: 1rem 0;
}

figcaption {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

/* 8. Modal Accessibility */
.modal {
    z-index: 1050;
}

.modal-header {
    border-bottom: 2px solid #dee2e6;
}

.modal-header .close {
    font-size: 2rem;
    opacity: 0.8;
}

.modal-header .close:hover,
.modal-header .close:focus {
    opacity: 1;
}

/* 9. Progress Bar Enhancement */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
    height: 24px;
}

.progress-bar {
    font-size: 0.875rem;
    line-height: 24px;
    color: #fff;
    background-color: #007bff;
}

/* 10. Carousel and Slider Accessibility */
.owl-carousel button {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.owl-carousel button:hover,
.owl-carousel button:focus {
    background-color: rgba(0, 0, 0, 0.8);
    outline: 2px solid #fff;
}

/* 11. Link Underlines */
a {
    text-decoration: underline;
    color: #0052a3;
}

a:visited {
    color: #663399;
}

a:hover {
    text-decoration: underline double;
}

a:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* 12. Headings Hierarchy */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    margin-top: 1.5rem;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    margin-top: 1.25rem;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

/* 13. White space and padding */
main {
    padding: 1rem;
}

section {
    margin: 2rem 0;
    padding: 2rem 1rem;
}

/* 14. Reduced Motion for animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 15. Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    a {
        color: #66b3ff;
    }

    a:visited {
        color: #cc99ff;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #ffffff;
    }
}

/* 16. High Contrast Mode */
@media (prefers-contrast: more) {
    body {
        color: #000;
        background-color: #fff;
    }

    a {
        color: #0000ee;
        font-weight: bold;
    }

    button, .btn {
        border: 2px solid #000;
    }
}

/* 17. Better spacing for touch targets */
@media (hover: none) {
    a, button, .btn {
        min-height: 48px;
        min-width: 48px;
    }
}

/* 18. Font sizing improvements */
body {
    font-size: 16px;
}

small {
    font-size: 0.875rem;
}

/* 19. List styling */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* 20. Tooltip and Help Text */
.tooltip, [role="tooltip"] {
    position: relative;
    background-color: #333;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}
