html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* ========================================
   ACCESSIBILITY FEATURES (WCAG 2.0 AA)
   ======================================== */

/* Skip to main content link for keyboard navigation */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--dcso-brown);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 4px 0;
}

    .skip-to-main:focus {
        left: 0;
        top: 0;
        outline: 3px solid var(--dcso-tan);
        outline-offset: 2px;
    }

/* Enhanced focus indicators for keyboard navigation */
*:focus {
    outline: 3px solid var(--dcso-brown);
    outline-offset: 2px;
}

a:focus {
    outline: 3px solid var(--dcso-brown);
    outline-offset: 2px;
    text-decoration: underline;
}

/* Ensure focus is visible on all interactive elements */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--dcso-brown);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.35rem var(--dcso-brown);
}

/* High contrast focus for form controls */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--dcso-brown);
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--dcso-brown);
    outline: 2px solid var(--dcso-brown);
    outline-offset: 1px;
}

/* Ensure sufficient color contrast for all text */
.text-muted {
    color: #5a5a5a !important;
}

/* ======================================== */

/* Dakota County Color Scheme */
:root {
    --dcso-brown: #B11116;
    --dcso-tan: #8B0D11;
    --dcso-sheriff-tan: #C5A668;
    --dcso-parks-green: #4a4a4a;
    --dcso-ectf-blue: #1F4788;
    --dcso-dark-gray: #333333;
    --dcso-light-gray: #F5F5F5;
    --dcso-light-tan: #E8D5AA;
}

/* Header Styles */
.dcso-header {
    background-color: #B11116;
}

.dcso-logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.dcso-logo-placeholder {
    padding: 20px 0;
}

.dcso-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: white;
    
    
}

.dcso-subtitle {
    font-size: 1.25rem;
    color: #F5E6B8;
    font-weight: 500;
    margin-top: 5px;
}

/* Footer Styles */
.dcso-footer {
    background-color: var(--dcso-brown);
    color: white;
    border-top: 4px solid var(--dcso-tan);
    flex-shrink: 0;
    margin-top: auto;
}

    .dcso-footer p {
        color: white;
    }

/* Primary Button Styling */
.btn-primary {
    background-color: var(--dcso-brown);
    border-color: var(--dcso-brown);
    font-weight: 600;
    color: white;
}

    .btn-primary:hover,
    .btn-primary:active {
        background-color: #8B0D11;
        border-color: #8B0D11;
        color: white;
    }

    .btn-primary:focus,
    .btn-primary:focus-visible {
        background-color: #8B0D11;
        border-color: #8B0D11;
        color: white;
        box-shadow: 0 0 0 0.25rem rgba(177, 17, 22, 0.5);
        outline: 2px solid var(--dcso-brown);
        outline-offset: 2px;
    }

/* Secondary Button Styling */
.btn-secondary {
    background-color: var(--dcso-parks-green);
    border-color: var(--dcso-parks-green);
    font-weight: 600;
    color: white;
}

    .btn-secondary:hover,
    .btn-secondary:active {
        background-color: #333333;
        border-color: #333333;
        color: white;
    }

    .btn-secondary:focus,
    .btn-secondary:focus-visible {
        background-color: #333333;
        border-color: #333333;
        color: white;
        box-shadow: 0 0 0 0.25rem rgba(74, 74, 74, 0.5);
        outline: 2px solid var(--dcso-parks-green);
        outline-offset: 2px;
    }

/* Danger Button Styling */
.btn-danger {
    color: white;
}

    .btn-danger:hover,
    .btn-danger:active,
    .btn-danger:focus {
        color: white;
    }

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--dcso-brown);
    font-weight: 600;
}

/* Alert Styling */
.alert-info {
    background-color: #fdf2f2;
    border-color: var(--dcso-brown);
    color: #2d2d2d;
}

    .alert-info h4, .alert-info h5 {
        color: #8B0D11;
    }

.alert-danger {
    color: #721c24;
}

/* Links */
a {
    color: #B11116;
    text-decoration: underline;
}

    a:hover {
        color: #8B0D11;
        text-decoration: underline;
    }

    a:focus {
        outline: 3px solid var(--dcso-brown);
        outline-offset: 2px;
    }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--dcso-brown);
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    margin: 0;
    background-color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dcso-dark-gray);
}

/* Container to hold main content */
.container {
    flex: 1 0 auto;
    max-width: 800px;
}

/* Autocomplete suggestions */
.suggestions {
    border: 1px solid #ccc;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    z-index: 1000;
    width: 100%;
    min-width: unset;
    max-width: unset;
}

.suggestion-item {
    padding: 5px 10px;
    cursor: pointer;
}

    .suggestion-item:hover,
    .suggestion-item:focus,
    .suggestion-item.active {
        background-color: #f0f0f0;
        outline: 2px solid var(--dcso-brown);
    }

/* Improve visual feedback for required fields */
input[required]:invalid:not(:placeholder-shown),
select[required]:invalid:not(:placeholder-shown),
textarea[required]:invalid:not(:placeholder-shown) {
    border-left: 4px solid #dc3545;
}

input[required]:valid,
select[required]:valid,
textarea[required]:valid {
    border-left: 4px solid #28a745;
}

/* Screen reader only text utility 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;
}

/* Ensure icons don't interfere with screen readers */
[aria-hidden="true"] {
    pointer-events: none;
}

@media (max-width: 500px) {
    .suggestions {
        width: 100%;
        min-width: unset;
        max-width: unset;
    }

    .dcso-title {
        font-size: 1.25rem;
    }

    .dcso-subtitle {
        font-size: 1rem;
    }
}
