/* Import Font Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* Global Font */
* {
    font-family: 'Inter', sans-serif;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html, body{
    width:100%;
    height:100%;
    overflow:hidden;
    font-family:'Poppins', sans-serif;
}

/* =========================
   MAP
========================= */

#map{
    width:100%;
    height:100vh;
    z-index:1;
}

/* =========================
   SEARCH BOX
========================= */

.search-box{
    position:absolute;
    top:20px;
    left:50%;
    transform:translateX(-50%);
    width:92%;
    max-width:820px;
    display:flex;
    align-items:center;
    gap:12px;
    z-index:1000;
    transition:0.3s ease;
}

.search-box.hide{
    opacity:0;
    pointer-events:none;
    transform:translateX(-50%) translateY(-20px);
}

.back-btn{
    width:50px;
    height:50px;
    border:none;
    border-radius:50%;
    background:#97AE48;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    flex-shrink:0;
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.back-btn i{
    font-size:18px;
    color:black;
}

.search-box input{
    flex:1;
    height:52px;
    border:none;
    outline:none;
    border-radius:30px;
    padding:0 22px;
    font-size:15px;
    font-weight:500;
    background:white;
    box-shadow:0 4px 12px rgba(0,0,0,0.12);
    cursor:pointer;
}

/* =========================
   ROUTE PANEL — Bottom Sheet
========================= */

.route-panel {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    width: 92%;
    max-width: 820px;
    background: white;
    z-index: 2000;
    border-radius: 28px 28px 0 0;
    padding: 8px 24px 32px;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 -4px 30px rgba(0,0,0,0.13);
    /* PERBAIKAN: max-height pakai dvh agar pas di semua HP */
    max-height: 80dvh;
    /* fallback untuk HP lama yang tidak support dvh */
    max-height: min(80dvh, calc(100vh - 80px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.route-panel.active{
    transform:translateX(-50%) translateY(0);
}

.route-panel.peek{
    transform:translateX(-50%) translateY(calc(100% - 72px));
}

.route-panel.dragging{
    transition:none;
}

.route-panel::-webkit-scrollbar{ width:4px; }
.route-panel::-webkit-scrollbar-track{ background:transparent; }
.route-panel::-webkit-scrollbar-thumb{ background:#ddd; border-radius:4px; }

/* =========================
   SHEET HANDLE
========================= */

.sheet-handle{
    width:44px;
    height:5px;
    border-radius:3px;
    background:#ddd;
    margin:0 auto 16px;
    cursor:grab;
    flex-shrink:0;
}

.sheet-handle:active{ cursor:grabbing; }

/* =========================
   PANEL HEADER
========================= */

.panel-header{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:20px;
    position:sticky;
    top:0;
    background:white;
    padding-top:4px;
    padding-bottom:12px;
    z-index:10;
}

.panel-header h3{
    font-size:22px;
    font-weight:700;
    color:#222;
}

/* =========================
   LOKASI CARD
========================= */

.lokasi-card{
    background:#fff;
    border-radius:18px;
    border:1.5px solid #e8e8e8;
    overflow:visible;
    position:relative;
    margin-bottom:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.06);
}

/* Baris input */
.lokasi-row{
    display:flex;
    align-items:center;
    gap:11px;
    padding:12px 14px;
    transition:background 0.2s;
}

.lokasi-row.filled{
    background:#fafff4;
}

/* ── Dot + ikon kontekstual wrapper ── */
.lokasi-dot-wrap{
    width:26px;
    height:26px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
}

.lokasi-dot{
    width:12px;
    height:12px;
    border-radius:50%;
    flex-shrink:0;
    transition:opacity 0.2s, transform 0.2s;
}

.dot-origin{ background:#9ca3af; border:2px solid #d1d5db; }
.dot-dest  { background:#97AE48; border:2px solid #7d9438; }

/* Ikon kontekstual — muncul saat filled, warna di-set via JS */
.lokasi-check{
    display:none;
    font-size:22px;
    animation:checkPop 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
    flex-shrink:0;
}

@keyframes checkPop{
    from{ transform:scale(0); opacity:0; }
    to  { transform:scale(1); opacity:1; }
}

/* ── Input wrapper: label float + input ── */
.lokasi-input-wrap{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-width:0;
    gap:0;
}

/* Label kecil di atas (muncul saat filled) */
.lokasi-label-float{
    font-size:10px;
    font-weight:600;
    color:#97AE48;
    letter-spacing:.4px;
    text-transform:uppercase;
    line-height:1;
    max-height:0;
    overflow:hidden;
    opacity:0;
    transition:max-height 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
}

.lokasi-label-float.visible{
    max-height:14px;
    opacity:1;
    margin-bottom:2px;
}

/* Input teks */
.lokasi-input{
    flex:1;
    border:none;
    outline:none;
    font-size:14px;
    font-weight:500;
    color:#1f2937;
    background:transparent;
    padding:0;
    font-family:'Poppins', sans-serif;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.lokasi-input::placeholder{ color:#b0b7c3; font-weight:400; }

/* ── Separator antara dua baris ── */
.lokasi-separator{
    display:flex;
    align-items:center;
    padding:0 14px 0 37px;  /* luruskan dengan tengah dot */
}

.sep-line{
    flex:1;
    height:1.5px;
    background:#f0f0f0;
}

/* ── Tombol Peta kecil di pojok kanan input tujuan ── */
.pin-map-btn{
    display:flex;
    align-items:center;
    gap:5px;
    padding:5px 10px;
    border:1.5px solid #d1e8a0;
    border-radius:20px;
    background:#f5faeb;
    color:#6a9020;
    font-size:11px;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap;
    font-family:'Poppins', sans-serif;
    transition:background 0.18s, border-color 0.18s, transform 0.12s;
    flex-shrink:0;
}

.pin-map-btn i{ font-size:11px; }

.pin-map-btn:hover{
    background:#e8f5c8;
    border-color:#97AE48;
}

.pin-map-btn:active{ transform:scale(0.95); }

.pin-map-btn.active{
    background:#97AE48;
    color:#fff;
    border-color:#7d9438;
    box-shadow:0 0 0 3px rgba(151,174,72,0.25);
}

/* (lokasi-action-btn dihapus — pin map sekarang inline di input tujuan) */
/* placeholder agar tidak ada selector kosong */

/* =========================
   AUTOCOMPLETE SUGGESTION
========================= */

.suggestion-box{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    width:100%;
    background:white;
    border-radius:14px;
    box-shadow:0 8px 24px rgba(0,0,0,0.14);
    z-index:99999;
    overflow:hidden;
    display:none;
    max-height:220px;
    overflow-y:auto;
}


.suggestion-box::-webkit-scrollbar{ width:3px; }
.suggestion-box::-webkit-scrollbar-thumb{ background:#e0e0e0; border-radius:3px; }

.suggestion-item{
    padding:12px 16px;
    cursor:pointer;
    border-bottom:1px solid #f1f1f1;
    transition:background 0.15s;
    display:flex;
    align-items:flex-start;
    gap:10px;
}

.suggestion-item:last-child{ border-bottom:none; }
.suggestion-item:hover{ background:#f7f7f7; }

.suggestion-item-icon{
    margin-top:2px;
    font-size:14px;
    color:#97AE48;
    flex-shrink:0;
}

.suggestion-title{
    font-size:13px;
    font-weight:600;
    color:#222;
    line-height:1.3;
}

.suggestion-distance{
    font-size:11px;
    color:#888;
    margin-top:3px;
}

.suggestion-empty{
    padding:16px;
    text-align:center;
    color:#999;
    font-size:13px;
}

.suggestion-loading{
    padding:14px 16px;
    text-align:center;
    color:#888;
    font-size:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

/* =========================
   SKEMA PEMBOBOTAN
========================= */

.route-panel h4{
    margin-top:4px;
    margin-bottom:14px;
    font-size:13px;
    font-weight:700;
    color:#6b7280;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.weight-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    margin-bottom:4px;
}

.weight-card{
    background:#f2f2f2;
    border-radius:16px;
    padding:16px 10px;
    text-align:center;
    cursor:pointer;
    transition:0.2s;
    box-shadow:0 3px 8px rgba(0,0,0,0.05);
    border:2px solid transparent;
}

.weight-card.active{
    background:#97AE48;
    color:white;
    border-color:#7a9432;
}

.weight-card:hover:not(.active){
    transform:translateY(-3px);
    border-color:#c5d882;
}

.weight-card i{
    font-size:22px;
    margin-bottom:8px;
    display:block;
}

.weight-card span{
    display:block;
    font-size:12px;
    font-weight:600;
}

/* =========================
   SEARCH BUTTON
========================= */

.search-btn{
    width:100%;
    height:54px;
    margin-top:20px;
    border:none;
    border-radius:35px;
    background:#97AE48;
    color:white;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    transition:0.2s;
    font-family:'Poppins', sans-serif;
}

.search-btn:hover{ transform:scale(1.01); background:#7a9432; }

/* =========================
   PRIORITAS ITEMS
========================= */

.prioritas-item{
    display:flex;
    align-items:center;
    gap:14px;
    padding:15px 14px;
    border:2px solid #e8e8e8;
    border-radius:16px;
    margin-bottom:11px;
    cursor:pointer;
    transition:0.2s;
}

.prioritas-item.active{
    border-color:#97AE48;
    background:#f6faea;
}

.prioritas-item:hover{ border-color:#b5cc70; }

.prioritas-icon-wrap{
    width:44px;
    height:44px;
    border-radius:13px;
    background:#f0f0f0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:19px;
    color:#888;
    flex-shrink:0;
}

.prioritas-item.active .prioritas-icon-wrap{
    background:#97AE48;
    color:white;
}

.prioritas-text{ flex:1; }

.prioritas-label{
    font-size:14px;
    font-weight:700;
    color:#222;
}

.prioritas-desc{
    font-size:12px;
    color:#777;
    margin-top:2px;
    line-height:1.4;
}

.prioritas-radio{
    width:21px;
    height:21px;
    border-radius:50%;
    border:2px solid #ccc;
    flex-shrink:0;
    transition:0.2s;
    position:relative;
}

.prioritas-radio.checked{
    border-color:#97AE48;
    background:white;
}

.prioritas-radio.checked::after{
    content:'';
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:11px;
    height:11px;
    border-radius:50%;
    background:#97AE48;
}

/* =========================
   REKOMENDASI CARDS
========================= */

.rekomendasi-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:15px 13px;
    border:2px solid #e8e8e8;
    border-radius:17px;
    margin-bottom:12px;
    cursor:pointer;
    transition:0.2s;
}

.rekomendasi-card.selected{
    border-color:#97AE48;
    background:#f6faea;
}

.rekomendasi-card:hover{
    transform:translateY(-2px);
    box-shadow:0 6px 16px rgba(151,174,72,0.15);
}

.rek-left{
    display:flex;
    align-items:center;
    gap:13px;
    flex:1;
    min-width:0;
}

.rek-icon-wrap{
    width:46px;
    height:46px;
    border-radius:13px;
    background:#f0f0f0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:19px;
    color:#888;
    flex-shrink:0;
    transition:0.2s;
}

.rek-icon-wrap.active{
    background:#97AE48;
    color:white;
}

.rek-nama{
    font-size:14px;
    font-weight:700;
    color:#222;
}

.rek-desc{
    font-size:11px;
    color:#777;
    margin-top:2px;
    line-height:1.4;
}

.rek-best-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:10px;
    font-weight:700;
    color:#97AE48;
    background:#eef7d6;
    padding:3px 9px;
    border-radius:20px;
    margin-bottom:5px;
}

.rek-best-badge i{ font-size:9px; }

.rek-right{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:3px;
    flex-shrink:0;
    margin-left:10px;
}

.rek-waktu{
    font-size:15px;
    font-weight:700;
    color:#97AE48;
}

.rek-jarak{
    font-size:12px;
    color:#777;
}

.rek-biaya{
    font-size:11px;
    color:#555;
    font-weight:600;
}

/* =========================
   ESTIMASI GRID
========================= */

.estimasi-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:9px;
    margin-bottom:14px;
}

.estimasi-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 13px;
    background:#f8f8f8;
    border-radius:11px;
}

.estimasi-label{
    font-size:13px;
    color:#555;
    font-weight:600;
}

.estimasi-val{
    font-size:14px;
    font-weight:700;
    color:#97AE48;
}

.biaya-info{
    font-size:13px;
    color:#555;
    padding:12px 14px;
    background:#f0f7e3;
    border-radius:12px;
    line-height:1.6;
}

/* =========================
   PIN MAP OVERLAY
========================= */

.pin-map-overlay{
    display:none;
    position:fixed;
    inset:0;
    z-index:3000;
    pointer-events:none;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

.pin-map-overlay.active{
    display:flex;
}

.pin-map-crosshair{
    font-size:40px;
    color:#97AE48;
    text-shadow:0 2px 12px rgba(151,174,72,0.5);
    animation:crossPulse 1.5s ease-in-out infinite;
    pointer-events:none;
    margin-bottom:12px;
}

@keyframes crossPulse{
    0%,100%{ transform:scale(1); opacity:1; }
    50%{ transform:scale(1.1); opacity:0.8; }
}

.pin-map-label{
    font-size:13px;
    font-weight:600;
    color:#444;
    background:rgba(255,255,255,0.92);
    padding:6px 16px;
    border-radius:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.12);
    pointer-events:none;
    margin-bottom:20px;
}

.pin-map-confirm-btn{
    pointer-events:auto;
    position:fixed;
    bottom:32px;
    left:50%;
    transform:translateX(-50%);
    height:52px;
    padding:0 32px;
    border:none;
    border-radius:30px;
    background:#97AE48;
    color:white;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    font-family:'Poppins', sans-serif;
    box-shadow:0 6px 20px rgba(151,174,72,0.4);
    transition:0.2s;
    display:flex;
    align-items:center;
    gap:8px;
}

.pin-map-confirm-btn:hover{
    background:#7a9432;
    transform:translateX(-50%) scale(1.03);
}

/* =========================
   GOOGLE MAPS MODAL
========================= */

.gmaps-backdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.4);
    z-index:4000;
    animation:fadeIn 0.2s ease;
}

.gmaps-card{
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    z-index:4001;
    background:white;
    border-radius:24px;
    padding:32px 28px;
    width:88%;
    max-width:340px;
    text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,0.2);
    animation:popIn 0.25s ease;
}

@keyframes fadeIn{ from{ opacity:0; } to{ opacity:1; } }
@keyframes popIn{ from{ opacity:0; transform:translate(-50%,-46%); } to{ opacity:1; transform:translate(-50%,-50%); } }

.gmaps-icon{
    width:64px;
    height:64px;
    border-radius:50%;
    background:#f0f7e3;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    color:#97AE48;
    margin:0 auto 18px;
}

.gmaps-title{
    font-size:17px;
    font-weight:700;
    color:#222;
    margin-bottom:24px;
    line-height:1.4;
}

.gmaps-actions{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.gmaps-lanjut{
    width:100%;
    height:50px;
    border:none;
    border-radius:30px;
    background:#97AE48;
    color:white;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:0.2s;
    font-family:'Poppins', sans-serif;
}

.gmaps-lanjut:hover{ background:#7a9432; }

.gmaps-kembali{
    width:100%;
    height:50px;
    border:2px solid #e0e0e0;
    border-radius:30px;
    background:transparent;
    color:#777;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
    font-family:'Poppins', sans-serif;
}

.gmaps-kembali:hover{ background:#f8f8f8; }

/* =========================
   LEAFLET POPUP
========================= */

.leaflet-popup-content-wrapper{ border-radius:18px; }
.leaflet-popup-content{ margin:14px; }

.popup-card{ min-width:200px; font-family:'Poppins', sans-serif; }
.popup-title{ font-size:15px; font-weight:700; color:#97AE48; margin-bottom:8px; }
.popup-address{ font-size:12px; color:#555; line-height:1.5; margin-bottom:12px; }
.popup-btn{
    width:100%;
    height:40px;
    border:none;
    border-radius:12px;
    background:#97AE48;
    color:white;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
}
.popup-btn:hover{ transform:scale(1.03); }

/* =========================
   LIVE LOCATION BUTTON
========================= */

.live-location-btn{
    position:fixed;
    right:20px;
    bottom:90px;
    width:56px;
    height:56px;
    border-radius:50%;
    border:none;
    background:white;
    box-shadow:0 4px 14px rgba(0,0,0,0.22);
    z-index:9999;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    color:#7a9d2f;
    transition:0.2s;
}

.live-location-btn:hover{ transform:scale(1.08); }

/* =========================
   HALTE ICON
========================= */

.halte-icon{
    object-fit:contain;
}

/* =========================
   TABLET
========================= */

@media(max-width:900px){
    .search-box{ max-width:680px; }
    .route-panel{ max-width:680px; }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
    .search-box { top: 16px; width: 92%; }
    .search-box input { height: 48px; font-size: 14px; }
    .back-btn { width: 46px; height: 46px; }

    .route-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        padding: 8px 16px 28px;
        max-height: 72dvh;
        max-height: min(72dvh, calc(100vh - 100px));
    }

    #detailPanel.route-panel {
        max-height: 78dvh;
        max-height: min(78dvh, calc(100vh - 60px));
    }

    .panel-header h3 { font-size: 19px; }
    .route-panel h4 { font-size: 12px; }

    .lokasi-action-btn { font-size: 12px; padding: 9px 12px; gap: 6px; }

    .weight-grid { gap: 8px; }
    .weight-card { padding: 13px 8px; }
    .weight-card i { font-size: 20px; }
    .weight-card span { font-size: 11px; }

    .search-btn { height: 52px; font-size: 15px; }

    .prioritas-item { padding: 12px 11px; }
    .prioritas-icon-wrap { width: 40px; height: 40px; font-size: 17px; }

    .rekomendasi-card { padding: 12px 11px; }
    .rek-icon-wrap { width: 42px; height: 42px; font-size: 18px; }

    .estimasi-grid { gap: 8px; }

} /* ← semua rule mobile di dalam sini */

/* HP layar pendek — TERPISAH di luar */
@media (max-height: 700px) {
    .route-panel {
        max-height: 68dvh;
        max-height: min(68dvh, calc(100vh - 80px));
    }

    #detailPanel.route-panel {
        max-height: 75dvh;
        max-height: min(75dvh, calc(100vh - 60px));
    }
}

/* =========================
   GPS PULSE ANIMATION
========================= */

.gps-pulse-wrap{
    position:relative;
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.gps-dot{
    width:14px;
    height:14px;
    border-radius:50%;
    background:#1E90FF;
    border:3px solid white;
    box-shadow:0 2px 8px rgba(30,144,255,0.5);
    position:relative;
    z-index:2;
}

.gps-pulse-ring{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:14px;
    height:14px;
    border-radius:50%;
    border:3px solid rgba(30,144,255,0.6);
    animation:gpsPulse 1.8s ease-out infinite;
    z-index:1;
}

@keyframes gpsPulse{
    0%  { width:14px; height:14px; opacity:0.8; border-width:3px; }
    100%{ width:46px; height:46px; opacity:0;   border-width:1px; margin-top:-16px; margin-left:-16px; }
}

/* =========================
   PLACE MARKER BUBBLE
   (origin & destination)
========================= */

.place-marker-wrap{
    display:flex;
    flex-direction:column;
    align-items:center;
    position:relative;
    animation:markerDrop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* Lingkaran ikon utama */
.place-marker-bubble{
    width:40px;
    height:40px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:17px;
    border:3px solid white;
    box-shadow:0 4px 14px rgba(0,0,0,0.25);
    position:relative;
    z-index:2;
}

/* Ekor segitiga ke bawah */
.place-marker-tail{
    width:0;
    height:0;
    border-left:7px solid transparent;
    border-right:7px solid transparent;
    border-top:10px solid #000;   /* warna di-override inline via style */
    margin-top:-2px;
    filter:drop-shadow(0 3px 3px rgba(0,0,0,0.18));
    position:relative;
    z-index:1;
}

/* Label nama tempat di bawah marker */
.place-marker-label{
    margin-top:4px;
    background:white;
    color:#1f2937;
    font-size:10px;
    font-weight:700;
    font-family:'Poppins', sans-serif;
    padding:2px 8px;
    border-radius:20px;
    white-space:nowrap;
    box-shadow:0 2px 8px rgba(0,0,0,0.15);
    max-width:120px;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* Ripple untuk marker tujuan */
.place-marker-pulse{
    position:absolute;
    top:0; left:50%;
    transform:translateX(-50%);
    width:40px;
    height:40px;
    border-radius:50%;
    background:currentColor;
    opacity:0;
    animation:placeRipple 2s ease-out infinite;
    z-index:0;
}

@keyframes placeRipple{
    0%  { transform:translateX(-50%) scale(1);   opacity:0.35; }
    100%{ transform:translateX(-50%) scale(2.4); opacity:0; }
}

@keyframes markerDrop{
    from{ transform:scale(0) translateY(-16px); opacity:0; }
    to  { transform:scale(1) translateY(0);     opacity:1; }
}

/* Legacy - tidak dipakai tapi jaga kompatibilitas */
.origin-marker-wrap, .dest-marker-wrap{ display:none; }



@keyframes destRipple{
    0%  { width:16px; height:16px; opacity:0.6; margin-left:-8px; }
    100%{ width:52px; height:52px; opacity:0;   margin-left:-26px; }
}

@keyframes destShadowPulse{
    0%,100%{ transform:scale(1);   opacity:0.18; }
    50%    { transform:scale(0.6); opacity:0.08; }
}

/* =========================
   ROUTE INFO BAR
========================= */

.route-info-bar{
    position:fixed;
    top:20px;
    left:50%;
    transform:translateX(-50%) translateY(-20px);
    width:auto;
    min-width:220px;
    max-width:400px;
    background:white;
    border-radius:50px;
    padding:12px 20px;
    z-index:3500;
    box-shadow:0 4px 20px rgba(0,0,0,0.14);
    opacity:0;
    transition:opacity 0.3s ease, transform 0.38s cubic-bezier(0.34,1.2,0.64,1);
    pointer-events:none;
    display:flex;
    align-items:center;
}

.route-info-bar.visible{
    opacity:1;
    transform:translateX(-50%) translateY(0);
    pointer-events:auto;
}

.rib-content{
    display:flex;
    flex-direction:column;
    gap:0;
    width:100%;
}

.rib-row{
    display:flex;
    align-items:center;
    gap:9px;
    height:22px;
}

.rib-dot-col{
    width:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

.rib-dot-origin{
    width:9px;
    height:9px;
    border-radius:50%;
    background: #2563eb;
    box-shadow:0 0 0 2px rgba(151,174,72,0.25);
}

.rib-dot-dest{
    width:12px;
    height:12px;
    border-radius:50%;
    background:#e74c3c;
    position:relative;
    box-shadow:0 0 0 2px rgba(231,76,60,0.2);
}

.rib-dest-ring{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:12px;
    height:12px;
    border-radius:50%;
    background:rgba(231,76,60,0.4);
    animation:recPulse 1.1s ease-out infinite;
}

@keyframes recPulse{
    0%  { transform:translate(-50%,-50%) scale(1);   opacity:0.7; }
    100%{ transform:translate(-50%,-50%) scale(3);   opacity:0;   }
}

.rib-connector-wrap{
    display:flex;
    flex-direction:column;
    align-items:center;
    width:14px;
    flex-shrink:0;
    gap:3px;
    padding:2px 0;
    height:14px;
}

.rib-connector-dot{
    width:2px;
    height:2px;
    border-radius:50%;
    background:#bbb;
    flex-shrink:0;
}

.rib-label{
    font-size:13px;
    font-weight:500;
    color:#555;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-family:'Poppins', sans-serif;
    line-height:1;
    max-width:280px;
}

.rib-label-dest{
    font-size:13px;
    font-weight:700;
    color:#111;
}

@media(max-width:768px){
    .route-info-bar{
        top:14px;
        max-width:88vw;
        padding:10px 16px;
    }
    .rib-label{ font-size:12px; max-width:200px; }
    .rib-label-dest{ font-size:12px; }
}

/* =========================
   JOURNEY TIMELINE
========================= */

.journey-timeline{
    display:flex;
    flex-direction:column;
    gap:0;
    margin-bottom:16px;
}

.jt-step{
    display:flex;
    gap:12px;
    animation:jtFadeIn 0.4s ease both;
    animation-delay:var(--delay, 0ms);
}

@keyframes jtFadeIn{
    from{ opacity:0; transform:translateX(-10px); }
    to  { opacity:1; transform:translateX(0); }
}

.jt-icon-col{
    display:flex;
    flex-direction:column;
    align-items:center;
    width:36px;
    flex-shrink:0;
}

.jt-dot{
    width:36px;
    height:36px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    flex-shrink:0;
    position:relative;
    z-index:1;
}

.jt-dot.dot-blue{
    background:#f0f7e6;
    color:#97AE48;
    border:2px solid #97AE48;
}

.jt-dot.dot-green{
    background:#f0f7e6;
    color:#97AE48;
    border:2px solid #97AE48;
    animation:jtPulseGreen 2s ease-in-out infinite;
}

.jt-dot.dot-dest{
    background:#f7e6e6;
    color:#ae4848;
    border:2px solid #ae4848;
}

.jt-dot.dot-final{
    background:#ffeaea;
    color:#e74c3c;
    border:2px solid #e74c3c;
    animation:jtPulseRed 2s ease-in-out infinite;
}

@keyframes jtPulseGreen{
    0%,100%{ box-shadow:0 0 0 0 rgba(151,174,72,0.5); }
    50%    { box-shadow:0 0 0 7px rgba(151,174,72,0); }
}

@keyframes jtPulseRed{
    0%,100%{ box-shadow:0 0 0 0 rgba(231,76,60,0.5); }
    50%    { box-shadow:0 0 0 7px rgba(231,76,60,0); }
}

.jt-line{
    width:2px;
    flex:1;
    min-height:18px;
    background:linear-gradient(to bottom, #dde, transparent);
    position:relative;
    overflow:hidden;
}

.jt-line::after{
    content:'';
    position:absolute;
    top:-100%;
    left:0;
    width:100%;
    height:100%;
    background:linear-gradient(to bottom, transparent, #97AE48 50%, transparent);
    animation:jtFlow 2s linear infinite;
}

@keyframes jtFlow{
    from{ top:-100%; }
    to  { top:100%; }
}

.jt-content{
    padding:6px 0 16px;
    flex:1;
}

.jt-label{
    font-size:13px;
    font-weight:600;
    color:#2d3436;
    line-height:1.3;
}

.jt-sub{
    font-size:11px;
    color:#636e72;
    margin-top:2px;
    line-height:1.4;
}

.jt-meta{
    font-size:11px;
    color:#636e72;
    font-weight:600;
    margin-top:4px;
}

.gmaps-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.gmaps-btn i{ font-size:16px; }

/* =========================
   REK ROUTE ANIMATION
========================= */

.rek-route-anim{
    margin-top:4px;
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    font-size:11px;
    color:#2d3436;
    font-weight:500;
}

.rek-step{
    display:flex;
    align-items:center;
    gap:4px;
    animation:fadeSlide 0.5s ease;
}

.rek-step i{ color:#222; transition:0.25s; }
.rek-bus i{ color:#97AE48; animation:busPulse 1.8s infinite; }

.rek-arrow{
    color:#999;
    animation:arrowMove 1.5s infinite;
}

@keyframes busPulse{
    0%,100%{ transform:scale(1); }
    50%    { transform:scale(1.15); }
}

@keyframes arrowMove{
    0%,100%{ transform:translateX(0); opacity:0.7; }
    50%    { transform:translateX(3px); opacity:1; }
}

@keyframes fadeSlide{
    from{ opacity:0; transform:translateY(4px); }
    to  { opacity:1; transform:translateY(0); }
}

/* =========================
   HALTE MARKERS
========================= */

.halte-marker{
    width:36px;
    height:36px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    font-size:15px;
    border:3px solid white;
    box-shadow:0 4px 12px rgba(0,0,0,0.18);
    position:relative;
    animation:markerPop 0.35s ease;
}

.halte-naik{ background:#97AE48; }
.halte-naik i{ animation:busBounce 2s infinite; }

.halte-turun{ background:#e74c3c; }
.halte-turun::after{
    content:'';
    position:absolute;
    inset:0;
    border-radius:50%;
    background:rgba(231,76,60,0.35);
    animation:pulseMarker 2s infinite;
    z-index:-1;
}

@keyframes markerPop{
    from{ transform:scale(0); opacity:0; }
    to  { transform:scale(1); opacity:1; }
}

@keyframes busBounce{
    0%,100%{ transform:translateY(0); }
    50%    { transform:translateY(-2px); }
}

@keyframes pulseMarker{
    0%  { transform:scale(1); opacity:0.5; }
    100%{ transform:scale(1.8); opacity:0; }
}

.estimasi-note{
    margin-top:8px;
    font-size:11px;
    font-style:italic;
    color:#646568;
    line-height:1.4;
}

.note-star{
    color:#ef4444;
    font-weight:700;
}