:root {
    --permit-map-focus-color: #003580;
    --permit-map-focus-shadow: rgba(0, 53, 128, 0.4);
}

html {
    font-size: 100%; 
}

@media (min-width: 768px) {
    html {
        font-size: 100%; 
    }
}

.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 #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}


select option.active-item {
    color: red;
    font-weight: bold;
}


#mapView {
    height: 600px;
    width: 100%;
    margin-top: 20px;
    position: relative;
}

#mapView:focus,
#mapView:focus-visible {
    outline: 3px solid var(--permit-map-focus-color) !important;
    outline-offset: 2px !important;
}

#basemapToggle {
    position: absolute;
    top: 15px;
    left: 60px;
    z-index: 99;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

#basemapToggleBtn {
    padding: 8px 12px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

    #basemapToggleBtn:hover {
        background: #f0f0f0;
    }

    #basemapToggleBtn i {
        transition: transform 0.2s;
    }

    #basemapToggleBtn.expanded i {
        transform: rotate(180deg);
    }

#basemapButtons {
    display: none;
    padding: 4px;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 300px;
}

    #basemapButtons.show {
        display: flex;
    }

.basemap-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 2px;
    transition: background-color 0.2s;
    flex: 1 0 auto;
}

    .basemap-btn:hover {
        background: #f0f0f0;
    }

    .basemap-btn.active {
        background: #0079c1;
        color: white;
    }

.esri-widget--button:focus,
.esri-widget--button:focus-visible,
#btnRecenterMap:focus,
#btnRecenterMap:focus-visible,
#basemapToggleBtn:focus,
#basemapToggleBtn:focus-visible,
.basemap-btn:focus,
.basemap-btn:focus-visible {
    outline: 3px solid var(--permit-map-focus-color) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 0.25rem var(--permit-map-focus-shadow) !important;
}

/* Positioning for web components */
arcgis-search {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
}

arcgis-locate {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1;
}

/* Loading animation */
.map-loading {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.map-loaded {
    opacity: 1;
}

.skip-link {
    position: absolute;
    left: 0;
    top: 0;
    /* visually hide */
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    /* ensure it's first in stacking when shown */
    z-index: 1000;
}

.skip-link:focus,
.skip-link:active {
    clip-path: none;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* Centers the spinner inside the modal or page */
.modal-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dim background */
    z-index: 9999;
}

/* The circular loader */
.modal-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3; /* Light grey track */
    border-top: 6px solid #3498db; /* Blue colored spinner part */
    border-radius: 50%; /* Makes the box a perfect circle */
    animation: spin 1s linear infinite; /* Animation duration and timing */
}

/* Keyframes for continuous 360-degree rotation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===================================================================
   Accessibility: Button Color Contrast (WCAG 2.1 AA Compliance)
   =================================================================== */

/* Override Bootstrap btn-secondary for better contrast */
.btn-secondary {
    color: #fff !important;
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    color: #fff !important;
    background-color: #484e53 !important;
    border-color: #3d4349 !important;
}

.btn-secondary:active,
.btn-secondary.active {
    color: #fff !important;
    background-color: #3d4349 !important;
    border-color: #373b3f !important;
}

.btn-secondary:disabled,
.btn-secondary.disabled {
    color: #fff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    opacity: 0.65;
}
.pad-bottom
{
    padding-bottom: 1em;
}

h3.latest-news-title {
    font-size: 1.0rem; /* smaller heading */
    margin-bottom: 0.3rem;
}
