/* =============================================
   DELIVEROUTE — style.css v5
   2050 Tech-Vibe Dark Dashboard Styles
   ============================================= */

/* === DASHBOARD CONTAINER === */
.dashboard-container {
    background: rgba(13, 21, 38, 0.7);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255,255,255,0.04) inset;
}

/* === LEFT PANEL (FORM) === */
.left-panel {
    background: rgba(10, 15, 30, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* === RIGHT PANEL (MAP) === */
.right-panel {
    background: rgba(8, 13, 26, 0.9);
    border-radius: 0 1rem 1rem 0;
    box-shadow: inset 0 0 60px rgba(6, 182, 212, 0.04),
                inset 0 0 1px rgba(255,255,255,0.05);
    min-height: 380px;
}

@media (max-width: 1023px) {
    .right-panel {
        border-radius: 0 0 1rem 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    .left-panel {
        border-right: none;
    }
}

/* === LEAFLET MAP PANEL === */
.leaflet-map-panel {
    min-height: 380px;
    background: #06101a;
}

/* Override Leaflet tile background to match dark theme */
.leaflet-container {
    background: #06101a !important;
    border-radius: 0;
    font-family: 'Inter', sans-serif;
}

/* Dark popup styling */
.dark-popup .leaflet-popup-content-wrapper {
    background: #0d1f33;
    color: #e2e8f0;
    border: 1px solid rgba(6,182,212,0.3);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6);
}
.dark-popup .leaflet-popup-tip {
    background: #0d1f33;
}
.dark-popup .leaflet-popup-content {
    font-size: 12px;
    color: #cbd5e1;
}

/* Leaflet zoom control dark styling */
.leaflet-control-zoom a {
    background: #0d1f33 !important;
    color: #94a3b8 !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.leaflet-control-zoom a:hover {
    background: #1e3a5f !important;
    color: #22d3ee !important;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(0,0,0,0.5) !important;
    color: #475569 !important;
    font-size: 9px !important;
}
.leaflet-control-attribution a {
    color: #64748b !important;
}

/* === CTA BUTTON === */
.cta-btn {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 60%, #0891b2 100%);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.35), 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(34, 211, 238, 0.4);
    position: relative;
    overflow: hidden;
}
.cta-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cta-btn:hover {
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.6), 0 4px 20px rgba(0,0,0,0.4);
    transform: translateY(-1px);
}
.cta-btn:hover::after {
    opacity: 1;
}
.cta-btn:active {
    transform: translateY(0);
}

/* === BACK BUTTON === */
.back-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}
.back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* === GLOWING TEXT INPUTS === */
.glow-input {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    color: #f1f5f9;
}
.glow-input:focus {
    border-color: #06b6d4 !important;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15), 0 0 20px rgba(6, 182, 212, 0.2);
    background: rgba(6, 182, 212, 0.04);
    outline: none;
}
.glow-input::placeholder {
    color: #334155;
}

/* === VEHICLE CARDS — Premium $5k Motion System === */

/* SVG size & colour */
.vehicle-icon {
    width: 64px;
    height: 40px;
    color: #64748b;
    transition: color 0.35s ease, filter 0.35s ease;
    overflow: visible;
}

/* Wheel outer ring */
.veh-wheel {
    /* no extra transform — rotation driven by keyframe on hover */
    transform-box: fill-box;
    transform-origin: center;
    transition: stroke 0.35s ease;
}

/* Hub dot */
.veh-hub {
    fill: currentColor;
    stroke: none;
    transform-box: fill-box;
    transform-origin: center;
}

/* ── Glassmorphism card base ── */
.vehicle-card {
    position: relative;
    overflow: hidden;
    filter: grayscale(100%);
    opacity: 0.45;
    transition:
        transform     0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow    0.35s ease,
        border-color  0.35s ease,
        background    0.35s ease,
        filter        0.35s ease,
        opacity       0.35s ease;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(12, 18, 35, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0.875rem;
    padding: 1.1rem 0.5rem 0.85rem;
    will-change: transform, filter, opacity;
}

/* ── Hover: float up + cyan glow ── */
.vehicle-label:hover .vehicle-card {
    filter: grayscale(0%);
    opacity: 0.9;
    border-color: rgba(6, 182, 212, 0.45);
    background: rgba(6, 182, 212, 0.07);
    transform: translateY(-5px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(34, 211, 238, 0.2),
        0 0 30px rgba(6, 182, 212, 0.25);
}

/* Hover: brighter icon colour + stroke glow */
.vehicle-label:hover .vehicle-icon {
    color: #22d3ee;
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.7));
}

/* Hover: wheels spin */
.vehicle-label:hover .veh-wheel {
    animation: wheelSpin 0.8s linear infinite;
}
.vehicle-label:hover .veh-hub {
    animation: wheelSpin 0.8s linear infinite;
}

/* Hover: speed lines shoot in */
.vehicle-label:hover .spd-line {
    animation: speedLine 0.45s ease-out forwards;
}
.vehicle-label:hover .spd-line:nth-child(2) { animation-delay: 0.06s; }
.vehicle-label:hover .spd-line:nth-child(3) { animation-delay: 0.12s; }

/* ── Selected state ── */
input[type="radio"]:checked + .vehicle-card {
    filter: grayscale(0%);
    opacity: 1;
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
    transform: translateY(-5px);
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(6, 182, 212, 0.5),
        0 0 40px rgba(6, 182, 212, 0.3),
        inset 0 0 16px rgba(6, 182, 212, 0.07);
}

input[type="radio"]:checked + .vehicle-card .vehicle-icon {
    color: #22d3ee;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.9));
    animation: svgGlowPulse 2.5s ease-in-out infinite;
}

input[type="radio"]:checked + .vehicle-card .font-bold {
    color: #22d3ee;
}

/* Selected: wheels keep spinning */
input[type="radio"]:checked + .vehicle-card .veh-wheel {
    animation: wheelSpin 1s linear infinite;
}
input[type="radio"]:checked + .vehicle-card .veh-hub {
    animation: wheelSpin 1s linear infinite;
}

/* Selected: continuous speed lines */
input[type="radio"]:checked + .vehicle-card .spd-line {
    animation: speedLineLoop 1.2s ease-in-out infinite;
}
input[type="radio"]:checked + .vehicle-card .spd-line:nth-child(2) {
    animation-delay: 0.3s;
}
input[type="radio"]:checked + .vehicle-card .spd-line:nth-child(3) {
    animation-delay: 0.6s;
}

/* ── Speed lines container ── */
.spd-lines {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 4px;
    pointer-events: none;
}

.spd-line {
    display: block;
    height: 1.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(34,211,238,0.8) 0%, transparent 100%);
    width: 0;
    opacity: 0;
}

.spd-line:nth-child(1) { width: 0; }
.spd-line:nth-child(2) { width: 0; }
.spd-line:nth-child(3) { width: 0; }

/* ─────────────────────────────
   KEYFRAMES
   ───────────────────────────── */

/* Wheel rotation */
@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* One-shot speed lines (hover in) */
@keyframes speedLine {
    0%   { width: 0;    opacity: 0; }
    30%  { width: 18px; opacity: 1; }
    60%  { width: 26px; opacity: 0.8; }
    100% { width: 30px; opacity: 0; }
}

/* Looping speed lines (for selected state) */
@keyframes speedLineLoop {
    0%   { width: 0;    opacity: 0;   transform: translateX(0); }
    30%  { width: 22px; opacity: 1;   transform: translateX(0); }
    70%  { width: 28px; opacity: 0.5; transform: translateX(-4px); }
    100% { width: 0;    opacity: 0;   transform: translateX(-10px); }
}

/* SVG stroke glow pulse on selected */
@keyframes svgGlowPulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.6)); }
    50%       { filter: drop-shadow(0 0 14px rgba(6, 182, 212, 1.0)) drop-shadow(0 0 28px rgba(6, 182, 212, 0.4)); }
}

/* === PRICE RESULT CARD === */
.price-result-card {
    background: linear-gradient(135deg, rgba(6,182,212,0.05) 0%, rgba(99,102,241,0.05) 100%);
    border: 1px solid rgba(6, 182, 212, 0.15);
}

/* === FORM STEP TRANSITIONS === */
.form-step {
    will-change: transform, opacity;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* === STEP INDICATORS === */
.step-indicator {
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* === SVG ANIMATIONS === */

/* Dashed route line draw-on animation */
.route-dash-line {
    stroke-dasharray: 6, 8;
    animation: routeDash 1.5s linear infinite;
}
@keyframes routeDash {
    to {
        stroke-dashoffset: -28;
    }
}

/* Glow bloom slow pulse */
.route-glow-bloom {
    animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* Pin pulse rings */
.pin-pulse {
    transform-origin: center;
    animation: pinPulse 2s ease-out infinite;
}
.pin-pulse-outer {
    transform-origin: center;
    animation: pinPulse 2s ease-out infinite 0.4s;
}
@keyframes pinPulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* === SERVICE CARDS === */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* === HERO FADE IN === */
.hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === ISOMETRIC MAP === */
.iso-map-container {
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.08));
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #060c18; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #06b6d4; }

/* === SHAKE ERROR ANIMATION === */
.shake-error {
    animation: shakeX 0.4s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ef4444 !important;
    box-shadow: 0 0 12px rgba(239,68,68,0.3) !important;
}
@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}
