/**
 * Petrochemicals Map Styling
 */

.petrochemicals-map-wrapper {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#petrochemicals-map {
    flex: 1;
    min-width: 300px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
}

/* Leaflet map customization */
.leaflet-container {
    background: #f0f0f0;
    border-radius: 8px;
}

.leaflet-control-zoom {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
    background: #f0f0f0;
}

/* Region labels */
.region-label-marker {
    background: transparent !important;
    border: none !important;
}

.region-label {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Popup styling */
.petrochemicals-popup {
    padding: 10px;
    font-size: 13px;
}

.petrochemicals-popup h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 15px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
}

.petrochemicals-popup p {
    margin: 5px 0;
    color: #555;
}

.leaflet-popup-content-wrapper {
    border-radius: 4px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Legend */
.petrochemicals-map-legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.petrochemicals-map-legend h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #555;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #999;
    flex-shrink: 0;
}

/* Info panel */
.petrochemicals-map-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    max-height: 600px;
    overflow-y: auto;
    display: none;
}

.petrochemicals-map-info.active {
    display: block;
}

.petrochemicals-map-info h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
}

.region-details {
    font-size: 13px;
    color: #555;
}

.region-details p {
    margin: 8px 0;
}

.countries-list {
    margin-top: 10px;
}

.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 12px;
    border-left: 3px solid #ddd;
}

.country-item.producer-consumer {
    background: rgba(0, 217, 255, 0.1);
    border-left-color: #00D9FF;
}

.country-item.consumer {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: #4A90E2;
}

.country-item.emerging-market {
    background: rgba(46, 204, 113, 0.1);
    border-left-color: #2ECC71;
}

.country-name {
    font-weight: 500;
    color: #333;
}

.country-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f0f0f0;
    color: #666;
}

.country-item.producer-consumer .country-status {
    background: #00D9FF;
    color: white;
}

.country-item.consumer .country-status {
    background: #4A90E2;
    color: white;
}

.country-item.emerging-market .country-status {
    background: #2ECC71;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .petrochemicals-map-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    #petrochemicals-map {
        min-height: 400px;
    }

    .petrochemicals-map-legend,
    .petrochemicals-map-info {
        min-width: auto;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .petrochemicals-map-wrapper {
        gap: 10px;
    }

    #petrochemicals-map {
        min-height: 300px;
    }

    .petrochemicals-map-legend,
    .petrochemicals-map-info {
        padding: 10px;
        font-size: 12px;
    }

    .legend-item,
    .country-item {
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .petrochemicals-map-wrapper {
        page-break-inside: avoid;
    }

    #petrochemicals-map {
        border: 1px solid #000;
    }
}
