/**
 * Vibor Listings CSS
 * 
 * Styles for the map listings and filter components.
 */

/* ==========================================================================
   Main Layout
   ========================================================================== */

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: #f8f9fa;
}

/* Search header - now minimized as we moved elements to sidebar */
.search-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    z-index: 10;
    display: none; /* Hide the header for now as all controls are in sidebar */
}

.search-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-box {
    margin-bottom: 25px;
}

.search-box h3,
.radius-filter h3,
.feature-filters h3,
.wildness-filter h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #333;
}

.search-box form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-box input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-buttons {
    display: flex;
    gap: 10px;
}

.search-button,
.clear-search-button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.search-button {
    width: 100%;
    background-color: #4CAF50; /* Green background */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #3e8e41; /* Darker green */
}

.search-button svg {
    margin-right: 5px;
}

.clear-search-button {
    background-color: #f0f0f0;
    color: #666;
}

.clear-search-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex: 1;
    height: calc(100vh - 32px);
    overflow: hidden;
}

/* Map Section */
.map-section {
    flex: 1;
    height: 100%;
    position: relative;
}

.main-map {
    height: 100%;
    position: relative;
}

#map-canvas {
    width: 100%;
    height: 100%;
    min-height: 500px;
    z-index: 1;
}

/* Filters Sidebar */
.filters-sidebar {
    width: 300px;
    min-width: 300px;
    background-color: #f5ffef;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #e0e0e0;
    height: 100%;
}

.filters-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

#vibor-filter-results-count {
    background-color: #4CAF50; /* Green background */
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Search Box in Sidebar */
.search-box {
    margin-bottom: 25px;
}

.search-box h3,
.radius-filter h3,
.feature-filters h3,
.wildness-filter h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #333;
}

.search-box form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-box input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-button {
    width: 100%;
    background-color: #4CAF50; /* Green background */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #3e8e41; /* Darker green */
}

.search-button svg {
    margin-right: 5px;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.radius-filter {
    margin-bottom: 25px;
}

.radius-filter label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

/* Feature Filters */
.feature-filters {
    margin-bottom: 25px;
}

.checkbox-filter {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.checkbox-filter input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: #4CAF50; /* Green checkboxes */
}

.checkbox-filter label {
    cursor: pointer;
    font-size: 14px;
}

/* Wildness Rating Filter */
.wildness-filter {
    margin-bottom: 25px;
}

.rating-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.rating-options input[type="radio"] {
    display: none;
}

.rating-options label {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #666;
}

.rating-options label .star {
    color: #FF8C00; /* Orange color for stars */
}

.rating-options input[type="radio"]:checked + label {
    background-color: #FF8C00; /* Orange background when selected */
    color: white;
}

/* Active Filters */
.active-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border-left: 3px solid #4CAF50; /* Green border */
}

.active-filters .filter-tag {
    background-color: #f0f0f0 !important;
    border-radius: 16px !important;
    padding: 4px 12px !important;
    font-size: 0.875rem !important;
    color: #666 !important;
    display: inline-block !important;
    white-space: nowrap !important;
    margin: 2px !important;
}

/* Specific fix for map template active filters */
.filters-sidebar .active-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: flex-start !important;
}

.filters-sidebar .active-filters .filter-tag {
    background-color: #e8f5e8 !important;
    border: 1px solid #4CAF50 !important;
    border-radius: 16px !important;
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
    color: #2e7d32 !important;
    display: inline-block !important;
    white-space: nowrap !important;
    margin: 2px !important;
    flex-shrink: 0 !important;
    min-width: fit-content !important;
}

/* Additional specific targeting for map template */
.map-listings-template .active-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.map-listings-template .active-filters .filter-tag {
    display: inline-block !important;
    white-space: nowrap !important;
    margin: 2px !important;
    flex-shrink: 0 !important;
}

.active-filter-tag {
    display: inline-block;
    background-color: #f0f0f0;
    border-radius: 20px;
    padding: 4px 10px;
    margin: 0 5px 5px 0;
    font-size: 12px;
    color: #666;
}

.active-filter-tag .remove-filter {
    margin-left: 5px;
    cursor: pointer;
    color: #FF8C00; /* Orange for the remove icon */
}

/* Filter Actions */
.filter-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.apply-filters-button,
.reset-filters-button {
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.apply-filters-button {
    background-color: #4CAF50; /* Green background */
    color: white;
    flex: 2;
    transition: background-color 0.3s;
}

.apply-filters-button:hover {
    background-color: #3e8e41; /* Darker green */
}

.reset-filters-button {
    background-color: #FF8C00; /* Orange background */
    color: white;
    flex: 1;
    transition: background-color 0.3s;
}

.reset-filters-button:hover {
    background-color: #e07b00; /* Darker orange */
}

/* Listings Sidebar */
.listings-sidebar {
    width: 350px;
    min-width: 350px;
    background-color: white;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    height: 100%;
}

.listings-grid {
    padding: 20px;
}

/* Listing Cards - Redesigned based on the image */
.listing-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.listing-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-title {
    position: absolute;
    top:20px;
    left: 0px;
    padding: 4px;
    margin: 0;
    background: #005230;
    color: #fff;
    font-size: 0.9em;
    z-index: 2;
}

.listing-content {
    padding: 20px;
}

.wildness-rating-section,
.features-section {
    margin-bottom: 20px;
    background: #f8f8f8;
    border-radius: 4px;
    overflow: hidden;
}

.wildness-rating-section h4,
.features-section h4 {
    color: #fff;
    text-align: center;
    padding: 10px;
    margin: 0;
    width: 100%;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wildness-rating-section h4 {
    background-color: #e17113;
}

.features-section h4 {
    background-color: #008011;
}

.map-card-wilderness-rating,
.map-card-features {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin: 10px 0;
    list-style: none;
}

.map-card-wilderness-rating li,
.map-card-features li {
    flex: 1;
    text-align: center;
    padding: 0 5px;
}

.map-card-wilderness-rating li img,
.map-card-features li img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Ensure consistent image sizes */
.map-card-wilderness-rating li img {
    width: 24px;
}

.map-card-features li img {
    width: 32px;
}

.view-details-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.view-details-button:hover {
    background-color: #45a049;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .listing-image {
        height: 160px;
    }

    .listing-content {
        padding: 15px;
    }

    .map-card-wilderness-rating img,
    .map-card-features img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .listing-image {
        height: 140px;
    }

    .listing-title {
        font-size: 1em;
    }

    .map-card-wilderness-rating,
    .map-card-features {
        gap: 8px;
    }
}

/* Location marker */
.listing-location-marker {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #333;
    font-size: 12px;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-location-marker svg {
    width: 12px;
    height: 12px;
    margin-right: 5px;
    fill: #4CAF50; /* Green color for the location icon */
}

.listing-location {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.listing-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Wildness rating - styled like in the image */
.wildness-rating-container {
    background-color: #FF8C00; /* Orange background */
    color: white;
    text-align: center;
    padding: 8px 0;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.wildness-rating {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    background-color: #f8f8f8;
}

.wildness-rating .flame {
    color: #FF8C00;
    margin: 0 2px;
    font-size: 18px;
}

.wildness-rating .flame.filled {
    opacity: 1;
}

.wildness-rating .flame.empty {
    opacity: 0.3;
}

/* Suitable for features - styled like in the image */
.suitable-for-container {
    background-color: #4CAF50; /* Green background */
    color: white;
    text-align: center;
    padding: 8px 0;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.listing-features {
    display: flex;
    justify-content: center;
    background-color: #f8f8f8;
    padding: 10px 0;
}

.feature-icon {
    width: 30px;
    height: 30px;
    margin: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #4CAF50; /* Green color for the icons */
    font-size: 18px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.feature-icon:hover {
    opacity: 1;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-top: auto;
}

.listing-distance {
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.listing-button {
    display: inline-block;
    background-color: #4CAF50; /* Green button */
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

.listing-button:hover {
    background-color: #3e8e41; /* Darker green on hover */
    color: white;
}

.no-listings-message {
    padding: 30px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.no-listings-message p {
    margin: 0;
    font-size: 16px;
}

/* Map Center Marker */
.center-marker {
    background: transparent;
    border: none;
}

.center-marker .pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-color: #e17113;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(168, 53, 0, 0.4);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(168, 101, 0, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(168, 95, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(168, 81, 0, 0);
    }
}

/* Search Area Button */
.centered-search-button-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.search-area-center-button {
    background-color: #4CAF50; /* Green background */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.search-area-center-button:hover {
    background-color: #3e8e41; /* Darker green */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.search-area-center-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Map Popups */
.marker-popup {
    padding: 5px 0;
}

.marker-popup h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.marker-popup img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 0 10px 0;
    border-radius: 4px;
}

.marker-popup p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

.view-listing-button {
    display: block;
    background-color: #4CAF50; /* Green button */
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    width: calc(100% - 20px);
    margin: 10px 10px 5px;
}

.view-listing-button:hover {
    background-color: #3e8e41; /* Darker green on hover */
    color: white;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 220px !important;
}

.leaflet-popup-tip {
    background-color: white;
}

/* Media Queries */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }
    
    .map-section {
        height: 500px;
    }
    
    .filters-sidebar,
    .listings-sidebar {
        width: 100%;
        height: auto;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .apply-filters-button,
    .reset-filters-button {
        width: 100%;
    }
    
    .map-section {
        height: 400px;
    }
}

/* ==========================================================================
   Map Container Styles
   ========================================================================== */

.vibor-map-listings-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.vibor-map-container-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#vibor-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.vibor-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.vibor-map-overlay.loading {
    display: flex;
}

.vibor-map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vibor-map-controls button {
    background-color: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.vibor-map-controls button:hover {
    background-color: #f8f8f8;
}

.vibor-map-controls button.vibor-active {
    background-color: #f0f0f0;
}

.vibor-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.vibor-label {
    display: none;
}

/* ==========================================================================
   Content Container Styles
   ========================================================================== */

.vibor-content-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.vibor-sidebar {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    margin-bottom: 2rem;
}

.vibor-results-container {
    flex: 3;
    min-width: 0;
}

.vibor-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.vibor-results-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.vibor-view-controls {
    display: flex;
    gap: 10px;
}

.vibor-view-controls button {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.vibor-view-controls button.vibor-view-active {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.vibor-results-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Filter Form Styles
   ========================================================================== */

.vibor-filter-form-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vibor-filter-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.vibor-filter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vibor-form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vibor-form-row label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #444;
}

.vibor-form-row input[type="text"],
.vibor-form-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
}

.vibor-radius-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vibor-radius-slider {
    flex: 1;
}

#vibor-radius-value {
    min-width: 50px;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.vibor-autocomplete {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 100;
    display: none;
}

.vibor-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vibor-autocomplete-item:hover {
    background-color: #f5f5f5;
}

.vibor-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.vibor-submit-btn,
.vibor-reset-btn {
    padding: 10px 15px;
    border-radius: 4px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.vibor-submit-btn {
    background-color: #0066cc;
    color: white;
    flex: 1;
}

.vibor-submit-btn:hover {
    background-color: #0055aa;
}

.vibor-reset-btn {
    background-color: #f0f0f0;
    color: #333;
}

.vibor-reset-btn:hover {
    background-color: #e0e0e0;
}

/* Loading state for form */
.vibor-filter-form.loading .vibor-submit-btn {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.vibor-filter-form.loading .vibor-submit-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Grid Listings Styles
   ========================================================================== */

.vibor-listings-grid {
    width: 100%;
}

.vibor-no-results {
    text-align: center;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.vibor-grid-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.vibor-grid-item {
    transition: transform 0.2s;
}

.vibor-grid-item:hover {
    transform: translateY(-5px);
}

.vibor-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vibor-card-image {
    position: relative;
    height: 0;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
}

.vibor-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vibor-card:hover .vibor-card-image img {
    transform: scale(1.05);
}

.vibor-members-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff6b00;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 20px;
    z-index: 2;
}

.vibor-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vibor-card-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.vibor-card-title a {
    color: #333;
    text-decoration: none;
}

.vibor-card-title a:hover {
    color: #0066cc;
}

.vibor-card-address {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.vibor-card-distance {
    color: #0066cc;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.vibor-card-excerpt {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.vibor-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
}

.vibor-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vibor-meta-label {
    font-size: 0.8rem;
    color: #666;
}

.vibor-rating {
    color: #ffb900;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.vibor-card-link {
    display: inline-block;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    margin-top: auto;
}

.vibor-card-link:hover {
    color: #004c99;
    text-decoration: underline;
}

/* ==========================================================================
   Pagination Styles
   ========================================================================== */

.vibor-listings-pagination {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.vibor-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.vibor-pagination button {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.vibor-pagination button:hover:not(.vibor-pagination-disabled) {
    background-color: #f9f9f9;
    border-color: #ccc;
}

.vibor-pagination button.vibor-pagination-active {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

.vibor-pagination button.vibor-pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vibor-page-prev,
.vibor-page-next {
    font-weight: 500;
}

/* ==========================================================================
   Map Popup Styles
   ========================================================================== */

.vibor-marker-popup {
    max-width: 280px;
}

.vibor-popup-image {
    margin: -13px -13px 10px -13px;
}

.vibor-popup-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.vibor-popup-content h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1rem;
}

.vibor-popup-content p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #555;
}

.vibor-popup-link {
    display: inline-block;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 8px;
}

.vibor-popup-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Loading Spinner Styles
   ========================================================================== */

.vibor-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.vibor-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 102, 204, 0.2);
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.vibor-loading-indicator p {
    color: #666;
    font-size: 0.9rem;
}

/* ==========================================================================
   Current Location Marker Styles
   ========================================================================== */

.vibor-current-location-marker {
    position: relative;
}

.vibor-location-pulse {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e17113;
    box-shadow: 0 0 0 rgba(204, 122, 0, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 122, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(204, 133, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(204, 122, 0, 0);
    }
}

.vibor-error-message {
    display: flex;
    align-items: center;
    background-color: #fff5f5;
    color: #e53e3e;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #e53e3e;
    margin: 1rem 0;
}

.vibor-error-icon {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e53e3e;
    color: white;
    border-radius: 50%;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Large Screens */
@media (min-width: 1200px) {
    .vibor-map-container-wrapper {
        height: 500px;
    }
}

/* Medium Screens */
@media (max-width: 991px) {
    .vibor-grid-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Screens */
@media (max-width: 767px) {
    .vibor-content-container {
        flex-direction: column;
    }
    
    .vibor-sidebar {
        max-width: 100%;
        width: 100%;
        order: 2; /* Move sidebar below results on mobile */
    }
    
    .vibor-results-container {
        order: 1; /* Move results above sidebar on mobile */
    }
    
    .vibor-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .vibor-map-container-wrapper {
        height: 350px;
    }
    
    /* Show sidebar toggle on mobile */
    .vibor-toggle-filters .vibor-label {
        display: inline-block;
        margin-left: 5px;
    }
    
    /* Make sidebar collapsible on mobile */
    .vibor-sidebar {
        display: none;
    }
    
    .vibor-sidebar.vibor-sidebar-open {
        display: block;
    }
}

/* Extra Small Screens */
@media (max-width: 575px) {
    .vibor-grid-items {
        grid-template-columns: 1fr;
    }
    
    .vibor-pagination button:not(.vibor-page-prev):not(.vibor-page-next):not(.vibor-pagination-active) {
        display: none;
    }
}

/* List View Styles */
.vibor-listings-grid.vibor-view-list .vibor-grid-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vibor-listings-grid.vibor-view-list .vibor-card {
    flex-direction: row;
}

.vibor-listings-grid.vibor-view-list .vibor-card-image {
    width: 30%;
    height: auto;
    padding-bottom: 0;
}

.vibor-listings-grid.vibor-view-list .vibor-card-content {
    width: 70%;
}

@media (max-width: 767px) {
    .vibor-listings-grid.vibor-view-list .vibor-card {
        flex-direction: column;
    }
    
    .vibor-listings-grid.vibor-view-list .vibor-card-image {
        width: 100%;
        padding-bottom: 66.67%;
    }
    
    .vibor-listings-grid.vibor-view-list .vibor-card-content {
        width: 100%;
    }
}

/* Extended filter options */
.vibor-extended-filters-toggle {
    margin: 15px 0;
    text-align: center;
}

.vibor-toggle-btn {
    background: none;
    border: none;
    color: #2271b1;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
}

.vibor-toggle-btn:hover {
    text-decoration: underline;
    background-color: #f0f0f0;
}

.vibor-toggle-icon {
    display: inline-block;
    margin-left: 5px;
    font-weight: bold;
    font-size: 16px;
}

.vibor-extended-filters {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.vibor-extended-filters h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.vibor-form-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vibor-checkbox-row {
    display: flex;
    align-items: center;
    flex-basis: 100%;
}

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

.vibor-checkbox-row input[type="checkbox"] {
    margin-right: 8px;
}

/* Feature icons in listings */
.vibor-card-features {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.vibor-feature-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #f0f7f0;
    border-radius: 50%;
    border: 1px solid #ddd;
    font-size: 14px;
}

.vibor-feature-dogs {
    background-color: #f0f7f0;
}

.vibor-feature-campervan {
    background-color: #f0f0f7;
}

.vibor-feature-hammock {
    background-color: #f7f0f0;
}

/* Media queries for better mobile display */
@media (min-width: 768px) {
    .vibor-checkbox-row {
        flex-basis: calc(33.33% - 10px);
    }
}

@media (max-width: 767px) {
    .vibor-form-checkboxes {
        flex-direction: column;
    }
}

/* Map Controls - Center marker positioning is handled by iconAnchor in JS */

.search-area-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: white;
    border: 2px solid rgba(38, 166, 154, 0.8);
    color: rgba(38, 166, 154, 1);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none;
    transition: all 0.2s ease;
}

.search-area-button:hover {
    background-color: rgba(38, 166, 154, 0.1);
}

.search-area-button.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Search Controls */
.search-controls {
    padding: var(--spacing-lg);
    background: var(--neutral-100);
    border-bottom: 1px solid var(--neutral-300);
}

.search-box {
    margin-bottom: var(--spacing-md);
}

.search-box form {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--neutral-300);
    border-radius: 4px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(38, 166, 154, 0.1);
}

.search-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background: var(--primary-dark);
}

.search-button svg {
    width: 16px;
    height: 16px;
}

/* Radius Slider */
.radius-filter {
    flex: 1;
}

.radius-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--neutral-600);
}

/* Category Filter */
.category-filter {
    flex: 1;
}

.category-filter select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--neutral-300);
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.category-filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(38, 166, 154, 0.1);
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.filter-tag {
    background: var(--neutral-200);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 16px;
    font-size: 0.875rem;
    color: var(--neutral-700);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.filter-tag button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    color: var(--neutral-500);
}

.filter-tag button:hover {
    color: var(--neutral-700);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-controls {
        padding: var(--spacing-md);
    }

    .filter-controls {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .radius-filter,
    .category-filter {
        width: 100%;
    }
}

/* Range Slider Styles */
.range-slider {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    appearance: none;
    background: #e0e0e0;
    outline: none;
    margin: 10px 0;
    accent-color: #4CAF50; /* Green slider */
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #008011;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    background: #005230;
}

.range-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #008011;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.range-slider::-moz-range-thumb:hover {
    background: #005230;
}

.range-slider::-moz-range-track {
    background: #ddd;
    border-radius: 2px;
}

/* Improved Marker Styles */
.leaflet-marker-icon {
    transition: transform 0.2s;
}

.leaflet-marker-icon:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

/* Improved Map Popup Styles */
.leaflet-popup {
    max-width: 300px;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.map-popup {
    padding: 5px;
}

.map-popup h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.popup-image {
    margin: -5px -5px 10px -5px;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.popup-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.map-popup p {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

.map-popup .excerpt {
    font-size: 12px;
    color: #666;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.wildness-rating {
    margin: 5px 0;
    color: #ffb800;
    font-size: 14px;
}

.features {
    color: #666;
    font-size: 11px;
}

.popup-link {
    text-align: right;
    margin-top: 8px;
}

.popup-link a {
    display: inline-block;
    background: #0078a8;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.2s;
}

.popup-link a:hover {
    background: #00698e;
    text-decoration: none;
}

/* Make markers more visible by adjusting z-index for opened popups */
.leaflet-popup-pane {
    z-index: 700;
}

.leaflet-marker-pane {
    z-index: 600;
}

/* Remove manual marker positioning - let Leaflet handle it with proper iconAnchor */

/* Remove member marker styles */

/* Loading Indicator */
.listings-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.listings-loading .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0078a8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.listings-loading p {
    color: #333;
    font-weight: 500;
    margin-top: 10px;
}

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

/* Map Circle Styling */
.leaflet-interactive {
    pointer-events: auto !important;
}

/* Custom Leaflet control overrides */
.leaflet-control-zoom a {
    background-color: white !important;
    color: #333 !important;
    border-color: #ddd !important;
}

.leaflet-control-zoom a:hover {
    background-color: #f5f5f5 !important;
    color: #4CAF50 !important;
}

.leaflet-control-locate a {
    background-color: white !important;
    color: #333 !important;
    border-color: #ddd !important;
}

.leaflet-control-locate a:hover {
    background-color: #f5f5f5 !important;
    color: #4CAF50 !important;
}

.leaflet-control-search .search-button {
    background-color: white !important; 
    color: #333 !important;
}

.leaflet-control-search .search-button:hover {
    background-color: #f5f5f5 !important;
    color: #4CAF50 !important;
}

/* Highlighted markers for search results */
.marker-highlight {
    border: 3px solid #FF8C00 !important; /* Orange border */
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5) !important;
}

/* Highlighted listing card when corresponding marker is clicked */
.highlighted-card {
    box-shadow: 0 0 0 2px #FF8C00, 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    position: relative;
    z-index: 2;
    animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 2px #FF8C00, 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    100% {
        box-shadow: 0 0 0 2px #FF8C00, 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.filter-images {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin: 10px 0;
    list-style: none;
}

.filter-images li {
    flex: 1;
    text-align: center;
    padding: 0 5px;
}

.filter-images img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.filter-images img:hover {
    transform: scale(1.1);
}

.filter-images img.active {
    opacity: 1;
}

/* Hide the actual input elements */
.hidden-input {
    display: none;
}

/* Specific sizes for each type of filter image */
.map-card-wilderness-rating img {
    width: 24px;
}

.map-card-features img {
    width: 32px;
}

/* Style the section headers */
.feature-filters h4,
.wildness-filter h4 {
    color: #fff;
    text-align: center;
    padding: 10px;
    margin: 0;
    width: 100%;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-filters h4 {
    background-color: #008011;
}

.wildness-filter h4 {
    background-color: #e17113;
} 