/* LAParanormal Explore Map Styles - Google Maps */

/* Container layout */
.explore-container {
    display: flex;
    height: 100%;
    min-height: 500px;
    position: relative;
}

/* Sidebar */
.explore-sidebar {
    width: 300px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1000;
}

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

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #666;
}

.sidebar-content {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter checkboxes */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
    color: #333;
}

.filter-checkbox:hover {
    background-color: #f5f5f5;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.filter-checkbox input[type="checkbox"]:checked + .filter-icon {
    opacity: 1;
}

.filter-checkbox input[type="checkbox"]:not(:checked) + .filter-icon {
    opacity: 0.4;
}

.filter-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.filter-icon.investigation-icon {
    background: linear-gradient(135deg, #4A3B8F, #6B5BA7);
    color: white;
}

.filter-icon.investigation-icon::before {
    content: '\1F50D';
}

.filter-icon.archive-icon {
    background: linear-gradient(135deg, #C9A961, #E0C078);
    color: white;
}

.filter-icon.archive-icon::before {
    content: '\1F4DC';
}

.filter-icon.category-icon {
    background: #666;
    color: white;
    font-size: 0.875rem;
}

/* Legend */
.legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.legend-marker {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
}

.legend-marker.team-marker {
    background: linear-gradient(135deg, #4A3B8F, #6B5BA7);
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.legend-marker.team-marker::before {
    content: '\1F50D';
    font-size: 0.625rem;
}

.legend-marker.archive-marker {
    background: #f0f0f0;
    border: 2px solid #ccc;
}

.legend-marker.approximate-marker {
    background: transparent;
    border: 2px dashed #e74c3c;
    width: 28px;
    height: 28px;
}

/* Mobile sidebar */
.sidebar-toggle-mobile {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-toggle-mobile:hover {
    background: #f5f5f5;
}

@media (max-width: 991.98px) {
    .explore-sidebar {
        position: absolute;
        left: -300px;
        top: 0;
        bottom: 0;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .explore-sidebar.open {
        left: 0;
    }
}

@media (min-width: 992px) {
    .sidebar-toggle-mobile {
        display: none;
    }
}

/* Map container */
.map-container {
    flex-grow: 1;
    position: relative;
    min-width: 0;
    min-height: 400px;
}

#exploreMap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #1A1A1A;
}

/* Loading overlay */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 999;
}

.map-loading p {
    margin: 0;
    color: #ccc;
}

/* Custom markers (AdvancedMarkerElement content) */
.custom-marker {
    cursor: pointer;
}

/* Investigation markers */
.investigation-marker {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.investigation-marker .team-logo-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4A3B8F;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.investigation-marker.default {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4A3B8F, #6B5BA7);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.investigation-marker .marker-icon {
    font-size: 1.25rem;
}

.investigation-marker .incident-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: white;
    font-size: 0.625rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Archive markers */
.archive-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.archive-marker .marker-emoji {
    font-size: 1rem;
}

.archive-marker.approximate {
    background: transparent !important;
    border-style: dashed;
    border-width: 3px;
    box-shadow: none;
}

/* Cluster markers */
.cluster-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
}

.cluster-small {
    background: linear-gradient(135deg, #4A3B8F, #6B5BA7);
    font-size: 0.875rem;
}

.cluster-medium {
    background: linear-gradient(135deg, #C9A961, #D4B86A);
    font-size: 1rem;
    width: 45px;
    height: 45px;
}

.cluster-large {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    font-size: 1.125rem;
    width: 50px;
    height: 50px;
}

/* Google Maps InfoWindow styles */
.gm-style-iw {
    max-width: 320px !important;
}

.gm-style-iw-d {
    overflow: auto !important;
    max-height: 400px !important;
}

.popup-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 280px;
}

.popup-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
    margin: -12px -12px 12px -12px;
    width: calc(100% + 24px);
}

.popup-body {
    padding: 0;
}

.popup-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.popup-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: #666;
}

.popup-team-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.popup-address {
    font-size: 0.8125rem;
    color: #888;
    margin: 0 0 0.5rem 0;
}

.popup-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.popup-category {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    color: white;
    white-space: nowrap;
}

.popup-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    color: white;
    margin-bottom: 0.5rem;
}

.popup-date {
    font-size: 0.8125rem;
    color: #888;
    margin: 0 0 0.25rem 0;
}

.popup-location {
    font-size: 0.8125rem;
    color: #666;
    margin: 0 0 0.25rem 0;
}

.popup-approximate {
    font-size: 0.75rem;
    color: #e74c3c;
    font-style: italic;
    margin: 0 0 0.5rem 0;
}

.popup-description {
    font-size: 0.8125rem;
    color: #555;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-link {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4A3B8F;
    text-decoration: none;
}

.popup-link:hover {
    color: #6B5BA7;
    text-decoration: underline;
}

/* Form controls in sidebar */
.explore-sidebar .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.explore-sidebar .form-control:focus {
    border-color: #4A3B8F;
    box-shadow: 0 0 0 3px rgba(74, 59, 143, 0.1);
}

/* Button styles */
.explore-sidebar .btn-outline-secondary {
    border-radius: 8px;
    font-size: 0.8125rem;
}
