/* Map Page Styles */

/* Map Header */
.map-header {
    background-color: white;
    border-bottom: 2px solid var(--burgundy);
    padding: 2rem 0 1.5rem;
}

[data-bs-theme="dark"] .map-header {
    background-color: #232729;
}

.map-header h2 {
    color: var(--burgundy);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.map-header .lead {
    color: var(--text-light);
}

.bg-burgundy {
    background-color: var(--burgundy) !important;
}

/* Filters Section */
.filters-section {
    background-color: #f8f9fa;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .filters-section {
    background-color: #1a1d1f;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.filters-section .form-label {
    color: var(--burgundy);
    margin-bottom: 0.25rem;
}

.form-check-group {
    display: flex;
    gap: 1rem;
    padding-top: 0.25rem;
}

.form-check-inline {
    margin-right: 0;
}

.form-check-input:checked {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
}

/* Map Container */
#map-container {
    border: 3px solid var(--burgundy);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#main-map {
    height: 600px;
    width: 100%;
}

/* Custom Marker Styles */
.custom-marker {
    background: transparent;
    border: none;
}

/* Marker Cluster Styles */
.marker-cluster-custom {
    background: transparent;
    border: none;
}

.cluster-icon {
    width: 40px;
    height: 40px;
    background-color: var(--burgundy);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cluster-icon span {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Map Popup Styles */
.map-popup h6 {
    color: var(--burgundy);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.map-popup p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.map-popup .btn {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
}

.map-popup .btn:hover {
    background-color: #6b1a28;
    border-color: #6b1a28;
}

/* Dark mode popup styles */
[data-bs-theme="dark"] .leaflet-popup-content-wrapper {
    background-color: #232729;
    color: #e9ecef;
}

[data-bs-theme="dark"] .leaflet-popup-tip {
    background-color: #232729;
}

[data-bs-theme="dark"] .map-popup h6 {
    color: #e9ecef;
}

[data-bs-theme="dark"] .map-popup p {
    color: #e9ecef;
}

[data-bs-theme="dark"] .map-popup a {
    color: white;
}

/* Legend */
.map-legend {
    background-color: white;
    border: 2px solid var(--burgundy);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .map-legend {
    background-color: #232729;
}

.map-legend h6 {
    color: var(--burgundy);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.legend-cluster {
    width: 24px;
    height: 24px;
    background-color: var(--burgundy);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.legend-cluster::after {
    content: "3";
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* Loading Indicator */
#loading-indicator {
    margin-top: 4rem;
}

.spinner-border {
    color: var(--burgundy) !important;
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] #main-map {
    filter: brightness(0.95);
}

.map-popup a {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .map-header {
        padding: 1.5rem 0 1rem;
    }

    .map-header h2 {
        font-size: 1.5rem;
    }

    #main-map {
        height: 400px;
    }

    .filters-section {
        padding: 1rem 0;
    }

    .form-check-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .legend-items {
        flex-direction: column;
        gap: 0.75rem;
    }

    #entry-count {
        margin-top: 0.5rem;
        display: inline-block;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    #main-map {
        height: 500px;
    }
}

/* Rocque Polygon Styles */
.polygon-tooltip {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #881c2e;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .polygon-tooltip {
    background-color: rgba(35, 39, 41, 0.95);
    border-color: #e9ecef;
    color: #e9ecef;
}
