/**
 * Campingplatz Karte Plugin Styles
 * Version: 1.0.3
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.campingplatz-karte-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.campingplatz-map {
    position: relative;
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f9f9f9;
}

.campingplatz-map .leaflet-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* ==========================================================================
   Markers & Clustering
   ========================================================================== */

.camping-marker {
    background: transparent;
    border: none;
}

.camping-icon {
    width: 30px;
    height: 30px;
    background: #2c5530;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.camping-icon:hover {
    transform: scale(1.1);
    background: #1e3a23;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Marker Clusters */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
    cursor: pointer;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.marker-cluster-small {
    background-color: rgba(44, 85, 48, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(44, 85, 48, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(30, 58, 35, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(30, 58, 35, 0.8);
    width: 35px;
    height: 35px;
    margin: 2.5px;
    border-radius: 17.5px;
    font-size: 13px;
}

.marker-cluster-large {
    background-color: rgba(20, 40, 25, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(20, 40, 25, 0.8);
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 20px;
    font-size: 14px;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.campingplatz-filters {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filter-header h4 {
    margin: 0;
    color: #2c5530;
    font-size: 18px;
    font-weight: 600;
}

.filter-reset-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.filter-reset-btn:hover {
    background: #545b62;
}

.filter-row {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
    margin-bottom: 10px;
}

.filter-group:nth-child(2) {
    margin-left: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.campingplatz-filter {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.campingplatz-filter:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

/* City Filter Dropdown */
.city-filter-container {
    position: relative;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

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

.dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-content.show {
    display: block;
}

.dropdown-search-input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    background: #f8f9fa;
}

.dropdown-search-input:focus {
    outline: none;
    background: white;
}

.dropdown-options {
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.dropdown-option:hover {
    background: #f8f9fa;
}

.dropdown-option.selected {
    background: #2c5530;
    color: white;
}

.dropdown-option:last-child {
    border-bottom: none;
}

/* Amenities Checkboxes */
.amenities-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #2c5530;
}

/* Filter Actions */
.filter-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.filter-results-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.filter-results-count.updated {
    color: #2c5530;
    font-weight: 600;
    transform: scale(1.05);
}

/* ==========================================================================
   Popups
   ========================================================================== */

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.campsite-popup {
    min-width: 280px;
    max-width: 350px;
}

.campsite-popup h3 {
    margin: 0 0 10px 0;
    color: #2c5530;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.campsite-popup .info-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.campsite-popup .info-row strong {
    min-width: 80px;
    color: #333;
}

.campsite-popup .amenities {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.campsite-popup .amenities h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #2c5530;
    font-weight: 600;
}

.campsite-popup .amenity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.campsite-popup .amenity-tag {
    background: #e8f5e8;
    color: #2c5530;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.campingplatz-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .amenities-checkboxes {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .campsite-popup {
        min-width: 250px;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .campingplatz-filters {
        padding: 15px;
    }
    
    .amenities-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .campsite-popup {
        min-width: 220px;
        max-width: 250px;
    }
}