/* ============================================================
   VSTT Location Route — Company Map Styles
   Lightweight, mobile-first, GDPR-safe map display
============================================================ */

.clm-wrapper {
    --clm-accent: var(--wdt-color-primary, var(--awb-color5, #2563eb));
    --clm-accent-light: color-mix(in srgb, var(--clm-accent) 12%, transparent);
    --clm-accent-border: color-mix(in srgb, var(--clm-accent) 25%, transparent);

    font-family: inherit;
    position: relative;
    width: 100%;
}

.clm-map-container-outer {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.clm-map-canvas {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    z-index: 1;
}

/* --- Company Marker --- */
.clm-pin-company {
    width: 24px;
    height: 24px;
    background: #1d2327;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* --- User Location Marker --- */
.clm-pin-user {
    width: 14px;
    height: 14px;
    background: var(--clm-accent);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 var(--clm-accent-border);
    animation: clmPulse 2s infinite;
}

@keyframes clmPulse {
    0% { box-shadow: 0 0 0 0 var(--clm-accent-border); }
    70% { box-shadow: 0 0 0 12px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- Route Info Box (inside map card) --- */
.clm-info-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;

    width: 100%;
    padding: 12px 18px;

    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);

    font-family: inherit;
    font-size: 14px;
    color: #6b7280;
    letter-spacing: 0.01em;

    animation: clmFadeIn 0.3s ease;
}

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

.clm-info-box .clm-route-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    padding-right: 12px;
}

.clm-info-box .clm-route-text strong {
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
}

.clm-info-box .clm-route-sep {
    color: #d1d5db;
}

.clm-info-box .clm-route-km {
    color: #9ca3af;
    font-size: 13px;
}

/* --- Route Button (ghost pill) --- */
.clm-btn-google {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 6px 14px;

    background: transparent;
    color: var(--clm-accent);
    border: 1px solid var(--clm-accent-border);

    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;

    transition: all 0.2s ease;
}

.clm-btn-google svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.clm-btn-google:hover {
    background: var(--clm-accent-light);
    color: var(--clm-accent);
    border-color: var(--clm-accent-border);
}

.clm-btn-google:hover svg {
    opacity: 1;
    transform: translate(1px, -1px);
}

.clm-btn-google:focus-visible {
    outline: 2px solid var(--clm-accent);
    outline-offset: 2px;
}

/* --- Mobile --- */
@media (max-width: 640px) {
    .clm-info-box {
        padding: 10px 14px;
        gap: 8px;
    }

    .clm-info-box .clm-route-text strong {
        font-size: 14px;
    }

    .clm-btn-google {
        font-size: 12px;
        padding: 5px 10px;
        min-height: 30px;
    }
}

/* --- Hide Leaflet attribution (provided in site footer per ODbL) --- */
.leaflet-control-attribution {
    display: none !important;
}

/* --- Print --- */
@media print {
    .leaflet-control-zoom {
        display: none !important;
    }
}
