/* Map Container */
#map {
    width: 100%;
    height: calc(100vh - 5.5rem); /* Subtract space for controls */
    max-width: 100%;
}


/* Legend Styles */
.legend {
    background: white;
    padding: 8px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    min-width: 180px;
    font-size: 12px;
}

.legend-title h4 {
    font-size: 1.125rem;
    margin: 0.3125rem 0;
}

.legend-toggle {
    float: right;
    color: #666;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: color 0.2s ease;
}

.legend-toggle:hover {
    color: #333;
}
/* Default state for large screens */
.legend-details {
    display: block;
}

/* Hide on small screens */
@media screen and (max-width: 768px) {
    .legend-details {
        display: none;
    }
    
    .legend-details.show {
        display: block;
    }
}

.legend-toggle:focus {
    outline: none;
}

.legend-details {
    display: none;
}

.legend-details.show {
    display: block;
}

.legend-footer {
    font-size: 10px;
    font-style: italic;
    color: #666;
    margin-top: 5px;
    border-top: 1px solid #dee2e6;
    padding-top: 5px;
}


/* Day Toggle Controls */
.day-toggle {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

.day-toggle input {
    margin-right: 5px;
    cursor: pointer;
}

.day-color {
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 50%;
    vertical-align: middle;
}

.day-title {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
    flex-grow: 1;
}

.day-title:hover {
    background-color: #f0f0f0;
}

/* Label toggle */
.toggle-labels {
    margin: 8px 0;
    padding: 4px 0;
    border-bottom: 1px solid #dee2e6;
}

.toggle-labels input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.toggle-labels label {
    cursor: pointer;
    font-size: 11px;
}


/* Show All Button */
.show-all {
    display: block;
    text-align: center;
    margin: 5px 0;
    padding: 3px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background-color 0.2s;
}

.show-all:hover {
    background: #e9ecef;
}

/* Markers and Route Labels */
.marker-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    line-height: 1.5rem;
    text-align: center;
    color: white;
    font-weight: bold;
}

.route-label {
    background: none;
    border: none;
    font-size: 0.875rem;
}

.route-label div {
    display: inline-block;
    background: white;
    opacity: 0.7;
    padding: 3px 6px;
    border-radius: 3px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    pointer-events: none;
}

/* Popup Styles */
.leaflet-popup-content {
    margin: 8px 12px;
}

.leaflet-popup-content b {
    display: block;
    margin-bottom: 2px;
}

.legend {
    padding: 0.75rem;
    border-radius: 0.25rem;
}

.legend-toggle {
    font-size: 0.875rem;
    padding: 0 0.25rem;
}
.day-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.125rem;
    margin: 0 0.5rem;
}

.leaflet-popup-content {
    margin: 0.5rem 0.75rem;
}

.leaflet-popup-content b {
    display: block;
    margin-bottom: 0.125rem;
}

.leaflet-popup-content i {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.125rem;
}

.leaflet-popup-content a {
    display: block;
    margin-top: 0.3125rem;
    color: #0074D9;
    text-decoration: none;
}

.leaflet-popup-content a:hover {
    text-decoration: underline;
}

/* Layer Control */
.leaflet-control-layers {
    border-radius: 0.25rem;
    background: white;
    box-shadow: 0 0.0625rem 0.3125rem rgba(0,0,0,0.4);
}

.leaflet-control-layers-toggle {
    width: 2.25rem;
    height: 2.25rem;
    background-size: 1.25rem 1.25rem;
}

.leaflet-control-layers-expanded {
    padding: 0.375rem 0.625rem 0.375rem 0.375rem;
    font-size: 12px;
}

