/* Cluster Marker Styles */
.cluster-marker-icon {
    transition: all 0.3s ease;
}

.cluster-marker-icon:hover .cluster-marker {
    transform: scale(1.1);
}

.cluster-popup .cluster-section {
    margin: 10px 0;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.cluster-popup .cluster-section:first-child {
    border-top: none;
    padding-top: 0;
}

.cluster-popup .cluster-section-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.cluster-popup .cluster-shipments {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cluster-popup .cluster-shipment-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.cluster-popup .cluster-shipment-item:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.cluster-popup .cluster-shipment-item.planned {
    background-color: #e3f2fd;
    border-color: #bbdefb;
}

.cluster-popup .cluster-shipment-item.planned:hover {
    background-color: #d1ecf1;
}

.cluster-popup .cluster-shipment-item.unplanned {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
}

.cluster-popup .cluster-shipment-item.unplanned:hover {
    background-color: #eeeeee;
}

.cluster-popup .shipment-ref {
    font-weight: bold;
    font-size: 12px;
    color: #333;
}

.cluster-popup .shipment-vehicle {
    font-size: 11px;
    font-weight: 600;
}

.cluster-popup .shipment-type {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.cluster-popup .btn-cluster-assign {
    background: #28a745;
    border: none;
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cluster-popup .btn-cluster-assign:hover {
    background: #218838;
}

.cluster-popup-wrapper .leaflet-popup-content {
    margin: 8px 12px;
    width: auto !important;
}

.cluster-popup .popup-header .cluster-title {
    font-weight: bold;
    color: #333;
}

/* Marker animation for clusters */
@keyframes cluster-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.cluster-marker-icon.mixed .cluster-marker {
    animation: cluster-pulse 2s infinite;
}

/* Time Window Indicators */
.time-indicator {
    position: absolute;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.9), -2px -2px 4px rgba(255,255,255,0.9), 2px -2px 4px rgba(255,255,255,0.9), -2px 2px 4px rgba(255,255,255,0.9);
    z-index: 10;
    line-height: 1;
}

.time-indicator.urgent {
    color: #e74c3c; /* Red color for time constraints */
}

.time-indicator.flexible {
    color: #2ecc71; /* Green color for flexible delivery dates */
}

.time-indicator.adr {
    color: #ff8c00; /* Orange color for ADR shipments */
}

.time-indicator-overlay {
    pointer-events: none;
    font-size: 16px !important;
    font-weight: 900 !important;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.9), -2px -2px 4px rgba(255,255,255,0.9), 2px -2px 4px rgba(255,255,255,0.9), -2px 2px 4px rgba(255,255,255,0.9) !important;
}

.time-indicator-overlay.urgent {
    color: #e74c3c !important;
}

.time-indicator-overlay.flexible {
    color: #2ecc71 !important;
}

.time-indicator-overlay.adr {
    color: #ff8c00 !important;
}

/* Pickup marker container styling */
.pickup-marker-container {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
