/* BGS Regional Map Styles */

.bgs-map-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.bgs-map-wrapper {
    width: 100%;
    position: relative;
}

.bgs-interactive-map {
    width: 100%;
    height: auto;
    display: block;
}

/* Region Styling */
.region-area {
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-path {
    fill: #8BC34A; /* Green base color */
    stroke: #ffffff;
    stroke-width: 1;
    transition: all 0.3s ease;
}

.region-area:hover .region-path {
    fill: #7CB342; /* Darker green on hover */
    stroke: #4CAF50;
    stroke-width: 2;
}

.region-area.active .region-path {
    fill: #558B2F; /* Active state */
}

.region-label {
    fill: #ffffff;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    text-anchor: middle;
    font-family: Arial, sans-serif;
}

/* Popup Modal */
.region-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.popup-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.popup-close:hover {
    color: #000;
}

#popup-title {
    margin: 0 0 25px 0;
    font-size: 28px;
    color: #333;
    font-weight: 700;
}

/* Leaders Grid */
.leaders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.leader-card {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.2s;
}

.leader-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.leader-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
    border: 4px solid #8BC34A;
}

.leader-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* View Region Button */
.view-region-btn {
    display: inline-block;
    background: #8BC34A;
    color: #ffffff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 16px;
}

.view-region-btn:hover {
    background: #7CB342;
    transform: translateX(5px);
    text-decoration: none;
    color: #ffffff;
}

/* Loading State */
.popup-content.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #8BC34A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .popup-content {
        padding: 20px;
        width: 95%;
    }
    
    #popup-title {
        font-size: 22px;
    }
    
    .leaders-grid {
        grid-template-columns: 1fr;
    }
    
    .leader-photo {
        width: 100px;
        height: 100px;
    }
}

/* No Leaders Message */
.no-leaders {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}
