#map {
    width: 100vw; 
    position: fixed; 
    top: 0; 
    left: 0;
}

.marker-tooltip {
    color: white !important;
    background: none;
    font-weight: bold;
    font-size: 12px;
    border: none;
    box-shadow: none;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    visibility: hidden;
    opacity: 0%;
}

.building-tooltip {
    font-size: 12px;
    font-weight: bold;
    color: black;
    background-color: transparent;
    border: none;
    box-shadow: none;
    transform: none;
    visibility: hidden;
    opacity: 0%;
}

#search-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5em;
    width: 28%;
    z-index: 1200;
}

#search-bar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#search-bar:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(28, 117, 233, 0.5);
    box-shadow: 0 4px 24px rgba(28, 117, 233, 0.12);
}

#search-bar input {
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    cursor: text;
}

#search-icon {
    margin-left: 12px;
    color: #8c99ab;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

#search-icon:hover {
    color: #475569;
}

#search-bar input::placeholder {
    color: #6d7c90;
    font-weight: 500;
}

#search-clear-button {
    cursor: pointer;
    margin-right: 8px;
    color: #475569;
    font-size: 20px;
    transition: color 0.2s ease;
}

.autocomplete-container {
    position: relative;
    width: 100%;
    overflow: visible;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 3px;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: dropdown-in 0.15s ease-out;
}

#search-results.autocomplete-results {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Dropdown animation for the autocomplete results */
@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-results::-webkit-scrollbar {
    display: none;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    color: #334155;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.autocomplete-item:first-child {
    border-radius: 12px 12px 0 0;
}

.autocomplete-item:last-child {
    border-radius: 0 0 12px 12px;
}

.autocomplete-item:hover {
    background-color: rgba(28, 117, 233, 0.1);
    color: #1c74e9;
}

.select-wrapper {
    position: relative;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #94a3b8;
    pointer-events: none;
}

.select-input {
    cursor: pointer;
    padding-right: 40px;
}

#spinner {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    z-index: 9999;
}

.map-legend {
    padding: 10px 15px;
    border-radius: 5px;
    width: max-content;
    font-family: sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1300;
    position: fixed;
    top: 1em;
    right: 1em;
    color: rgb(0, 0, 0) !important;
    background: rgba(255, 255, 255, 0.368);
    border: 2px solid #000000;
    font-weight: bold;
    font-size: 12px;
    box-shadow: none;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    opacity: 100%;
}

.legend-color {
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid #000000;
    border-radius: 2px;
    opacity: 100%;
}

.legend-label {
    font-size: 14px;
    opacity: 100%;
}

#toast-container {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    z-index: 1300;
}

@media (min-width: 601px) {
    #toast-container {
        top: 20px;
        right: 20px;
        left: auto;
        bottom: auto;
        align-items: flex-end;
    }
}

@media (max-width: 600px) {
    #toast-container {
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 90vw;
    }
}

.toast {
    background: #323232;
    color: white;
    padding: 14px 24px;
    border-radius: 4px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: auto;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 200px;
    max-width: 90vw;
    opacity: 0;
    animation: toast-in 0.3s ease-out forwards;
}

@keyframes toast-in {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.toast.fade-out {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-out {
    from { 
        transform: translateY(0);
        opacity: 1; 
    }
    to { 
        transform: translateY(60%);
        opacity: 0; 
    }
}

@media (max-width: 600px) {
    .toast {
        width: 100%;
        border-radius: 0;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    #search-container {
        width: 70vw;
        left: 55%;
    }
}

@supports (height: 100dvh){
    #map {
        height: 100dvh;
    }
}

@supports not (height: 100dvh){
    #map {
        height: 100vh;
    }
}
