/* Mapbox Pins Frontend Styles */

.mapbox-pins-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Search Bar Styles - Enhanced Modern UI */
.mapbox-pins-search {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    width: 340px;
    max-width: calc(100vw - 20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mapbox-pins-search-input {
    width: 100%;
    padding: 16px 45px 16px 20px;
    font-size: 14px;
    border: 2px solid rgba(52, 152, 219, 0.15);
    border-radius: 30px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #2c3e50;
    position: relative;
}

.mapbox-pins-search-input:focus {
    box-shadow: 
        0 12px 40px rgba(52, 152, 219, 0.2),
        0 6px 20px rgba(52, 152, 219, 0.1),
        0 0 0 4px rgba(52, 152, 219, 0.08);
    transform: translateY(-2px) scale(1.02);
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.98);
}

.mapbox-pins-search-input:hover {
    transform: translateY(-1px);
    border-color: rgba(52, 152, 219, 0.3);
    box-shadow: 
        0 10px 35px rgba(0, 0, 0, 0.1),
        0 5px 18px rgba(0, 0, 0, 0.06);
}

.mapbox-pins-search-input::placeholder {
    color: rgba(44, 62, 80, 0.5);
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.mapbox-pins-search-input:focus::placeholder {
    opacity: 0.7;
}

.mapbox-pins-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: none;
}

.mapbox-pins-search-clear:hover {
    background: #f5f5f5;
    color: #333;
}

.mapbox-pins-search-clear.visible {
    display: block;
}

.mapbox-pins-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
    display: none;
}

.mapbox-pins-search-results.visible {
    display: block;
}

.mapbox-pins-search-result {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mapbox-pins-search-result:last-child {
    border-bottom: none;
}

.mapbox-pins-search-result:hover,
.mapbox-pins-search-result.selected {
    background-color: #f8f9fa;
}

.mapbox-pins-search-result-icon {
    width: 24px;
    height: 24px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.mapbox-pins-search-result-content {
    flex: 1;
    min-width: 0;
}

.mapbox-pins-search-result-title {
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapbox-pins-search-result-address {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapbox-pins-search-no-results {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Search Icon */
.mapbox-pins-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    pointer-events: none;
}

/* Info Button - Enhanced Modern UI */
.mapbox-pins-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
}

.mapbox-pins-info-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.9));
    backdrop-filter: blur(12px);
    border: 2px solid rgba(52, 152, 219, 0.15);
    border-radius: 50%;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    padding: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 20px;
    color: #2980b9;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    position: relative;
    overflow: hidden;
    font-weight: 700;
}

.mapbox-pins-info-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mapbox-pins-info-button:hover {
    box-shadow: 
        0 12px 40px rgba(52, 152, 219, 0.15),
        0 6px 20px rgba(52, 152, 219, 0.1);
    transform: translateY(-3px) scale(1.08);
    border-color: rgba(52, 152, 219, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    color: #2c3e50;
}

.mapbox-pins-info-button:hover::before {
    opacity: 1;
}

.mapbox-pins-info-button:active {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(52, 152, 219, 0.2),
        0 4px 12px rgba(52, 152, 219, 0.15);
}

.mapbox-pins-info-button:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 
        0 12px 40px rgba(52, 152, 219, 0.2),
        0 6px 20px rgba(52, 152, 219, 0.15),
        0 0 0 4px rgba(52, 152, 219, 0.1);
}

/* Popup Styles */
.mapbox-pin-popup {
    min-width: 200px;
    max-width: 300px;
}

.mapbox-pin-popup .pin-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.mapbox-pin-popup .pin-category-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.mapbox-pin-popup .pin-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.mapbox-pin-popup .pin-thumbnail {
    margin-bottom: 10px;
}

.mapbox-pin-popup .pin-excerpt {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.mapbox-pin-popup .pin-address {
    margin-bottom: 15px;
    color: #555;
    font-size: 13px;
}

.mapbox-pin-popup .pin-actions {
    text-align: center;
}

.mapbox-pin-popup .pin-view-details {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.mapbox-pin-popup .pin-view-details:hover {
    background: #005a87;
}

/* Hover popup styles - lightweight title-only popup */
.mapbox-pin-hover-popup .mapboxgl-popup-content {
    padding: 8px 12px !important;
    border-radius: 6px !important;
    background: rgba(0, 0, 0, 0.85) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    border: none !important;
    pointer-events: none !important;
    max-width: 200px !important;
    min-width: auto !important;
}

.mapbox-pin-hover-popup .mapboxgl-popup-tip {
    border-top-color: rgba(0, 0, 0, 0.85) !important;
}

.mapbox-pin-hover-title {
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Modal Styles */
.mapbox-pin-modal-overlay {
    animation: fadeIn 0.3s ease-in-out;
}

.mapbox-pin-modal {
    animation: slideIn 0.3s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mapbox-pin-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    padding-right: 30px; /* Space for close button */
}

.mapbox-pin-modal .modal-close {
    transition: opacity 0.2s;
}

.mapbox-pin-modal .modal-close:hover {
    opacity: 0.7;
}

.mapbox-pin-modal .pin-full-content {
    line-height: 1.6;
    color: #333;
}

.mapbox-pin-modal .pin-full-content h1,
.mapbox-pin-modal .pin-full-content h2,
.mapbox-pin-modal .pin-full-content h3,
.mapbox-pin-modal .pin-full-content h4,
.mapbox-pin-modal .pin-full-content h5,
.mapbox-pin-modal .pin-full-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.mapbox-pin-modal .pin-full-content p {
    margin-bottom: 1em;
}

.mapbox-pin-modal .pin-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.mapbox-pin-modal .pin-full-content blockquote {
    border-left: 4px solid #0073aa;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: #666;
}

.mapbox-pin-modal .pin-full-content ul,
.mapbox-pin-modal .pin-full-content ol {
    padding-left: 20px;
    margin-bottom: 1em;
}

.mapbox-pin-modal .pin-full-content li {
    margin-bottom: 0.5em;
}

/* YouTube embeds and other media */
.mapbox-pin-modal .pin-full-content iframe {
    max-width: 100%;
    border-radius: 4px;
    margin: 10px 0;
}

/* Responsive iframe container for videos */
.mapbox-pin-modal .pin-full-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.mapbox-pin-modal .pin-full-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}


/* Cool Animations & Effects */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(2deg);
    }
    70% {
        transform: scale(0.95) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Apply animations to elements */
.mapbox-pins-filter-item.active .mapbox-pins-filter-color-dot {
    animation: pulseGlow 2.5s infinite;
}

.mapbox-pins-filters {
    animation: slideInFromTop 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mapbox-pins-search {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.mapbox-pins-info {
    animation: bounceIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mapbox-pins-info-button:hover {
    animation: float 2s ease-in-out infinite;
}

/* Loading shimmer effect for filter counts */
.mapbox-pins-filter-count.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: transparent;
}

/* Enhanced focus states for accessibility */
.mapbox-pins-filter-item:focus-visible {
    outline: 3px solid rgba(52, 152, 219, 0.6);
    outline-offset: 2px;
    border-radius: 8px;
}

.mapbox-pins-search-input:focus-visible {
    outline: 3px solid rgba(52, 152, 219, 0.6);
    outline-offset: 4px;
}

/* Micro-interactions for better UX */
.mapbox-pins-filter-item:active {
    transform: translateX(2px) scale(0.98);
}

.mapbox-pins-search-input:active {
    transform: translateY(-1px) scale(1.01);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mapbox-pin-modal {
        max-width: 95% !important;
        max-height: 90% !important;
        margin: 20px;
    }
    
    .mapbox-pin-popup {
        min-width: 150px;
        max-width: 250px;
    }
    
    /* Mobile search adjustments */
    .mapbox-pins-search {
        width: 250px;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .mapbox-pins-search-input {
        padding: 10px 36px 10px 14px;
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .mapbox-pins-search-results {
        max-height: 200px;
    }
    
    .mapbox-pins-search-result {
        padding: 10px 12px;
    }
    
    .mapbox-pins-search-result-title {
        font-size: 14px;
    }
    
    .mapbox-pins-search-result-address {
        font-size: 11px;
    }
    
    .mapbox-pins-search-result-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    /* Mobile info button adjustments */
    .mapbox-pins-info {
        top: 10px;
        right: 10px;
    }
    
    .mapbox-pins-info-button {
        padding: 8px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .mapbox-pins-search {
        width: calc(100vw - 70px); /* Leave space for info button */
        left: 10px;
        transform: none;
    }
    
    .mapbox-pins-info {
        top: 10px;
        right: 10px;
    }
}

/* Custom cluster styles for better visibility */
.mapboxgl-popup-content {
    padding: 15px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.mapboxgl-popup-tip {
    border-top-color: #fff !important;
}

.mapboxgl-popup-close-button {
    right: 8px !important;
    top: 8px !important;
    font-size: 18px !important;
    color: #999 !important;
}

.mapboxgl-popup-close-button:hover {
    color: #333 !important;
}

/* Loading states */
.mapbox-pins-map[data-loading="true"] {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.mapbox-pins-map[data-loading="true"]::after {
    content: "Loading map...";
    color: #666;
    font-size: 14px;
}

/* ===========================================
   CATEGORY FILTERS
   =========================================== */

.mapbox-pins-filters {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    overflow: hidden;
    max-width: 320px;
    min-width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0) scale(1);
}

.mapbox-pins-filters:hover {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.16),
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.mapbox-pins-filters-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08), rgba(155, 89, 182, 0.05));
    border-bottom: 1px solid rgba(52, 152, 219, 0.12);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mapbox-pins-filters-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.6s ease;
}

.mapbox-pins-filters-header:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.12), rgba(155, 89, 182, 0.08));
    border-bottom-color: rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.mapbox-pins-filters-header:hover::before {
    left: 100%;
}

.mapbox-pins-filters-icon {
    margin-right: 8px;
    font-size: 16px;
}

.mapbox-pins-filters-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.mapbox-pins-filters-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
    padding: 2px;
}

.mapbox-pins-filters-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

.mapbox-pins-filters-toggle[aria-expanded="false"] {
    transform: rotate(0deg);
}

.mapbox-pins-filters-content {
    max-height: 500px; /* Default open state */
    overflow: hidden;
    opacity: 1; /* Default visible */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease;
}

/* Collapsed state */
.mapbox-pins-filters:not(.expanded) .mapbox-pins-filters-content,
.mapbox-pins-filters.collapsed .mapbox-pins-filters-content {
    max-height: 0;
    opacity: 0;
}

/* Explicitly expanded state (for consistency) */
.mapbox-pins-filters.expanded .mapbox-pins-filters-content {
    max-height: 500px;
    opacity: 1;
}

/* Color Dot Indicator */
.mapbox-pins-filter-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.mapbox-pins-filter-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mapbox-pins-filter-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.mapbox-pins-filter-item:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(155, 89, 182, 0.02));
    transform: translateX(4px);
    border-bottom-color: rgba(52, 152, 219, 0.15);
}

.mapbox-pins-filter-item:hover::before {
    left: 100%;
}

.mapbox-pins-filter-item:hover .mapbox-pins-filter-color-dot {
    transform: scale(1.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mapbox-pins-filter-item.active {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(155, 89, 182, 0.08));
    border-left: 4px solid #3498db;
    transform: translateX(0);
    box-shadow: inset 0 0 20px rgba(52, 152, 219, 0.1);
}

.mapbox-pins-filter-item.active .mapbox-pins-filter-color-dot {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
}

.mapbox-pins-filter-item:last-child {
    border-bottom: none;
}

.mapbox-pins-filter-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    z-index: 2;
    position: relative;
}

.mapbox-pins-filter-item:hover .mapbox-pins-filter-icon {
    transform: scale(1.1) rotate(5deg);
}

.mapbox-pins-filter-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    z-index: 2;
    position: relative;
    transition: color 0.3s ease;
}

.mapbox-pins-filter-item:hover .mapbox-pins-filter-name {
    color: #2c3e50;
}

.mapbox-pins-filter-item.active .mapbox-pins-filter-name {
    font-weight: 600;
    color: #1976d2;
}

.mapbox-pins-filter-count {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    color: #34495e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mapbox-pins-filter-item:hover .mapbox-pins-filter-count {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.mapbox-pins-filter-item.active .mapbox-pins-filter-count {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Mobile collapsed filters by default */
@media (max-width: 768px) {
    .mapbox-pins-filters.mobile-collapsed {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        min-width: auto;
    }
    
    /* On mobile, filters start collapsed */
    .mapbox-pins-filters.mobile-collapsed .mapbox-pins-filters-content {
        max-height: 0;
        opacity: 0;
    }
    
    /* Mobile filters toggle arrow should start pointing right (collapsed) */
    .mapbox-pins-filters.mobile-collapsed .mapbox-pins-filters-toggle[data-mobile-collapsed="true"] {
        transform: rotate(0deg);
    }
    
    /* When mobile filters are expanded via JS, show content */
    .mapbox-pins-filters.mobile-collapsed.expanded .mapbox-pins-filters-content {
        max-height: 500px;
        opacity: 1;
    }
    
    /* When mobile filters are expanded, rotate arrow */
    .mapbox-pins-filters.mobile-collapsed.expanded .mapbox-pins-filters-toggle {
        transform: rotate(180deg);
    }
    
    .mapbox-pins-search {
        top: 70px; /* Move search down to avoid overlap with collapsed filters */
        left: 10px;
        right: 10px;
        width: auto;
        margin-bottom: 60px; /* Make space for filters */
    }
    
    .mapbox-pins-info {
        top: 10px;
        right: 10px;
    }
}

/* When filters are shown, adjust search bar position */
.mapbox-pins-map .mapbox-pins-search {
    top: 80px; /* Move search below filters */
}

@media (max-width: 768px) {
    .mapbox-pins-map .mapbox-pins-search {
        top: 70px; /* Adjust for mobile */
    }
}

/* Info Modal Styles - Tabbed Interface */
.mapbox-info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.mapbox-info-modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 24px 64px rgba(0, 0, 0, 0.15),
        0 12px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    max-width: 90vw;
    max-height: 85vh;
    width: 800px;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.info-modal-header {
    padding: 24px 32px 16px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(155, 89, 182, 0.02));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-modal-close:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    transform: scale(1.1);
}

.info-tabs {
    display: flex;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    overflow-x: auto;
    scroll-behavior: smooth;
}

.info-tab-button {
    background: none;
    border: none;
    padding: 16px 20px;
    margin: 0;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.info-tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08), rgba(155, 89, 182, 0.04));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.info-tab-button:hover::before {
    opacity: 1;
}

.info-tab-button:hover {
    color: #3498db;
    transform: translateY(-2px);
}

.info-tab-button.active {
    color: #2c3e50;
    border-bottom-color: #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(155, 89, 182, 0.02));
}

.info-content {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.info-content::-webkit-scrollbar {
    width: 8px;
}

.info-content::-webkit-scrollbar-track {
    background: rgba(52, 152, 219, 0.05);
    border-radius: 10px;
}

.info-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.info-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
}

.info-tab-content {
    display: none;
}

.info-tab-content h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.1);
}

.info-tab-content p {
    color: #34495e;
    line-height: 1.6;
    margin: 0 0 16px 0;
    font-size: 15px;
}

.info-tab-content ul {
    color: #34495e;
    line-height: 1.6;
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.info-tab-content li {
    margin-bottom: 8px;
}

.info-tab-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.info-tab-content em {
    color: #7f8c8d;
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .mapbox-info-modal {
        max-width: 95vw;
        max-height: 90vh;
        margin: 20px;
        width: auto;
    }
    
    .info-modal-header {
        padding: 20px 24px 12px;
    }
    
    .info-modal-header h2 {
        font-size: 20px;
    }
    
    .info-tabs {
        padding: 0 24px;
    }
    
    .info-tab-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .info-content {
        padding: 24px;
        max-height: 55vh;
    }
    
    .info-tab-content p,
    .info-tab-content li {
        font-size: 14px;
    }
    
    .info-tab-content h4 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .mapbox-info-modal {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .info-modal-header {
        padding: 16px 20px 10px;
    }
    
    .info-modal-header h2 {
        font-size: 18px;
    }
    
    .info-tabs {
        padding: 0 20px;
    }
    
    .info-tab-button {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .info-content {
        padding: 20px;
        max-height: 70vh;
    }
}
