body,html{
    /*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevents scrollbars if the map is exactly 100vh */
}
:root {
    --orb-size: 320px; /* Default size for Desktop/Laptop */
    --control-size: 55px; /* The unified size for logo and slider */
}

/* Tablet / iPad adjustments */
@media (max-width: 1024px) {
    :root { --orb-size: 280px; 
            --control-size: 48px; /* Shrinks both proportionally on tablets */}
    
}

/* Mobile / iPhone adjustments */
@media (max-width: 480px) {
    :root { --orb-size: 220px; 
            --control-size: 40px; /* Shrinks both proportionally on phones */} /* Smaller orb for small screens */
    .orb-top-section { padding: 0 15px !important; }
}
h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

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

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0a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DI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

    .loading-progress circle:last-child {
        stroke: #1b6ec2;
        stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
        transition: stroke-dasharray 0.05s ease-in-out;
    }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.map-controls-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60px;
    background-color: #d1e8ff; /* Pastel Blue */
    background-image: linear-gradient(white 1px, transparent 1px), 
                      linear-gradient(90deg, white 1px, transparent 1px);
    background-size: 20px 20px; /* Grid line spacing */
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

code {
    color: #c02d76;
}


.menu-orb {
    position: fixed;
    width: var(--orb-size);
    height: var(--orb-size);
    /* This ensures the 'orbX' and 'orbY' coordinates refer to the CENTER of the circle */
    transform: translate(-50%, -50%);
    
    border-radius: 50%;
    border: 2px solid white;
    overflow: hidden;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    cursor: grab;
    user-select: none;
    transition: background-color 0.1s ease; /* Smooth dimming */
}

.orb-content {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    padding: 20px;
}

.orb-controls-section {
    height: 15%;
    width: 100%;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0 25px; /* Pushes elements safely away from the curved walls */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.orb-top-section {
    height: 30%;
    width: 100%;
    display: flex;
    align-items: center;
    /* This forces both items into the absolute center */
    justify-content: center; 
    /* This creates a 20px space between the logo and the slider */
    /*gap: 1px;*/
    border-bottom: 0px solid rgba(255,255,255,0.2);
}

.orb-logo {
    display: flex;
    align-items: center;
    height: 100%;
    /* 1. Stop the logo container from taking up more than half the top section */
    max-width: 50%;
}

.orb-logo img {
    /* 2. Shrink the actual image height down from 35px */
    height: var(--control-size); 
    /* 3. Ensure it never breaks out of its maximum width */
    max-width: 100%; 
    object-fit: contain;
}

/* Container for the entire timeline */
.orb-timeline-row {
    display: flex;
    justify-content: space-evenly; 
    align-items: flex-end; /* Ensures the checkboxes all sit on the exact same baseline */
    width: 100%;
    /* This pulls the entire row much closer to the logo above it */
    padding: 2px 5px 10px 5px;
    box-sizing: border-box;
}
/* Ensure the map always fills the background regardless of device */
#map {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

/* Popups must sit above the orb (z-index 9999) so they are always visible */
.maplibregl-popup {
    z-index: 10000;
}
/* Popup content shrinks to fit but never spills: long location strings
   (street/block detail) and facility names wrap inside the box instead of
   overflowing past its edge */
.maplibregl-popup-content {
    overflow-wrap: break-word;
}
/* Container for the slider to prevent it from messing up layout flow 
  /* Places the slider exactly on the line between column 2 and 3 */
.slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 2. Wrapper gets a square footprint based on the variable */
    height: var(--control-size);
    width: var(--control-size);
    /* 4. The Magic Shield: This tells Flexbox NEVER to squish the slider */
    flex-shrink: 0;
}
/* The vertical lock for each label/checkbox pair */
.timeline-checkbox-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the label directly over the checkbox */
    gap: 2px; /* The gap creates the distinct "two rows" visual effect */
}

/* The Smaller, Grey Typeface */
.timeline-checkbox-group label {
    font-size: 0.65rem; /* Much smaller UI text */
    color: #252a31;  /* #9ca3af;A clean, modern grey (Tailwind's gray-400).Swapped light grey for a much darker, heavier slate grey */ 
    font-weight: 700;
    letter-spacing: 0.5px; /* Adds a tiny bit of breathability to small text */
    white-space: nowrap; /* Forces the text to stay on one line so it doesn't break the alignment */
    user-select: none; 
}

/* The Checkbox Row */
.timeline-checkbox-group input[type="checkbox"] {
    margin: 0; /* Strips default browser margins for perfect centering */
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #e11d48; /* Keeps your map's red theme */
}

/* Vertical Slider Wrapper & Alignment */
.vertical-slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px; /* Gives the slider room to stretch vertically */
    width: 20px;
}
.vertical-slider {
    appearance: none;
    width: 60px; /* Because it is rotated, this becomes the height */
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    transform: rotate(-90deg); /* Forces it vertical */
    cursor: pointer;
    outline: none;
}

.vertical-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff; /* Standard blue thumb */
}


.dimmer-slider {
    flex-grow: 1;
    cursor: pointer;
}

/* MOBILE INSURANCE: Triggers only on screens narrower than 480px */
@media (max-width: 480px) {
    .orb-timeline-row {
        /* Swap to space-between to maximize the available room */
        justify-content: space-between; 
        padding: 2px 2px 10px 2px;
    }

    .timeline-checkbox-group label {
        /* Shrink the font slightly to ensure 6 labels can fit horizontally */
        font-size: 0.55rem; 
        letter-spacing: 0px;
    }
    
    .timeline-checkbox-group input[type="checkbox"] {
        /* Shrink the checkboxes a tiny bit to save horizontal pixels */
        width: 14px;
        height: 14px;
    }
}

