/* CSS for the UK interactive map */

/* Map container */
#uk-map-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#uk-map {
    width: 100%;
    height: 100%;
}

/* Map error message */
#map-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Company popup styling */
.company-popup {
    min-width: 200px;
    max-width: 300px;
}

.company-popup h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0d6efd;
    font-weight: 600;
}

.company-popup p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.company-popup .badge {
    padding: 4px 8px;
    border-radius: 4px;
}

/* Layout for the database section */
.database-explore {
    overflow: hidden;
}

.map-section {
    height: 600px; /* Increased by 50% */
    position: relative;
    display: flex;
    flex-direction: column;
}

.map-container-wrapper {
    flex-grow: 1;
    position: relative;
}

.map-text-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

/* Legend */
.map-legend {
    width: fit-content;
    margin: 10px auto;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 5px;
    z-index: 1000;
    font-size: 0.7rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #000; /* Ensure text is black */
}

.legend-title {
    font-size: 0.75rem;
    text-align: center;
    margin-bottom: 4px !important;
}

.legend-description {
    font-size: 0.65rem !important;
    margin-bottom: 4px !important;
    color: #000;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    color: #000;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .map-section {
        height: 300px;
        margin-bottom: 20px;
    }
    
    .map-text-section {
        text-align: center;
    }
}
