/* Latausasemat Plugin - Complete CSS */

/* Container */
#latausasemat-container {
    margin: 20px 0;
    position: relative;
}

#latausasemat-map {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1;
}

#latausasemat-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
}

/* Layout with filters */
.latausasemat-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Filters sidebar */
.latausasemat-filters {
    flex: 0 0 280px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.latausasemat-filters h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #333;
    border-bottom: 2px solid #2c5aa0;
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-icon {
    font-size: 20px;
    display: inline-block;
}

.filter-icon.fast {
    color: #dc3545;
}

.filter-icon.normal {
    color: #28a745;
}

.filter-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #2c5aa0;
}

.filter-select:hover {
    border-color: #2c5aa0;
}

.btn-reset {
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-reset:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.filter-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin-top: 20px;
}

.filter-stats p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.filter-stats strong {
    color: #2c5aa0;
    font-size: 18px;
}

/* Map wrapper */
.latausasemat-map-wrapper {
    flex: 1;
    min-width: 0;
}

/* Popup Styles */
.latausasema-popup-container .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
}

.latausasema-popup {
    padding: 10px;
}

.latausasema-popup h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #28a745;
    padding-bottom: 8px;
}

.latausasema-popup p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.latausasema-popup strong {
    color: #555;
}

.teho-fast {
    color: #dc3545;
    font-weight: bold;
}

.teho-normal {
    color: #28a745;
    font-weight: bold;
}

.ocm-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: #007bff;
    color: white !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-size: 13px;
    transition: background 0.3s;
}

.ocm-link:hover {
    background: #0056b3;
}

/* Legend */
.legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    line-height: 1.8;
}

.legend h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.legend div {
    margin: 5px 0;
    font-size: 14px;
}

/* Marker Cluster Styles */
.marker-cluster-small {
    background-color: rgba(40, 167, 69, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(40, 167, 69, 0.8);
    color: white;
    font-weight: bold;
}

.marker-cluster-medium {
    background-color: rgba(255, 193, 7, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(255, 193, 7, 0.8);
    color: white;
    font-weight: bold;
}

.marker-cluster-large {
    background-color: rgba(220, 53, 69, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 992px) {
    .latausasemat-layout {
        flex-direction: column;
    }
    
    .latausasemat-filters {
        flex: 1;
        position: static;
        width: 100%;
    }
    
    #latausasemat-map {
        height: 500px !important;
    }
}

@media (max-width: 768px) {
    #latausasemat-map {
        height: 400px !important;
    }
    
    .latausasema-popup h3 {
        font-size: 16px;
    }
    
    .latausasema-popup p {
        font-size: 13px;
    }
    
    .legend {
        font-size: 12px;
        padding: 10px;
    }
    
    .latausasemat-filters {
        padding: 15px;
    }
}