/* My Curbside Services - West Hollywood Brand */

:root {
    /* West Hollywood Brand Colors (Rainbow Flag) */
    --weho-red: #C86B66;
    --weho-orange: #E1A46D;
    --weho-yellow: #FAE85E;
    --weho-green: #00AFA8;
    --weho-blue: #007BBE;
    --weho-purple: #956B99;

    /* Primary Colors - Using West Hollywood Blue & Teal */
    --primary: #007BBE;
    --primary-dark: #005a8d;
    --primary-light: #e6f4fb;
    --secondary: #00AFA8;
    --secondary-dark: #008580;

    /* Service Colors - West Hollywood Rainbow Palette */
    --trash: #E1A46D;        /* Orange */
    --recycling: #007BBE;     /* Blue */
    --green-waste: #00AFA8;   /* Green/Teal */
    --street-cleaning: #956B99; /* Purple */
    --parking: #C86B66;       /* Red */

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;

    /* Shadows - Enhanced for more depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.15), 0 4px 8px -2px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.08);

    /* Gradients - Modern and Vibrant */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --gradient-secondary: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    --gradient-vibrant: linear-gradient(135deg, var(--weho-blue), var(--weho-purple));
    --gradient-warm: linear-gradient(135deg, var(--weho-orange), var(--weho-red));
    --gradient-cool: linear-gradient(135deg, var(--weho-green), var(--weho-blue));

    /* Surfaces */
    --brand-overlay: linear-gradient(160deg,
        rgba(0, 123, 190, 0.14) 0%,
        rgba(0, 175, 168, 0.14) 38%,
        rgba(149, 107, 153, 0.18) 100%);
    --surface-base: rgba(255, 255, 255, 0.88);
    --surface-elevated: rgba(255, 255, 255, 0.94);
    --surface-strong: rgba(230, 244, 251, 0.9);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --service-area-control-height: 44px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    background: var(--brand-overlay);
    color: var(--gray-900);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--gradient-vibrant);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-error-message {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(8, 123, 190, 0.95);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    z-index: 10000;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 24px auto;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.loading-content p {
    font-size: 14px;
    opacity: 0.9;
}

/* App Container */
.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: filter 0.3s ease;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, rgba(0, 123, 190, 0.98), rgba(0, 175, 168, 0.95));
    z-index: 100;
    box-shadow: 0 12px 30px rgba(0, 123, 190, 0.25);
    color: var(--white);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    height: 72px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.16);
    border: none;
    color: var(--white);
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.icon-btn:active {
    transform: translateY(0);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    margin: 0 16px 0 0;
    color: var(--white);
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.app-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
}

/* Search Container */
.search-container {
    background: linear-gradient(135deg, var(--surface-elevated), var(--surface-strong));
    padding: 18px 22px 22px;
    border-bottom: 1px solid rgba(0, 123, 190, 0.15);
    position: relative;
    z-index: 90;
    box-shadow: 0 12px 32px rgba(0, 123, 190, 0.15);
    backdrop-filter: blur(10px);
}

.search-wrapper {
    display: flex;
    gap: 12px;
}

.search-box {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 123, 190, 0.12);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 123, 190, 0.6);
    width: 20px;
    height: 20px;
}

.search-input {
    width: 100%;
    padding: 15px 52px 15px 52px;
    border: 1.5px solid rgba(0, 123, 190, 0.25);
    border-radius: 14px;
    font-size: 15px;
    transition: var(--transition);
    background: transparent;
    color: var(--gray-900);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-input:hover {
    border-color: rgba(0, 123, 190, 0.45);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 190, 0.25);
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(0, 123, 190, 0.45);
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.clear-btn:hover {
    background: rgba(0, 123, 190, 0.1);
    color: var(--primary);
}

.clear-btn.hidden {
    display: none;
}

.locate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--gradient-cool);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 175, 168, 0.3);
}

.locate-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 175, 168, 0.4);
    transform: translateY(-2px);
}

.locate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 175, 168, 0.3);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: calc(100% - 4px);
    left: 22px;
    right: 22px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(0, 123, 190, 0.18);
    max-height: 280px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(0, 123, 190, 0.15);
    backdrop-filter: blur(8px);
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(0, 123, 190, 0.12);
    color: var(--primary-dark);
}

.suggestion-loading,
.suggestion-empty {
    padding: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
}

.suggestion-loading {
    color: var(--primary);
    font-weight: 500;
}

.suggestion-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid var(--primary);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
}

/* Map Controls */
.map-controls {
    position: absolute;
    right: 20px;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 80;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 244, 251, 0.92));
    border: 1px solid rgba(0, 123, 190, 0.18);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 123, 190, 0.18);
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: linear-gradient(135deg, rgba(0, 123, 190, 0.95), rgba(0, 175, 168, 0.9));
    border-color: transparent;
    color: var(--white);
    box-shadow: 0 12px 26px rgba(0, 123, 190, 0.28);
    transform: translateY(-1px);
}

.control-btn:active {
    transform: scale(0.97);
}

/* Info Panel */
.info-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(230, 244, 251, 0.92));
    border-radius: 24px 24px 0 0;
    box-shadow: 0 24px 40px rgba(0, 123, 190, 0.22);
    z-index: 85;
    transform: translateY(calc(100% - 72px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: clamp(280px, 48vh, 420px);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 123, 190, 0.16);
}

.info-panel.expanded {
    transform: translateY(0);
}

.info-panel.minimized {
    transform: translateY(calc(100% - 72px));
}

.info-panel.hidden {
    transform: translateY(calc(100% + 32px));
}

/* Desktop layout - bottom panorama */
@media (min-width: 1024px) {
    .info-panel {
        left: 50%;
        right: auto;

        width: min(1560px, 98vw);
        bottom: 32px;
        border-radius: 32px;
        transform: translate(-50%, calc(100% - 156px));
        max-height: calc(100vh - 160px);

    }

    .info-panel.expanded {
        transform: translate(-50%, 0);
    }

    .info-panel.minimized {

        transform: translate(-50%, calc(100% - 156px));

    }

    .info-panel.hidden {
        transform: translate(-50%, calc(100% + 64px));
    }

    .panel-handle {
        padding: 20px 0 12px;
    }
}

.panel-handle {
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.panel-handle:hover .handle-bar {
    background: rgba(0, 123, 190, 0.5);
}

.panel-handle:active .handle-bar {
    background: rgba(0, 123, 190, 0.7);
}

.handle-bar {
    width: 44px;
    height: 4px;
    background: rgba(0, 123, 190, 0.35);
    border-radius: 999px;
    transition: var(--transition);
}

.panel-content {
    --panel-padding: 20px;
    padding: 0 var(--panel-padding) 24px;
    overflow-y: auto;
    max-height: calc(100% - 88px);
    flex: 1 1 auto;
    min-height: 0;
}

.panel-header {
    margin: 0 calc(-1 * var(--panel-padding, 20px)) 16px;
    position: sticky;
    top: 0;
    padding: 14px calc(var(--panel-padding, 20px) + 48px) 18px var(--panel-padding, 20px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(230, 244, 251, 0.95));
    backdrop-filter: blur(10px);
    z-index: 2;
    border-bottom: 1px solid rgba(0, 123, 190, 0.12);
}

.panel-collapse-button {
    position: absolute;
    top: 50%;
    right: var(--panel-padding, 20px);
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 123, 190, 0.12);
    color: var(--primary);
    box-shadow: 0 6px 18px rgba(0, 123, 190, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.panel-collapse-button:hover,
.panel-collapse-button:focus {
    background: var(--primary);
    color: var(--white);
    outline: none;
    box-shadow: 0 10px 24px rgba(0, 123, 190, 0.28);
}

.panel-collapse-button:active {
    transform: translateY(-50%) scale(0.95);
}

.panel-return-button {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--weho-blue), var(--weho-purple));
    color: var(--white);
    box-shadow: 0 18px 32px rgba(0, 123, 190, 0.35);
    cursor: pointer;
    transition: var(--transition);
    z-index: 120;
    opacity: 0;
    pointer-events: none;
    font-weight: 600;
}

.panel-return-button .material-icons {
    font-size: 24px;
}

.panel-return-button:hover,
.panel-return-button:focus {
    background: linear-gradient(135deg, var(--weho-purple), var(--weho-blue));
    outline: none;
    box-shadow: 0 22px 42px rgba(0, 123, 190, 0.35);
}

.panel-return-button:active {
    transform: translateX(-50%) scale(0.97);
}

body.info-panel-hidden .panel-return-button {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .panel-return-button {
        bottom: 20px;
        padding: 12px 20px;
    }
}

.panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.panel-address {
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
}

/* Service Cards */
.service-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

@media (min-width: 1024px) {
    .panel-content {
        --panel-padding: 32px;
        padding: 0 var(--panel-padding) 32px;
        max-height: none;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .panel-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
        padding-top: 8px;
    }

    .panel-address {
        font-size: 15px;
    }

    .service-cards {
        margin-top: 12px;

        display: flex;
        flex-direction: row;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: clamp(12px, 1.8vw, 24px);

    }

    .service-card {
        height: 100%;

        flex: 1 1 0;
        min-width: 0;

    }
}

.service-card {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(0, 123, 190, 0.06));
    border-radius: 18px;
    padding: 20px 22px;
    border-left: 6px solid transparent;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0, 123, 190, 0.16);
    --service-accent: var(--primary);
}

.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 123, 190, 0.18), rgba(149, 107, 153, 0.12));
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.service-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: flex-start;
}

.service-card:hover {
    box-shadow: 0 18px 36px rgba(0, 123, 190, 0.24);
    transform: translateY(-2px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.trash {
    border-left-color: var(--trash);
    --service-accent: var(--trash);
}

.service-card.recycling {
    border-left-color: var(--recycling);
    --service-accent: var(--recycling);
}

.service-card.greenWaste,
.service-card.green-waste {
    border-left-color: var(--green-waste);
    --service-accent: var(--green-waste);
}

.service-card.streetCleaning,
.service-card.street-cleaning {
    border-left-color: var(--street-cleaning);
    --service-accent: var(--street-cleaning);
}

.service-card.parking {
    border-left-color: var(--parking);
    --service-accent: var(--parking);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition-fast);
}

.service-card:hover .service-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.service-card.trash .service-icon {
    background: var(--trash);
}
.service-card.recycling .service-icon {
    background: var(--recycling);
}
.service-card.greenWaste .service-icon,
.service-card.green-waste .service-icon {
    background: var(--green-waste);
}
.service-card.streetCleaning .service-icon,
.service-card.street-cleaning .service-icon {
    background: var(--street-cleaning);
}
.service-card.parking .service-icon {
    background: var(--parking);
}

.service-icon .material-icons {
    font-size: 24px;
    color: var(--white);
}

.service-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
}

.service-schedule {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.schedule-day {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-600);
    border: 2px solid rgba(0, 123, 190, 0.16);
    transition: var(--transition);
}

.schedule-day.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 123, 190, 0.2);
}

.service-time-wrapper {
    background: linear-gradient(135deg, rgba(0, 175, 168, 0.12), rgba(0, 123, 190, 0.1));
    border-left: 4px solid var(--weho-green);
    padding: 12px 16px;
    border-radius: 10px;
}

.service-time-wrapper.parking-highlight {
    background: linear-gradient(135deg, rgba(0, 123, 190, 0.14), rgba(149, 107, 153, 0.12));
    border-left-color: var(--primary);
}

.service-time-wrapper.parking-highlight .service-time-label {
    color: var(--primary);


}

.service-highlight-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--primary-dark);
    margin-bottom: 6px;
    line-height: 1.4;
}

.service-highlight-note .material-icons {
    font-size: 16px;

    color: var(--primary);

}

.service-time-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.service-time-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}

@media (min-width: 1280px) {
    .service-card {
        padding: clamp(18px, 1.4vw, 24px) clamp(20px, 1.6vw, 28px);
    }

    .service-title {
        font-size: clamp(15px, 1.2vw, 18px);
    }

    .service-time-value {
        font-size: clamp(14px, 1.05vw, 16px);
    }

    .service-info {
        font-size: clamp(12px, 0.95vw, 13px);
    }

    .schedule-day {
        padding: clamp(4px, 0.45vw, 6px) clamp(8px, 0.9vw, 12px);
        font-size: clamp(11px, 0.9vw, 12px);
    }
}

@media (min-width: 1536px) {
    .panel-content {
        --panel-padding: 36px;
    }

    .service-cards {
        gap: clamp(16px, 1.4vw, 28px);
    }

    .service-card {
        padding: clamp(12px, 0.9vw, 18px) clamp(14px, 1vw, 20px);
    }

    .service-info {
        font-size: clamp(12px, 0.85vw, 13px);

    }
}

.service-info {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 8px;
}

.service-info strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Zoom to Service Button */
.zoom-to-service-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 123, 190, 0.3);
}

.zoom-to-service-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 123, 190, 0.4);
    transform: translateY(-2px);
}

.zoom-to-service-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 190, 0.3);
}

.zoom-to-service-btn .material-icons {
    font-size: 18px;
}

.service-area-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    min-height: var(--service-area-control-height);
    border-radius: 999px;
    border: 1px solid var(--service-accent, var(--primary));
    background: rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), color-mix(in srgb, var(--service-accent, var(--primary)) 12%, transparent));
    color: var(--service-accent, var(--primary));
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.service-card-footer .service-area-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: var(--service-area-control-height);
    width: 100%;
    margin-bottom: auto;
}

.service-card-footer .service-area-slot:empty {
    visibility: hidden;
    pointer-events: none;
}

.service-card-footer .service-area-btn {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-bottom: auto;
}

.service-area-btn .material-icons {
    font-size: 18px;
}

.service-area-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.service-area-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.service-area-btn.is-active {
    background: var(--service-accent, var(--primary));
    color: var(--white);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.service-area-btn:focus-visible {
    outline: 3px solid rgba(8, 123, 190, 0.35);
    outline: 3px solid color-mix(in srgb, var(--service-accent, var(--primary)) 45%, transparent);
    outline-offset: 2px;
}

/* Map Legends */
.map-legend {
    position: absolute;
    top: 80px;
    right: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 244, 251, 0.9));
    border-radius: 14px;
    box-shadow: 0 18px 32px rgba(0, 123, 190, 0.2);
    padding: 12px 16px;
    max-width: 240px;
    z-index: 100;
    font-size: 12px;
    border: 1px solid rgba(0, 123, 190, 0.12);
}

.legend-header {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
    font-size: 13px;
}

.legend-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-label {
    color: var(--gray-700);
    font-size: 11px;
}

.legend-note {
    color: var(--gray-600);
    font-size: 10px;
    line-height: 1.4;
    margin-top: 2px;
}

@media (min-width: 769px) {
    .map-legend {
        bottom: 20px;
        top: auto;
        left: 20px;
        right: auto;
        padding: 12px 16px;
        max-width: 280px;
        font-size: 13px;
    }

    .legend-header {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .legend-label {
        font-size: 12px;
    }

    .legend-note {
        font-size: 11px;
        margin-top: 4px;
    }
}

@media (min-width: 1024px) {
    .map-legend {
        bottom: calc(min(32vh, 420px) + 32px);
    }
}

/* Service Links */
.service-note {
    font-size: 12px;
    color: var(--gray-700);
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 244, 251, 0.88));
    border-radius: 8px;
    margin-top: 8px;
    line-height: 1.5;
    border: 1px solid rgba(0, 123, 190, 0.12);
}

.service-note a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.service-note a:hover {
    text-decoration: underline;
}

.service-links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 123, 190, 0.12);
    flex-wrap: wrap;
}

.service-link {
    font-size: 12px;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--weho-purple);
    text-decoration: underline;
}

/* Basemap Gallery */
.basemap-gallery {
    position: absolute;
    right: 20px;
    top: 240px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(230, 244, 251, 0.9));
    border-radius: 18px;
    box-shadow: 0 22px 38px rgba(0, 123, 190, 0.22);
    padding: 22px;
    width: 220px;
    z-index: 80;
    display: none;
    border: 1px solid rgba(0, 123, 190, 0.12);
}

.basemap-gallery.active {
    display: block;
}

.basemap-gallery h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.basemap-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.basemap-option {
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--gray-700);
}

.basemap-option:hover {
    transform: scale(1.05);
    background: rgba(0, 123, 190, 0.12);
}

.basemap-option.active .basemap-thumbnail {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 123, 190, 0.25);
}

.basemap-option.active {
    background: rgba(0, 123, 190, 0.18);
    color: var(--primary-dark);
    box-shadow: 0 12px 24px rgba(0, 123, 190, 0.24);
}

.basemap-thumbnail {
    width: 100%;
    height: 64px;
    border-radius: 8px;
    border: 2px solid rgba(0, 123, 190, 0.15);
    margin-bottom: 6px;
    transition: var(--transition);
}

.basemap-thumbnail.topo { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.basemap-thumbnail.streets { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
.basemap-thumbnail.satellite { background: linear-gradient(135deg, #064e3b, #047857); }
.basemap-thumbnail.gray { background: linear-gradient(135deg, #fafafa, #f5f5f5); }

.basemap-option span {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(230, 244, 251, 0.92));
    border-radius: 24px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 40px rgba(0, 123, 190, 0.25);
    border: 1px solid rgba(0, 123, 190, 0.12);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 123, 190, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.modal-close {
    background: rgba(0, 123, 190, 0.12);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary);
    color: var(--white);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    line-height: 1.7;
    color: var(--gray-700);
}

.modal-body h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 12px;
    color: var(--primary-dark);
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body ol,
.modal-body ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body strong {
    font-weight: 600;
    color: var(--primary-dark);
}

.modal-body a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* Welcome Modal */
.welcome-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 12000;
    padding: 24px;
}

.welcome-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.welcome-modal__backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(4, 16, 31, 0.78), rgba(8, 34, 54, 0.92));
    backdrop-filter: blur(14px);
    opacity: 0.95;
}

.welcome-modal__dialog {
    position: relative;
    width: min(720px, 96vw);
    max-height: min(85vh, 760px);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(233, 246, 255, 0.95));
    border-radius: 28px;
    padding: clamp(24px, 4vw, 40px);
    box-shadow: 0 40px 80px rgba(4, 25, 44, 0.35);
    border: 1px solid rgba(8, 123, 190, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vw, 28px);
    z-index: 1;
}

.welcome-modal__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.welcome-modal__logo {
    width: clamp(64px, 12vw, 96px);
    height: clamp(64px, 12vw, 96px);
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(8, 123, 190, 0.28);
}

.welcome-modal__header h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.35;
}

.welcome-modal__body {
    color: var(--gray-700);
    font-size: clamp(0.74rem, 1.25vw, 0.82rem);
    line-height: 1.75;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    padding: clamp(16px, 3vw, 24px);
    box-shadow: inset 0 0 0 1px rgba(8, 123, 190, 0.08);
    overflow-y: auto;
    max-height: 50vh;
}

.welcome-modal__body p {
    margin-bottom: 16px;
}

.welcome-modal__body p:last-child {
    margin-bottom: 0;
}

.welcome-modal__footer {
    display: flex;
    justify-content: center;
}

.welcome-modal__button {
    min-width: 140px;
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 18px 34px rgba(8, 123, 190, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.welcome-modal__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 38px rgba(8, 123, 190, 0.4);
}

.welcome-modal__button:active {
    transform: translateY(0);
}

body.welcome-modal-open {
    overflow: hidden;
}

body.welcome-modal-open .app-container {
    filter: blur(2px) saturate(95%);
    pointer-events: none;
    user-select: none;
}

@media (max-width: 640px) {
    .welcome-modal__dialog {
        border-radius: 22px;
        gap: 20px;
    }

    .welcome-modal__body {
        max-height: 55vh;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 10000;
    max-width: 500px;
    width: calc(100% - 32px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification__content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.notification__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.notification__icon .material-icons {
    font-size: 28px;
}

.notification__message {
    flex: 1;
    min-width: 0;
}

.notification__message h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.notification__message p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .notification {
        top: 70px;
        max-width: none;
    }

    .notification__content {
        padding: 16px;
        gap: 12px;
    }

    .notification__icon {
        width: 40px;
        height: 40px;
    }

    .notification__icon .material-icons {
        font-size: 24px;
    }

    .notification__message h3 {
        font-size: 16px;
    }

    .notification__message p {
        font-size: 13px;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header h1 {
        font-size: 18px;
    }

    .search-wrapper {
        flex-direction: column;
    }

    .locate-btn {
        width: 100%;
        justify-content: center;
    }

    .info-panel {
        max-height: 70vh;
    }

}

/* ArcGIS Overrides */
.esri-ui-corner .esri-component {
    box-shadow: var(--shadow-md) !important;
    border-radius: 12px !important;
}

.esri-popup__main-container {
    border-radius: 16px !important;
}

.esri-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
}
