/**
 * Truck Marker Styles
 * Bouncie-style three-part markers
 */

/* Container for the entire marker */
.truck-marker-container {
    pointer-events: auto;
    user-select: none;
}

.truck-marker-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* Emblem - Top part with vehicle make icon */
.truck-marker-emblem {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.truck-marker-container:hover .truck-marker-emblem {
    transform: scale(1.1);
}

/* Direction marker - Middle part with arrow */
.truck-marker-direction {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    margin-top: -4px;
    z-index: 1;
}

.truck-marker-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.truck-marker-arrow.animating {
    transition: none;
}

.truck-marker-arrow svg {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* Name label - Bottom part */
.truck-marker-label {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 75px;
}

.truck-marker-container:hover .truck-marker-label {
    background: rgba(51, 65, 85, 0.98);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Highlighted state (triggered by list hover or map hover) */
.truck-marker-container.highlighted {
    z-index: 9999 !important;
    filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.8));
}

.truck-marker-container.highlighted .truck-marker-emblem {
    transform: scale(1.15);
    border-color: rgba(88, 166, 255, 0.9);
}

.truck-marker-container.highlighted .truck-marker-label {
    background: rgba(88, 166, 255, 0.9);
    color: white;
    border-color: rgba(88, 166, 255, 1);
}

/* Status-specific colors for direction marker */
.truck-marker-direction.running {
    background-color: #22c55e;
}

.truck-marker-direction.parked {
    background-color: #6b7280;
}

.truck-marker-direction.dormant {
    background-color: #f97316;
}

.truck-marker-direction.out-of-service {
    background-color: #ef4444;
}

/* Animation for running trucks */
@keyframes pulse-running {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.truck-marker-container[data-running="true"] .truck-marker-direction {
    animation: pulse-running 2s infinite;
}

/* Cluster marker styles */
.truck-marker-cluster {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

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

/* Small cluster */
.truck-marker-cluster.small {
    width: 36px;
    height: 36px;
    font-size: 12px;
}

/* Large cluster */
.truck-marker-cluster.large {
    width: 48px;
    height: 48px;
    font-size: 16px;
}
