/* AutoVibe Updated CSS for project 1744017855866 - Iteration 5 - Enhanced UI, Accessibility & Responsiveness */

/* Root variables for consistent theming - Accessible & Extended Palette */
:root {
    --primary-color: #007bff;        /* Primary Blue - Interactive elements */
    --primary-color-darker: #0056b3; /* Darker shade for hover/active states */
    --secondary-color: #6c757d;      /* Secondary Gray - Subdued text, less important UI */
    --success-color: #28a745;        /* Success Green - Positive actions, confirmations */
    --success-color-darker: #19692c;  /* Darker success for hover/active */
    --info-color: #17a2b8;           /* Info Cyan - Informational cues, subtle highlights */
    --warning-color: #ffc107;        /* Warning Yellow - Caution, alerts that are not critical */
    --danger-color: #dc3545;         /* Danger Red - Errors, destructive actions */
    --danger-color-darker: #a71d2a;   /* Darker danger for emphasis */
    --light-color: #f8f9fa;          /* Light Gray - Backgrounds, light UI elements */
    --light-color-rgb: 248, 249, 250; /* RGB values for rgba usage */
    --dark-color: #343a40;           /* Dark Gray - Primary text, strong UI elements */
    --dark-color-rgb: 52, 58, 64;    /* RGB for dark color */

    --text-color-dark: var(--dark-color);
    --text-color-light: var(--light-color);
    --text-color-muted: var(--secondary-color); /* Muted text color */
    --background-color-light: var(--light-color);
    --background-color-dark: var(--dark-color);
    --background-color-overlay: rgba(var(--light-color-rgb), 0.95); /* Overlay background */
    --accent-color: var(--warning-color); /* Accent color - Warning Yellow */
    --border-color: #dee2e6;         /* Light border color */
    --border-color-darker: #ced4da;   /* Slightly darker border for contrast */
    --border-radius: 0.3rem;        /* Slightly more rounded corners */
    --box-shadow: 0 0.15rem 0.3rem rgba(0, 0, 0, 0.1); /* Slightly stronger shadow */
    --box-shadow-sm: 0 0.05rem 0.1rem rgba(0, 0, 0, 0.05); /* Smaller shadow for subtle effects */
    --font-family-base: 'Roboto', sans-serif; /* Modern, Accessible Font - System fallback */
    --font-size-base: 1rem;          /* Base font size - 16px */
    --line-height-base: 1.6;         /* Improved default line height */
    --transition-duration: 0.2s;     /* Default transition duration */
    --transition-easing: ease-in-out; /* Default transition easing */
}

/* Typography - Enhanced Legibility & Scalability, System Font Stack Fallback */
body {
    font-family: var(--font-family-base), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: var(--font-size-base);
    padding: 0;
    margin: 0;
    color: var(--text-color-dark);
    background-color: var(--background-color-light);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* Bold font weight for headings */
    color: var(--primary-color);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

h1 { font-size: 2.75rem; } /* Larger h1 for impact */
h2 { font-size: 2.25rem; }
h3 { font-size: 1.85rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; font-weight: 600; color: var(--secondary-color); } /* Subdued h6 */

p {
    margin-bottom: 1.2rem;
    color: var(--text-color-dark); /* Ensure paragraph text color */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-duration) var(--transition-easing);
}

a:hover {
    color: var(--primary-color-darker);
    text-decoration: underline;
}

/* Focus Styles - Enhanced Accessibility for Keyboard Navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.5); /* Visual focus ring */
}

/* Skip Link - Accessibility Feature - Improved Styling */
.skip-link {
    position: absolute;
    top: -60px; /* Hidden off-screen initially */
    left: 0;
    background: var(--light-color);
    color: var(--text-color-dark);
    padding: 0.75rem 1.25rem;
    z-index: 1001; /* Ensure it's on top */
    transition: top 0.4s ease-out;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    box-shadow: var(--box-shadow-sm);
}

.skip-link:focus-visible {
    top: 0; /* Slide into view on focus */
}

/* Layout & Structure - Flexbox based layout - Refined Container */
.container {
    width: 100%;
    max-width: 1250px; /* Slightly wider container */
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px; /* Increased padding */
    padding-left: 20px;
    box-sizing: border-box;
}

.header {
    background-color: var(--background-color-light);
    padding: 2.5rem 0; /* Increased header padding */
    text-align: center;
    border-bottom: 1px solid var(--border-color-darker); /* Darker border */
}

.header__title {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em; /* Slight letter spacing adjustment */
}

.header__description {
    color: var(--text-color-muted); /* Muted description text */
    font-size: 1.15rem;
    font-weight: 400;
}

.main {
    padding: 25px 0; /* Increased main padding */
}

.map-container {
    display: flex;
    flex-direction: column;
    position: relative; /* For absolute positioning of map controls */
    border-radius: var(--border-radius);
    overflow: hidden; /* Clip map corners */
    box-shadow: var(--box-shadow); /* Shadow for map container */
    border: 1px solid var(--border-color); /* Border for map container */
}

.map-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch; /* Stretch items to full height */
    padding: 1.25rem; /* Increased padding for controls */
    gap: 1rem; /* Increased gap between controls */
    background-color: var(--background-color-overlay); /* Use overlay background */
    border-bottom: 1px solid var(--border-color-darker); /* Darker border */
    z-index: 802;
}

#map {
    width: 100%;
    height: 85vh; /* Further adjusted map height */
    min-height: 450px; /* Increased min-height */
    position: relative;
    z-index: 800; /* Map tiles below controls */
    border-radius: 0 0 var(--border-radius) var(--border-radius); /* Rounded bottom corners */
    overflow: hidden; /* Clip map content */
}

footer {
    text-align: center;
    padding: 2rem 0; /* Increased footer padding */
    background-color: var(--background-color-light);
    color: var(--text-color-muted); /* Muted footer text */
    border-top: 1px solid var(--border-color-darker); /* Darker border */
    font-size: 0.95rem;
}

/* Leaflet Control Enhancements - Refined Look */
.leaflet-control-container .leaflet-topleft,
.leaflet-control-container .leaflet-topright,
.leaflet-control-container .leaflet-bottomleft,
.leaflet-control-container .leaflet-bottomright {
    z-index: 801; /* Leaflet controls above map but below custom controls */
}

.leaflet-bar a, .leaflet-bar a:hover {
    background-color: var(--background-color-overlay); /* Overlay background for leaflet controls */
    border: 1px solid var(--border-color-darker); /* Darker border */
    border-bottom-color: var(--border-color); /* Lighter bottom border */
    color: var(--text-color-dark);
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: var(--box-shadow-sm); /* Smaller shadow */
    transition: background-color var(--transition-duration) var(--transition-easing),
                color var(--transition-duration) var(--transition-easing);
}

.leaflet-bar a {
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.leaflet-bar a:last-child {
    border-bottom: 1px solid var(--border-color-darker); /* Darker bottom border */
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.leaflet-bar a:hover {
    background-color: rgba(var(--light-color-rgb), 0.98); /* Slightly lighter hover */
    color: var(--primary-color); /* Highlight on hover */
}

.leaflet-bar a.leaflet-disabled {
    cursor: not-allowed;
    background-color: #f0f0f0;
    color: #bbb;
}

.leaflet-bar a.leaflet-disabled:hover {
    background-color: #f0f0f0;
}

.leaflet-control-attribution {
    background-color: rgba(var(--light-color-rgb), 0.8); /* Slightly more transparent attribution */
    padding: 0.6rem 0.85rem;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow-sm); /* Smaller shadow */
    font-size: 0.8rem;
    color: var(--text-color-muted); /* Muted attribution text */
}

.leaflet-control-attribution a {
    color: var(--primary-color);
}

/* Pop-up Styling - Modern and Clean - Enhanced Readability */
.leaflet-popup-content-wrapper {
    background-color: var(--background-color-overlay); /* Overlay background for popups */
    padding: 1.25rem; /* Increased popup padding */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    color: var(--text-color-dark);
    border: 1px solid var(--border-color-darker); /* Darker border */
}

.leaflet-popup-content {
    margin: 0;
    line-height: var(--line-height-base);
}

.leaflet-popup-content h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 600;
}

.leaflet-popup-content p {
    margin-top: 0;
    margin-bottom: 0.9rem;
    font-size: 1.05rem;
    color: var(--text-color-dark);
}

.leaflet-popup-content ul, .leaflet-popup-content ol {
    margin-top: 0;
    margin-bottom: 0.9rem;
    padding-left: 1.75rem;
}

.leaflet-popup-content a {
    color: var(--info-color); /* Info color for links in popups */
    font-weight: 500;
}

.leaflet-popup-tip-container {
    width: 22px; /* Slightly larger tip */
    height: 12px;
    margin: 0 auto;
}

.leaflet-popup-tip {
    background-color: var(--background-color-overlay); /* Overlay background for tip */
    border: 1px solid var(--border-color-darker); /* Darker border */
    border-top-color: transparent;
    border-left-color: transparent;
    box-shadow: none;
    width: 12px;
    height: 12px;
    transform: translate3d(0, -7px, 0) rotate(45deg); /* Adjusted tip position */
}

/* Custom Controls - Search Bar, Locate, Layer Control - Enhanced Styling & Spacing */
.search-container,
.locate-container,
.layer-control {
    margin-bottom: 1rem;
}

.map-controls > section { /* Apply to direct section children of map-controls */
    background-color: var(--background-color-overlay);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    border: 1px solid var(--border-color-darker);
    padding: 1rem 1.25rem;
}

.search-container {
    display: flex;
    overflow: hidden;
    box-shadow: var(--box-shadow-sm); /* Redundant, already applied to section */
    border: none; /* Redundant, already applied to section */
    border-radius: var(--border-radius); /* Redundant, already applied to section */
    background-color: transparent; /* Redundant, already applied to section */
}

.control-section__title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--text-color-dark);
    font-weight: 600;
}


.search-label {
    padding: 0.85rem;
    font-weight: 500;
    display: none; /* Hide label visually, but keep for accessibility */
}

.search-input {
    padding: 0.85rem 1rem;
    border: none;
    font-size: 1.05rem;
    flex-grow: 1;
    border-radius: 0;
    background-color: transparent;
    color: var(--text-color-dark);
}

.search-input:focus {
    outline: none;
}

.search-button {
    padding: 0.85rem 1.5rem;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    cursor: pointer;
    font-size: 1.05rem;
    border-radius: 0;
    transition: background-color var(--transition-duration) var(--transition-easing);
}

.search-button:hover {
    background-color: var(--primary-color-darker);
}

.locate-me-button {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--success-color); /* Success color for Locate Me */
    color: var(--text-color-light);
    cursor: pointer;
    font-size: 1.05rem;
    box-shadow: var(--box-shadow-sm);
    transition: background-color var(--transition-duration) var(--transition-easing);
}

.locate-me-button:hover {
    background-color: var(--success-color-darker);
}

.layer-control {
    background-color: transparent; /* Redundant, already applied to section */
    border-radius: var(--border-radius); /* Redundant, already applied to section */
    box-shadow: var(--box-shadow-sm); /* Redundant, already applied to section */
    padding: 1rem 1.25rem; /* Redundant, already applied to section */
    border: none; /* Redundant, already applied to section */
}

.layer-control__title {
    margin-top: 0;
    margin-bottom: 1.1rem;
    font-size: 1.3rem;
    color: var(--text-color-dark);
    font-weight: 600;
}

.layer-checkboxes label {
    display: block;
    margin-bottom: 0.6rem;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 1.85rem; /* Space for checkbox */
    font-size: 1.05rem;
    color: var(--text-color-dark);
}

.layer-checkboxes label:last-child {
    margin-bottom: 0;
}

.layer-checkboxes input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.layer-checkboxes .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 1.3rem;
    width: 1.3rem;
    background-color: var(--background-color-light);
    border: 1px solid var(--border-color-darker); /* Darker border */
    border-radius: var(--border-radius);
    transition: background-color var(--transition-duration) var(--transition-easing), border-color var(--transition-duration) var(--transition-easing);
}

.layer-checkboxes label:hover input ~ .checkmark,
.layer-checkboxes label:focus-within input ~ .checkmark { /* Focus-within for label focus */
    background-color: #e0e0e0; /* Lighter hover background */
    border-color: var(--border-color); /* Lighter border on hover */
}

.layer-checkboxes input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.layer-checkboxes input:checked ~ .checkmark:after {
    display: block;
}

.layer-checkboxes .checkmark:after {
    left: 0.4rem;
    top: 0.15rem;
    width: 0.4rem;
    height: 0.8rem;
    border: solid var(--text-color-light);
    border-width: 0 0.2rem 0.2rem 0;
    transform: rotate(45deg);
}

/* Utility Classes (Bootstrap Inspired - Extended & Consistent) */
.mt-1 { margin-top: 0.25rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }
.mb-5 { margin-bottom: 2rem !important; }
.ms-1 { margin-left: 0.25rem !important; } /* margin-start */
.me-1 { margin-right: 0.25rem !important; } /* margin-end */
.ms-2 { margin-left: 0.5rem !important; } /* margin-start */
.me-2 { margin-right: 0.5rem !important; } /* margin-end */
.ms-3 { margin-left: 1rem !important; } /* margin-start */
.me-3 { margin-right: 1rem !important; } /* margin-end */
.ms-4 { margin-left: 1.5rem !important; } /* margin-start */
.me-4 { margin-right: 1.5rem !important; } /* margin-end */
.ms-5 { margin-left: 2rem !important; } /* margin-start */
.me-5 { margin-right: 2rem !important; } /* margin-end */
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 2rem !important; }
.ps-1 { padding-left: 0.25rem !important; } /* padding-start */
.pe-1 { padding-right: 0.25rem !important; } /* padding-end */
.ps-2 { padding-left: 0.5rem !important; } /* padding-start */
.pe-2 { padding-right: 0.5rem !important; } /* padding-end */
.ps-3 { padding-left: 1rem !important; } /* padding-start */
.pe-3 { padding-right: 1rem !important; } /* padding-end */
.ps-4 { padding-left: 1.5rem !important; } /* padding-start */
.pe-4 { padding-right: 1.5rem !important; } /* padding-end */
.ps-5 { padding-left: 2rem !important; } /* padding-start */
.pe-5 { padding-right: 2rem !important; } /* padding-end */
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-stretch { align-items: stretch !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.text-start { text-align: left !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-muted { color: var(--text-color-muted) !important; }
.fw-normal { font-weight: normal !important; }
.fw-bold { font-weight: bold !important; }
.fw-light { font-weight: lighter !important; }
.fst-italic { font-style: italic !important; }
.text-decoration-underline { text-decoration: underline !important; }
.rounded { border-radius: var(--border-radius) !important; }
.rounded-top { border-radius: var(--border-radius) var(--border-radius) 0 0 !important; }
.rounded-bottom { border-radius: 0 0 var(--border-radius) var(--border-radius) !important; }
.rounded-left { border-radius: 0 var(--border-radius) var(--border-radius) 0 !important; }
.rounded-right { border-radius: var(--border-radius) 0 0 var(--border-radius) !important; }
.shadow-sm { box-shadow: var(--box-shadow-sm) !important; }
.shadow { box-shadow: var(--box-shadow) !important; }
.border { border: 1px solid var(--border-color) !important; }
.border-darker { border-color: var(--border-color-darker) !important; }
.bg-light { background-color: var(--light-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; color: var(--text-color-light) !important; }
.bg-primary { background-color: var(--primary-color) !important; color: var(--text-color-light) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; color: var(--text-color-light) !important; }
.bg-success { background-color: var(--success-color) !important; color: var(--text-color-light) !important; }
.bg-info { background-color: var(--info-color) !important; color: var(--text-color-light) !important; }
.bg-warning { background-color: var(--warning-color) !important; color: var(--text-color-dark) !important; } /* Warning bg - dark text */
.bg-danger { background-color: var(--danger-color) !important; color: var(--text-color-light) !important; }

/* Responsive adjustments - Bootstrap Breakpoints - Refined for Mobile-First */
/* Default styles are for mobile-first (smallest screens) */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px; /* Slightly smaller container for small screens */
    }
    #map {
        height: 60vh; /* Adjusted map height for small screens */
        min-height: 400px; /* Min height for small screens */
    }
    .map-controls {
        padding: 0.75rem; /* Reduced padding for controls on small screens */
    }
    .search-container, .locate-me-button, .layer-control {
        font-size: 0.9rem; /* Slightly smaller font size for controls */
        padding: 0.6rem; /* Reduced padding for control sections */
    }
    .search-input, .search-button, .locate-me-button {
        padding: 0.7rem; /* Adjusted input/button padding */
    }
    h1 { font-size: 2.25rem; } /* Adjusted heading sizes for small screens */
    h2 { font-size: 2rem; }
    h3 { font-size: 1.7rem; }
    h4 { font-size: 1.4rem; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px; /* Tablet container width */
    }
    #map {
        height: 70vh; /* Adjusted map height for tablets */
        min-height: 450px; /* Min height for tablets */
    }
    .map-controls {
        flex-direction: row; /* Controls in a row on tablets */
        align-items: center; /* Align items in row */
        padding: 1rem; /* Standard padding for controls */
    }
    .search-container, .locate-container, .layer-control, .locate-me-button {
        width: auto; /* Auto width for controls on tablets */
        margin-bottom: 0; /* No bottom margin when in row */
    }
    .layer-control {
        margin-bottom: 0; /* No bottom margin for layer control */
    }
    .search-label {
        display: none; /* Hide label again for wider screens */
    }
    .search-input, .search-button, .locate-me-button {
        font-size: 1rem; /* Standard font size for controls */
        padding: 0.75rem; /* Standard padding for controls */
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px; /* Desktop container width */
    }
    #map {
        height: 75vh; /* Adjusted map height for desktops */
    }
    .map-controls {
        padding: 1rem; /* Standard padding for controls */
        justify-content: flex-start; /* Left-align controls on desktop */
    }
    .search-container, .locate-me-button, .layer-control {
        padding: 0.75rem; /* Standard padding for control sections */
        font-size: 0.95rem; /* Slightly smaller font for controls on desktop */
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px; /* Large desktop container width */
    }
    #map {
        height: 80vh; /* Adjusted map height for large desktops */
    }
    .map-controls {
        padding: 1.25rem; /* Increased padding for controls on large desktops */
    }
    .search-container, .locate-me-button, .layer-control {
        padding: 1rem; /* Standard padding for control sections */
        font-size: 1rem; /* Standard font size for controls on large desktops */
    }
}

/* 2XL devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px; /* Extra large desktop container width */
    }
    #map {
        height: 85vh; /* Adjusted map height for extra large desktops */
    }
}

/* Component Specific Styles - Preparing for future components */

/* Onboarding Component (Example Styling - Adjust as needed) */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--dark-color-rgb), 0.5); /* Semi-transparent dark overlay */
    z-index: 900; /* Above all other content */
    display: flex;
    justify-content: center;
    align-items: center;
}

.onboarding-modal {
    background-color: var(--background-color-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 500px;
    text-align: center;
}

.onboarding-modal__title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.onboarding-modal__content {
    margin-bottom: 2rem;
}

.onboarding-modal__buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.onboarding-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition-duration) var(--transition-easing);
}

.onboarding-button--primary {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.onboarding-button--primary:hover {
    background-color: var(--primary-color-darker);
}

.onboarding-button--secondary {
    background-color: var(--secondary-color);
    color: var(--text-color-light);
}

.onboarding-button--secondary:hover {
    background-color: darken(var(--secondary-color), 10%);
}


/* Error Modal Component (Example Styling) */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--dark-color-rgb), 0.5);
    z-index: 900;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-modal {
    background-color: var(--background-color-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 450px;
    text-align: center;
    border-top: 5px solid var(--danger-color); /* Highlight error with danger color */
}

.error-modal__title {
    color: var(--danger-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.error-modal__message {
    margin-bottom: 1.5rem;
    color: var(--text-color-dark);
}

.error-modal__button {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--danger-color);
    color: var(--text-color-light);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition-duration) var(--transition-easing);
}

.error-modal__button:hover {
    background-color: var(--danger-color-darker);
}


/* Loading Spinner Component (Example Styling) */
.loading-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--light-color-rgb), 0.5); /* Semi-transparent light overlay */
    z-index: 900;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    border: 0.4em solid rgba(var(--primary-color-rgb), 0.3);
    border-top: 0.4em solid var(--primary-color);
    border-radius: 50%;
    width: 3em;
    height: 3em;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Bottom Sheet Component (Mobile Pop-up - Example Styling) */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--dark-color-rgb), 0.5); /* Semi-transparent overlay */
    z-index: 900;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align to bottom */
    pointer-events: none; /* Allow clicks to pass through initially */
    opacity: 0;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    transform: translateY(100%); /* Slide out initially */
}

.bottom-sheet-overlay.open {
    opacity: 1;
    transform: translateY(0); /* Slide in when open */
    pointer-events: auto; /* Enable pointer events when open */
}


.bottom-sheet {
    background-color: var(--background-color-light);
    border-radius: var(--border-radius) var(--border-radius) 0 0; /* Rounded top corners */
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    width: 100%;
    max-width: 600px; /* Max width for bottom sheet */
    margin-bottom: 0; /* Stick to bottom */
    transform: translateY(0); /* Ensure it starts at the bottom */
    transition: transform 0.3s ease-out;
    pointer-events: auto; /* Ensure bottom sheet itself is interactive */
}

.bottom-sheet__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bottom-sheet__title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.bottom-sheet__close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color-muted);
    transition: color var(--transition-duration) var(--transition-easing);
}

.bottom-sheet__close-button:hover {
    color: var(--text-color-dark);
}

.bottom-sheet__content {
    padding-bottom: 1rem;
}


/* Modal Component (Desktop Pop-up - Example Styling) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--dark-color-rgb), 0.5);
    z-index: 900;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background-color: var(--background-color-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
    width: 95%; /* Responsive width */
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal__title {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin: 0;
}

.modal__close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color-muted);
    transition: color var(--transition-duration) var(--transition-easing);
}

.modal__close-button:hover {
    color: var(--text-color-dark);
}

.modal__body {
    margin-bottom: 1.5rem;
}

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}