


#v4-trip-planner {
  position: fixed;
  z-index: 1400;                 
  direction: rtl;
  font-family: 'Heebo', sans-serif;
  background: #fff;
  color: #1f1d18;
  box-shadow: 0 -8px 30px -10px rgba(0,0,0,.35);
  transition: transform .28s ease, opacity .2s ease;
  opacity: 0;
  pointer-events: none;
}
#v4-trip-planner.tp-open { opacity: 1; pointer-events: auto; }


@media (max-width: 780px) {
  #v4-trip-planner {
    left: 0; right: 0; bottom: 0;
    border-radius: 18px 18px 0 0;
    max-height: 82vh; overflow-y: auto;
    transform: translateY(110%);
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  #v4-trip-planner.tp-open { transform: translateY(0); }
  
  #v4-trip-planner.tp-picking { transform: translateY(calc(100% - 70px)); opacity: .96; pointer-events: none; }
}


@media (min-width: 781px) {
  #v4-trip-planner {
    top: 84px; inset-inline-start: 16px;
    width: 340px; max-height: calc(100vh - 120px); overflow-y: auto;
    border-radius: 16px;
    transform: translateY(8px);
  }
  #v4-trip-planner.tp-open { transform: translateY(0); }
  #v4-trip-planner.tp-picking { opacity: .35; pointer-events: none; }
}


#tp-pick-hint {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 62px); left: 50%; transform: translateX(-50%);
  z-index: 1500; background: #0b3d2e; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-family: 'Heebo', sans-serif; font-size: 13.5px; font-weight: 800; direction: rtl;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,.55); pointer-events: none;
}

.tp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #e3ddd1;
  position: sticky; top: 0; background: #fff; border-radius: inherit;
}
.tp-title { font-size: 16px; font-weight: 800; color: #0b3d2e; }
.tp-x {
  background: #f2efe6; border: 0; border-radius: 99px; width: 30px; height: 30px;
  font-size: 15px; cursor: pointer; color: #5C5648;
}
.tp-x:hover { background: #e9e4d7; }

.tp-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

.tp-field { background: #faf8f2; border: 1px solid #e9e4d7; border-radius: 12px; padding: 10px 11px; }
.tp-field-label { font-size: 12px; font-weight: 800; color: #5C5648; margin-bottom: 6px; }
.tp-search-row { display: flex; gap: 6px; }
.tp-point-input {
  flex: 1; min-width: 0; box-sizing: border-box; padding: 9px 10px;
  border: 1px solid #d6cfbe; border-radius: 8px; font: inherit; font-size: 13px;
  background: #fff; color: #1f1d18; direction: rtl;
}
.tp-point-input:focus { outline: none; border-color: #0F6E56; }
.tp-point-input.tp-set { border-color: #cdeede; background: #f2faf6; font-weight: 600; }
.tp-search-btn {
  flex: 0 0 auto; width: 42px; background: #0b3d2e; color: #fff; border: 0;
  border-radius: 8px; font-size: 15px; cursor: pointer;
}
.tp-search-btn:hover { background: #0F6E56; }
.tp-search-results { display: none; margin-top: 6px; }
.tp-search-results.tp-open { display: block; }
.tp-res-item {
  display: block; width: 100%; text-align: right; background: #fff;
  border: 1px solid #e9e4d7; border-radius: 8px; padding: 8px 10px; margin-bottom: 5px;
  font: inherit; font-size: 12.5px; color: #1f1d18; cursor: pointer;
}
.tp-res-item:hover { border-color: #0F6E56; background: #f2faf6; }
.tp-res-loading, .tp-res-empty { font-size: 12px; color: #5C5648; padding: 6px 2px; }
.tp-actions { display: flex; gap: 6px; margin-top: 7px; }
.tp-btn {
  flex: 1; background: #fff; border: 1px solid #d6cfbe; border-radius: 8px;
  padding: 8px 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: #0b3d2e;
  cursor: pointer; white-space: nowrap;
}
.tp-btn:hover { border-color: #0F6E56; background: #f2faf6; }
.tp-places {
  width: 100%; margin-top: 7px; box-sizing: border-box;
  padding: 8px 10px; border: 1px solid #d6cfbe; border-radius: 8px;
  font: inherit; font-size: 12.5px; background: #fff; color: #1f1d18; direction: rtl;
}

.tp-swap-row { display: flex; justify-content: center; margin: -2px 0; }
.tp-swap {
  background: #f2efe6; border: 1px solid #e3ddd1; border-radius: 99px;
  padding: 4px 14px; font: inherit; font-size: 12px; font-weight: 700; color: #5C5648; cursor: pointer;
}
.tp-swap:hover { background: #e9e4d7; }

.tp-go {
  background: #0b3d2e; color: #fff; border: 0; border-radius: 11px;
  padding: 13px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; margin-top: 2px;
}
.tp-go:hover { background: #0F6E56; }
.tp-go:disabled { opacity: .6; cursor: default; }

.tp-status { font-size: 12.5px; font-weight: 600; min-height: 16px; text-align: center; color: #5C5648; }

.tp-result {
  background: #f2faf6; border: 1px solid #bfe6d3; border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}





.tp-result[hidden] { display: none; }
.tp-res-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tp-res-time { font-size: 20px; font-weight: 800; color: #0b3d2e; }
.tp-res-dist { font-size: 14px; font-weight: 700; color: #5C5648; }
.tp-res-summary { font-size: 12px; color: #5C5648; line-height: 1.4; }
.tp-res-nav { display: flex; gap: 7px; flex-wrap: wrap; }
.tp-navbtn {
  flex: 1; text-align: center; text-decoration: none; cursor: pointer;
  border-radius: 8px; padding: 9px 8px; font: inherit; font-size: 13px; font-weight: 700; border: 0;
}
.tp-waze { background: #33ccff; color: #063; }
.tp-gmaps { background: #1a73e8; color: #fff; }
.tp-clear { background: #fff; color: #b91c1c; border: 1px solid #f0cccc; }
.tp-clear:hover { background: #fdf0f0; }


.tp-layers { border-top: 1px dashed #bfe6d3; margin-top: 2px; padding-top: 10px; }
.tp-layers-h { font-size: 13.5px; font-weight: 800; color: #0b3d2e; }
.tp-layers-sub { font-size: 11.5px; color: #5C5648; margin-top: 1px; }
.tp-km { display: flex; gap: 6px; margin-top: 9px; }
.tp-km-btn {
  flex: 1; background: #fff; border: 1.5px solid #d6cfbe; border-radius: 999px;
  padding: 6px 4px; font: inherit; font-size: 12px; font-weight: 700; color: #5C5648; cursor: pointer;
}
.tp-km-btn:hover { border-color: #0F6E56; }
.tp-km-btn.on { background: #0b3d2e; color: #fff; border-color: #0b3d2e; }
.tp-layers-list { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.tp-lyr {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: start;
  background: #fff; border: 1.5px solid #e3ddd1; border-radius: 10px; padding: 7px 9px;
  font: inherit; cursor: pointer; color: #1f1d18;
}
.tp-lyr:hover { border-color: #0F6E56; background: #f7fbf9; }
.tp-lyr.on { border-color: #0F6E56; background: #f2faf6; }
.tp-lyr.tp-lyr-busy { opacity: .55; pointer-events: none; }
.tp-lyr-ic {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
  color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.tp-lyr-nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-lyr-cb {
  flex: 0 0 auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #0F6E56; background: transparent;
}
.tp-lyr.on .tp-lyr-cb { background: #0F6E56; color: #fff; }



.tp-printbtn{width:100%;margin-top:9px;border:0;background:#0F6E56;color:#fff;border-radius:10px;
  padding:9px;font:inherit;font-size:13px;font-weight:800;cursor:pointer}
.tp-printbtn:hover{background:#0b3d2e}
