html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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;
    font-family: 'Montserrat', sans-serif;
}

.header-font {
    font-family: 'Sorts Mill Goudy', serif;
}



/* Make xl wider */
@media (min-width: 1200px) {
    .container-xl {
        max-width: 1200px;
    }
    /* was 1140 */
}

@media (min-width: 1400px) {
    .container-xl {
        max-width: 1450px;
    }
    /* was 1320 */
}

.modal-content {
    border-radius: 1.5rem !important;
}


a:not(.btn):not([class*="btn-"]):not(.no-link) {
    color: #2563eb; /* Tailwind blue-600 */
    text-decoration: underline;
}

    a:not(.btn):not([class*="btn-"]):not(.no-link):hover {
        color: #1d4ed8; /* Tailwind blue-700 */
        text-decoration: underline;
    }

    /* Optional: focus ring for accessibility */
    a:not(.btn):not([class*="btn-"]):not(.no-link):focus {
        outline: 2px solid #93c5fd; /* blue-300 */
        outline-offset: 2px;
    }


/* Hide the datalist dropdown arrow (Chrome/Edge/Safari) */
.town-input::-webkit-calendar-picker-indicator {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none;
}


/* Map Loaders */
.map-loader[hidden] {
    display: none !important;
}

#ejMapWrap,
#townsMapWrap,
#roadwayssMapWrap,
#assetsMapWrap {
    position: relative;
}

.map-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(255,255,255,.6);
    backdrop-filter: blur(2px);
    z-index: 10;
    color: #333;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* lightweight spinner (no Bootstrap dependency) */
.map-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,.15);
    border-top-color: rgba(0,0,0,.6);
    animation: mapspin 1s linear infinite;
}

@keyframes mapspin {
    to {
        transform: rotate(360deg);
    }
}


/* Tab Stuff */

/* Dashboard Cards */
.dashboard-card {
    position: relative;
    overflow: hidden;
    /*background-color: black;*/
    /*background-image: url('https://localhost:7065/images/cardBackgroundBlue.jpg');
    background-size: 100% 500px;
    background-position: center center;
    background-repeat: no-repeat;*/
}

/*body {
    background-image: url('https://images.pexels.com/photos/2341290/pexels-photo-2341290.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=1000');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}*/

.dashboard-banner {
    padding: .75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all .2s ease;
    border-bottom: 3px solid transparent;
}

    .dashboard-banner h5 {
        margin: 0;
        font-size: 1.1rem;
    }

.dashboard-body {
    background: #f9f9f9;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
}

/* When banner is shrunk */
.dashboard-banner.shrunk {
    padding: .5rem .75rem;
    font-size: .9rem;
}

.dashboard-banner.active {
    border-bottom-color: #fff;
    filter: saturate(1.05);
}

.placeholder-text {
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Map inside EJ section */
#ejMap {
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    border-radius: .25rem;
}





/* Graph Stuff */
.ej-chart {
    height: 220px;
    width: 100%;
}

.legend-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: center;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    line-height: 1.2;
    padding: .25rem .5rem;
    border-radius: .375rem;
    background: #fff;
    border: 1px solid #e9ecef;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.15);
}


/* Read More */
/* Collapsed state: shows ~3 lines with ellipsis */
/*.collapsed-text {
    font-size: 0.85rem;
    line-height: 1.4;
    max-height: 4.2em;*/ /* about 3 lines depending on line height */
    /*overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}*/

    /* Fade-out effect with ellipsis */
    /*.collapsed-text::after {
        content: '...';
        position: absolute;
        bottom: 0;
        right: 0;
        background: white;*/ /* match background color */
        /*padding-left: 0.25rem;
        font-weight: bold;
    }*/

/* Expanded state shows full text */
/*.expanded-text {
    font-size: 0.85rem;
    max-height: 1000px;*/ /* large enough to fit everything */
    /*transition: max-height 0.3s ease;
    overflow: visible;
}*/



/* Animated Slide Out */
#detailSections > section {
    overflow: hidden; /* so animations can fully display */
}

@media (prefers-reduced-motion: reduce) {
    #detailSections > section {
        transition: none !important;
    }
}

/* We'll nudge this inner wrapper to bias the motion downward */
#detailSections > section .collapsible__inner {
    will-change: transform, opacity;
}

/* Ensure the card rows sit above the detail sections */
#cardsDetailed,
#cardsCondensed {
    position: relative;
    z-index: 20; /* above detail sections */
}

/* Detail section container sits below */
#detailSections {
    position: relative;
    z-index: 0;
}

    /* Each detail section defaults behind the card rows */
    #detailSections > section {
        position: relative;
        z-index: 0;
    }

/* When animating, explicitly keep the section behind */
.animating-behind {
    z-index: 0 !important; /* below the cards’ z-index */
    pointer-events: none; /* optional: no hover/click while sliding */
}

/* Bounce effect */
/* A tiny “up then settle” that affects layout */
@keyframes innerHeightBounceUp {
    0% {
        margin-bottom: 0;
    }
    /* normal height */
    60% {
        margin-bottom: -10px;
    }
    /* pull bottom UP slightly */
    100% {
        margin-bottom: 0;
    }
    /* settle back down */
}

/* Start the bounce just before the slide ends so there’s no pause */
.card-collapsible {
    --slide-dur: 400ms;
}
/* or set per card in your HTML */
.group:hover .card-collapsible .collapsible-inner,
.group:focus-within .card-collapsible .collapsible-inner {
    animation: innerHeightBounceUp 220ms cubic-bezier(.25,1.5,.5,1) calc(var(--slide-dur) - 120ms) both;
}

/* stop on un-hover and prefer-reduced-motion */
.group:not(:hover):not(:focus-within) .card-collapsible .collapsible-inner {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .group:hover .card-collapsible .collapsible-inner,
    .group:focus-within .card-collapsible .collapsible-inner {
        animation: none !important;
    }
}
