/* ═══════════════════════════════════════
   VEYA iMAP™ 3D Navigation Styles v2
   ═══════════════════════════════════════ */

/* 3D Map Container */
.veya-3d-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #000;
}

/* ── Car Marker ── */
.veya-3d-car {
    width: 40px;
    height: 40px;
    position: relative;
}
.car-body {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.car-arrow {
    width: 32px;
    height: 32px;
    background: linear-gradient(180deg, #E8654A, #d44a2e);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(232, 101, 74, 0.5);
    border: 2px solid rgba(255,255,255,0.8);
}
.car-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(232, 101, 74, 0.2);
    animation: carPulse 2s infinite;
    pointer-events: none;
}
@keyframes carPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* ── Controls Overlay ── */
.veya-3d-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

/* ── Top Bar ── */
.v3d-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, transparent 100%);
    pointer-events: auto;
}
.v3d-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    direction: ltr;
    letter-spacing: 1px;
    flex: 1;
}

/* ── Speed Info (top-right) ── */
.v3d-speed-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.v3d-speed-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}
.v3d-speed-val {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'DM Sans', sans-serif;
    line-height: 1;
}
.v3d-speed-unit {
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    font-family: 'DM Sans', sans-serif;
}

/* ── Speed Limit Sign ── */
.v3d-speed-limit-sign {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e53e3e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}
.v3d-limit-val {
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: 'DM Sans', sans-serif;
}
.v3d-speed-limit-sign.v3d-overspeeding {
    border-color: #ff0000;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.5);
    animation: overspeedPulse 1s infinite;
}
@keyframes overspeedPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 0, 0, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.8); }
}

/* ── Bottom Bar ── */
.v3d-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px 16px;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: auto;
}

/* ── Next Step Card ── */
.v3d-next-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}
.v3d-step-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.v3d-step-text {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}
.v3d-step-dist {
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 8px;
}

/* ── POI Filter Chips ── */
.v3d-poi-filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.v3d-poi-filters::-webkit-scrollbar {
    display: none;
}
.v3d-poi-chip {
    padding: 5px 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.v3d-poi-chip.active {
    background: rgba(232, 101, 74, 0.25);
    border-color: rgba(232, 101, 74, 0.5);
    color: #fff;
}
.v3d-poi-chip:hover {
    background: rgba(255,255,255,0.2);
}

/* ── Control Buttons ── */
.v3d-controls-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.v3d-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    pointer-events: auto;
}
.v3d-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}
.v3d-play {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #E8654A, #F5B041);
    font-size: 1.3rem;
    box-shadow: 0 4px 16px rgba(232, 101, 74, 0.4);
}
.v3d-play:hover {
    background: linear-gradient(135deg, #d44a2e, #e6a030);
    box-shadow: 0 6px 24px rgba(232, 101, 74, 0.6);
}
.v3d-exit {
    background: rgba(239, 68, 68, 0.3);
    font-size: 0.9rem;
}
.v3d-exit:hover {
    background: rgba(239, 68, 68, 0.6);
}
.v3d-layer-btn {
    background: rgba(59, 130, 246, 0.3);
}
.v3d-layer-btn:hover {
    background: rgba(59, 130, 246, 0.5);
}
.v3d-voice-btn {
    background: rgba(34, 197, 94, 0.3);
}
.v3d-voice-btn:hover {
    background: rgba(34, 197, 94, 0.5);
}

/* ── POI Markers ── */
.v3d-poi-marker {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}
.v3d-poi-marker:hover {
    transform: scale(1.3);
}
.v3d-poi-popup {
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: 'DM Sans', sans-serif;
    text-align: center;
}
.v3d-poi-popup b {
    display: block;
    margin-bottom: 2px;
}

/* MapLibre overrides */
.maplibregl-ctrl-attrib {
    font-size: 0.6rem !important;
    background: rgba(0,0,0,0.3) !important;
    color: rgba(255,255,255,0.5) !important;
}
.maplibregl-ctrl-attrib a {
    color: rgba(255,255,255,0.6) !important;
}
.maplibregl-popup-content {
    background: rgba(20,20,30,0.9) !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
    backdrop-filter: blur(8px);
}
.maplibregl-popup-tip {
    border-top-color: rgba(20,20,30,0.9) !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .v3d-speed-val { font-size: 1.4rem; }
    .v3d-speed-main { padding: 6px 12px; }
    .v3d-speed-limit-sign { width: 36px; height: 36px; }
    .v3d-limit-val { font-size: 0.75rem; }
    .v3d-next-step { padding: 10px 14px; }
    .v3d-step-text { font-size: 0.82rem; }
    .v3d-btn { width: 38px; height: 38px; font-size: 0.95rem; }
    .v3d-play { width: 48px; height: 48px; }
    .v3d-poi-chip { font-size: 0.65rem; padding: 4px 8px; }
    .v3d-poi-marker { width: 24px; height: 24px; font-size: 12px; }
}
