/* JastipDekat — peta rute, lokasi live, pin rumah (Leaflet + OpenStreetMap) */
.peta-box{position:relative;width:100%;min-height:240px;height:240px;border-radius:16px;overflow:hidden;border:1px solid #dfeae1;background:#e4eee6}
.peta-box.tall{min-height:280px;height:280px}
.peta-box .leaflet-container{width:100%;height:100%;background:#e4eee6;font-family:inherit;z-index:0}
.leaflet-container .leaflet-control-attribution{font-size:10px;background:rgba(255,255,255,.88)!important;color:#33443a;max-width:100%;white-space:normal}
.leaflet-container .leaflet-control-attribution a{color:#18583b;text-decoration:underline}
.peta-box .leaflet-control-zoom{border:1px solid #c9d8cc!important;border-radius:10px!important;overflow:hidden}
.peta-box .leaflet-control-zoom a{width:30px!important;height:30px!important;min-height:30px!important;line-height:28px!important;font-size:16px!important;padding:0!important;border-radius:0!important;color:#24332b!important;background:#fff!important;border-bottom:1px solid #dfeae1!important}
.peta-search-row{display:flex;gap:8px;margin:0 0 8px}
.peta-search-row input{flex:1;min-width:0;border:1.5px solid #d9e1da;border-radius:13px;padding:11px 12px;background:#fff;color:var(--ink);outline:0}
.peta-search-row .btn{flex:none}
.peta-results{list-style:none;margin:0 0 8px;padding:0;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;display:none}
.peta-results.open{display:block}
.peta-results button{display:block;width:100%;text-align:left;border:0;background:#fff;padding:9px 12px;font-size:13.5px;font-weight:650;color:var(--ink);border-bottom:1px solid #eef1ec}
.peta-results button:last-child{border-bottom:0}
.peta-results button:hover,.peta-results button:focus{background:var(--mint)}
.peta-note{margin:8px 0 0;font-size:13px;color:#5b695f;line-height:1.4}
.peta-card-actions{margin:8px 0 0}
.peta-modal .modal{max-width:560px}
.peta-modal-status{margin:0 0 10px;border-radius:12px;padding:8px 10px;font-weight:800;font-size:13.5px}
.peta-modal-status.st-belanja{background:#fff6e5;color:#865714}
.peta-modal-status.st-siap{background:#eaf4ed;color:#18583b}
.peta-modal-status.st-buka{background:#eaf4ed;color:#18583b}
.peta-share-row{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.peta-privacy{background:#eaf4ed;border:1px solid #c9e1cf;border-radius:12px;padding:8px 10px;color:#245d3a;font-size:13px;font-weight:650;margin:0 0 10px}
.peta-list-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:12px 0 8px}
.peta-list-head b{font-size:14px}
.peta-list-head span{font-size:12.5px;color:var(--muted);font-weight:650}
.order-item .km{color:var(--green);font-weight:800;font-size:13px;white-space:nowrap}
.order-item .thumb{width:44px;height:44px;border-radius:10px;object-fit:cover;background:#eaf4ed;border:1px solid #dfeae1}
.order-item .oi-grid{display:grid;grid-template-columns:28px 1fr auto;gap:6px 8px;align-items:start}
.order-item .num{width:22px;height:22px;border-radius:50%;color:#fff;display:grid;place-items:center;font-size:11px;font-weight:800;margin-top:1px}
.home-photo-preview{width:100%;max-height:140px;object-fit:cover;border-radius:12px;border:1.5px dashed #cbded0;background:#fbfcfb;display:block;margin:6px 0}
.home-photo-preview[hidden],.peta-results:empty{display:none}

.stop-wrap,.veh-wrap,.home-wrap,.drag-wrap{background:none!important;border:0!important;overflow:visible!important}
.stop-pin{display:flex;align-items:center;gap:5px;filter:drop-shadow(0 2px 3px rgba(20,40,25,.25))}
.stop-pin b{flex:none;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#24734f;color:#fff;font-size:11px;font-weight:800;border:2px solid #fff}
.stop-pin.start{flex-direction:row-reverse}
.stop-pin.end b{background:#c45c18}
.stop-pin.mid b{background:#1d4f8f}
.stop-pin span{background:#fff;border:1px solid #dfeae1;border-radius:8px;padding:2px 6px;line-height:1.15;color:#183d24;font-weight:800;font-size:10.5px;white-space:nowrap}
.stop-pin span small{display:block;font-size:8px;letter-spacing:.3px;color:#708078;font-weight:800}

.veh-marker{position:relative;width:200px;height:88px;pointer-events:none}
.veh-marker.compact{width:72px;height:72px}
.veh-label{position:absolute;left:50%;top:0;transform:translateX(-22%);display:inline-flex;align-items:center;gap:5px;background:#fff;color:#24332b;border:1px solid #d7e4da;border-radius:999px;padding:4px 9px 4px 7px;font-size:10px;font-weight:650;line-height:1.2;box-shadow:0 2px 8px rgba(24,50,32,.18);white-space:nowrap}
.veh-label b{font-weight:800}
.veh-label .live-dot{width:6px;height:6px;border-radius:50%;background:#2a9a5c;flex:none;box-shadow:0 0 0 3px rgba(42,154,92,.22)}
.veh-core{position:absolute;left:50%;top:30px;width:36px;height:36px;margin-left:-18px}
.veh-marker.compact .veh-core{left:18px;top:18px;margin-left:0}
.veh-ring,.veh-ring.delay{position:absolute;left:50%;top:50%;width:36px;height:36px;margin:-18px 0 0 -18px;border-radius:50%;border:2px solid rgba(36,115,79,.5);background:rgba(36,115,79,.12);box-sizing:border-box;animation:vehPulse 2s ease-out infinite;pointer-events:none}
.veh-ring.delay{animation-delay:1s}
.veh-orient{position:absolute;inset:0}
.veh-arrow{position:absolute;z-index:1;left:50%;top:-7px;width:14px;height:10px;margin-left:-7px;overflow:visible;display:block;filter:drop-shadow(0 1px 1px rgba(20,40,25,.25))}
.veh-badge{position:absolute;z-index:2;inset:1px;border-radius:50%;background:#24734f;border:2.5px solid #fff;box-shadow:0 3px 8px rgba(24,50,32,.28);display:grid;place-items:center}
.veh-glyph{width:20px;height:12px;display:block;transform:rotate(calc(-1 * var(--heading, 0deg)))}
@keyframes vehPulse{0%{transform:scale(.92);opacity:.6}100%{transform:scale(2.05);opacity:0}}

.home-pin{display:flex;align-items:flex-end;gap:5px;filter:drop-shadow(0 2px 3px rgba(20,40,25,.28))}
.home-pin .drop{flex:none;width:28px;height:28px;border-radius:50% 50% 50% 4px;transform:rotate(-45deg);background:var(--c,#24734f);color:#fff;display:grid;place-items:center;border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.2)}
.home-pin .drop i{transform:rotate(45deg);font-style:normal;font-weight:800;font-size:12px;line-height:1;color:#fff}
.home-pin span.name{background:#fff;border:1px solid #dfeae1;border-radius:8px;padding:3px 7px;font-size:11px;font-weight:800;color:#183d24;white-space:nowrap;margin-bottom:2px}

.drag-pin{position:relative;width:176px;height:80px}
.drag-drop{position:absolute;left:2px;bottom:2px;width:32px;height:32px;border-radius:50% 50% 50% 5px;transform:rotate(-45deg);background:#c45c18;border:3px solid #fff;box-shadow:0 3px 7px rgba(20,40,25,.35)}
.drag-drop:after{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:#fff;top:8px;left:8px}
.drag-label{position:absolute;left:30px;top:0;background:#203c30;color:#fff;border-radius:10px;padding:5px 8px;font-size:11px;font-weight:800;white-space:nowrap;box-shadow:0 4px 10px rgba(20,40,25,.28)}
.drag-label:after{content:"";position:absolute;left:8px;bottom:-5px;border:6px solid transparent;border-top-color:#203c30;border-bottom:0}

@media (max-width:720px){
  .peta-box{height:220px;min-height:220px}
  .peta-box.tall{height:250px;min-height:250px}
}

/* Tombol bagikan lokasi di kartu pemilik: satu baris penuh, mudah terlihat di HP. */
.owner-actions .live-share-btn{flex:1 1 100%;justify-content:center;font-weight:800}
.peta-card-actions{margin:10px 0 0}

/* Tombol Google Maps di kartu: hanya saat lokasi live masih segar. */
.peta-gmaps{margin:-5px 0 14px}
.peta-gmaps[hidden]{display:none!important}
.peta-gmaps-btn{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;text-align:left;text-decoration:none;color:#18583b;background:linear-gradient(180deg,#fff 0%,#f3faf5 100%);border:1.5px solid #c9e1cf;border-radius:16px;padding:11px 12px;min-height:58px;box-shadow:0 6px 16px rgba(36,115,79,.08);-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;touch-action:manipulation;outline:none;transition:transform .15s ease,box-shadow .15s ease,background .15s ease,border-color .15s ease;font:inherit;cursor:pointer;appearance:none;-webkit-appearance:none}
.peta-gmaps-btn:hover{background:linear-gradient(180deg,#f4fbf6 0%,#eaf4ed 100%);border-color:#b4d4bc}
.peta-gmaps-btn:focus-visible{box-shadow:0 0 0 3px rgba(36,115,79,.28)}
.peta-gmaps-btn:active{transform:scale(.98);box-shadow:0 2px 8px rgba(36,115,79,.1);filter:brightness(.97)}
.peta-gmaps-icon{flex:none;width:40px;height:40px;border-radius:12px;background:#24734f;color:#fff;display:grid;place-items:center;box-shadow:0 4px 10px rgba(36,115,79,.22)}
.peta-gmaps-icon svg{width:20px;height:20px;display:block}
.peta-gmaps-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.peta-gmaps-label{font-weight:800;font-size:13.5px;line-height:1.25;letter-spacing:-.15px;color:#18583b}
.peta-gmaps-meta{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:650;color:#3d6b50;line-height:1.2}
.peta-gmaps-dot{width:7px;height:7px;border-radius:50%;background:#2a9a5c;flex:none;position:relative;box-shadow:0 0 0 3px rgba(42,154,92,.2)}
.peta-gmaps-dot:after{content:"";position:absolute;inset:-4px;border-radius:50%;background:#2a9a5c;opacity:.45;animation:petaLivePulse 1.6s ease-out infinite}
@keyframes petaLivePulse{0%{transform:scale(.7);opacity:.5}100%{transform:scale(2.2);opacity:0}}
@media(prefers-reduced-motion:reduce){.peta-gmaps-dot:after{animation:none}}
.peta-gmaps-caption{margin:7px 2px 0;font-size:11.5px;line-height:1.35;color:#69776e;font-weight:600}
@media(max-width:390px){.peta-gmaps-label{font-size:13px}.peta-gmaps-icon{width:38px;height:38px;border-radius:11px}}

.peta-live-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.peta-live-bar[hidden]{display:none!important}
.peta-follow-btn{appearance:none;-webkit-appearance:none;border:1.5px solid #c9e1cf;background:#fff;color:#18583b;border-radius:999px;min-height:40px;padding:8px 14px;font:inherit;font-size:13px;font-weight:800;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;box-shadow:0 2px 8px rgba(36,115,79,.06)}
.peta-follow-btn.on{background:#24734f;color:#fff;border-color:#24734f}
.peta-follow-btn:active{transform:scale(.97)}
.peta-live-ago{font-size:12px;font-weight:700;color:#3d6b50}

.peta-gmaps:not(.is-live) .peta-gmaps-btn{background:linear-gradient(180deg,#fff 0%,#f6faf7 100%)}
.peta-gmaps:not(.is-live) .peta-gmaps-icon{background:#2f7a56;box-shadow:0 3px 8px rgba(36,115,79,.16)}
.peta-gmaps.is-live .peta-gmaps-btn{border-color:#b4d4bc;box-shadow:0 6px 16px rgba(36,115,79,.10)}

.peta-live-eta{display:block;width:100%;font-size:12.5px;font-weight:750;color:#18583b;background:#eef7f1;border:1px solid #c9e1cf;border-radius:10px;padding:6px 10px}
.peta-live-eta[hidden]{display:none!important}
.trip-notify{margin:-2px 0 12px}
.trip-notify-btn{appearance:none;-webkit-appearance:none;width:100%;box-sizing:border-box;text-align:left;border:1.5px solid #d5e3d8;background:#fff;color:#18583b;border-radius:12px;min-height:44px;padding:10px 12px;font:inherit;font-size:13px;font-weight:750;cursor:pointer;-webkit-tap-highlight-color:transparent}
.trip-notify-btn.on{background:#f3faf5;border-color:#b4d4bc}
.trip-kabar{display:flex;gap:8px;flex:1 1 100%;margin:6px 0 0}
.trip-kabar-input{flex:1;min-width:0;border:1.5px solid #d5e3d8;border-radius:12px;padding:8px 10px;font:inherit;font-size:13px;min-height:40px}
.owner-actions .trip-kabar{align-items:center}

.peta-nav-btn{margin-left:0}
#listingMap .peta-rot-wrap{position:absolute;inset:0;width:100%;height:100%;transform-origin:50% 50%;}
#listingMap.peta-nav-on{overflow:hidden}
#listingMap.peta-nav-on .peta-rot-wrap{left:-35%;top:-35%;width:170%;height:170%;transform:rotate(var(--nav-rot, 0deg));will-change:transform}
#listingMap.peta-nav-on .leaflet-control-container{transform:rotate(calc(-1 * var(--nav-rot, 0deg)));transform-origin:bottom right}
#listingMap.peta-nav-on .stop-pin,
#listingMap.peta-nav-on .veh-label,
#listingMap.peta-nav-on .home-pin{transform:rotate(calc(-1 * var(--nav-rot, 0deg)))}
@media (prefers-reduced-motion:reduce){
  #listingMap.peta-nav-on .peta-rot-wrap{transition:none}
}

/* Kabar/notif UI dimatikan; aturan lama dibiarkan untuk rollback. */
.trip-notify,.trip-kabar,[data-trip-berangkat],[data-trip-kabar]{display:none!important}
