body,
html {
    height: 100%;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f0f4f8;
}

#map {
    width: 100%;
    height: 100%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#loading.hide {
    display: none;
}

#loading p {
    margin-top: 20px;
    font-size: 18px;
    color: #333;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

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

#filter-buttons {
    position: absolute;
    bottom: 20px;
    left: 10px;
    transform: none;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    gap: 10px;
    pointer-events: none;
    touch-action: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#search-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    #filter-buttons {
        flex-direction: column;
        bottom: 80px;
        left: 10px;
    }

    #search-container {
        width: calc(100% - 40px);
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
    }

    #routeFilter {
        width: 100%;
        margin: 0;
    }
}

#filter-buttons input[type="checkbox"],
#filter-buttons label {
    display: none;
}

#filter-buttons div {
    position: relative;
    display: inline-block;
    background: rgba(204, 204, 204, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    width: fit-content;
    transition: all 0.3s ease;
}

#filter-buttons * {
    pointer-events: auto;
    touch-action: auto;
}

#filter-buttons div:hover {
    cursor: pointer;
    background: rgba(204, 204, 204, 0.8);
    transform: translateY(-2px);
}

#filter-buttons div img {
    margin: 5px 5px;

}

#filter-buttons div:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

#routeFilter {
    margin-right: 0;
    padding: 5px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#routeFilter:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

.tooltip {
    visibility: hidden;
    background-color: rgba(85, 85, 85, 0.9);
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    text-transform: capitalize;
    pointer-events: none;
    touch-action: none;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(85, 85, 85, 0.9) transparent transparent transparent;
}

.custom-icon {
    background-color: #fff;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.custom-icon.off {
    filter: invert(1);
    background-color: #000000;
}

.custom-icon img {
    width: 20px;
    height: 20px;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.marker-label {
    position: absolute;
    top: 5px;
    right: 10px;
    transform: translate(100%, -100%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
}

.cookie-popup {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.9);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1001;
}

.cookie-popup p {
    margin: 0;
    margin-right: 20px;
}

.cookie-popup button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 10px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.cookie-popup button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.leaflet-control-zoom {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaflet-control-zoom a {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-tip {
    background-color: rgba(255, 255, 255, 0.9);
}

#title-overlay {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

#title-overlay h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}
