/* Road trip planner UI – TripPlannerMap.html only */

.leaflet-routing-container { display: none !important; }
#roadTripToggle {
  position: absolute;
  bottom: 80px;
  right: 12px;
  z-index: 1000;
  background: #1e40af;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
#roadTripToggle:hover { background: #1d4ed8; }
.basemap-control {
  bottom: 140px;
}
@media (max-width: 640px) {
  .basemap-control { bottom: 160px; right: 10px; min-width: 132px; }
}
#roadTripPanel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  z-index: 1002;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
#roadTripPanel.open { transform: translateX(0); }
.rtp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #1e40af;
  color: #fff;
  flex-shrink: 0;
}
.rtp-header h2 { font-size: 15px; font-weight: 700; margin: 0; }
.rtp-close-btn { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; padding: 0; }
.rtp-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.rtp-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #6b7280; margin-bottom: 5px; }
.rtp-input-row { display: flex; gap: 6px; }
.rtp-input-row input, .rtp-search-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  width: 100%;
}
.rtp-input-row input:focus, .rtp-search-input:focus { border-color: #2563eb; }
.rtp-btn {
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.rtp-btn:hover { background: #1d4ed8; }
.rtp-btn:disabled { background: #9ca3af; cursor: not-allowed; }
.rtp-btn-full { width: 100%; padding: 10px; font-size: 14px; }
.rtp-loc-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 6px 10px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
}
.rtp-loc-btn:hover { background: #f3f4f6; }
.rtp-status { font-size: 12px; margin-top: 5px; color: #6b7280; min-height: 16px; }
.rtp-end-options { display: flex; flex-direction: column; gap: 4px; }
.rtp-radio { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; color: #374151; }
.rtp-radio input { margin: 0; }
.rtp-max-hint { font-weight: 400; color: #9ca3af; font-size: 11px; }
.rtp-warning { padding: 10px 12px; border-radius: 8px; background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; font-size: 13px; line-height: 1.4; margin-bottom: 8px; }
.rtp-warning::before { content: "⚠ "; }
.waypoint-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}
.wp-num { font-size: 12px; font-weight: 700; color: #fff; background: #2563eb; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wp-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-move { display: flex; flex-direction: column; gap: 0; flex-shrink: 0; }
.wp-up, .wp-down { background: none; border: none; color: #6b7280; cursor: pointer; font-size: 14px; padding: 0; line-height: 1; display: flex; align-items: center; justify-content: center; }
.wp-up:hover, .wp-down:hover { color: #2563eb; }
.wp-up:disabled, .wp-down:disabled { color: #d1d5db; cursor: not-allowed; }
.wp-remove { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 18px; padding: 0; line-height: 1; flex-shrink: 0; }
.wp-remove:hover { color: #ef4444; }
.waypoint-empty { text-align: center; color: #9ca3af; font-size: 13px; padding: 14px 10px; border: 1px dashed #d1d5db; border-radius: 8px; line-height: 1.5; }
.rtp-search-wrapper { position: relative; margin-top: 6px; }
.rtp-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  max-height: 200px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
  margin-top: 2px;
}
.rtp-search-dropdown.visible { display: block; }
.rtp-search-item { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f3f4f6; }
.rtp-search-item:hover { background: #f0f4ff; }
.rtp-search-item:last-child { border-bottom: none; }
#routeSummary {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px;
  display: none;
  max-height: min(42vh, 360px);
  overflow-y: auto;
}
.rtp-directions { margin-top: 12px; padding-top: 10px; border-top: 1px solid #bae6fd; }
.rtp-dir-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #6b7280; margin-bottom: 8px; }
.rtp-dir-list { list-style: none; margin: 0; padding: 0; }
.rtp-dir-step { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px 8px; align-items: start; padding: 7px 0; border-bottom: 1px solid #e0f2fe; font-size: 12px; line-height: 1.35; color: #374151; }
.rtp-dir-step:last-child { border-bottom: none; }
.rtp-dir-num { font-weight: 700; color: #2563eb; font-size: 11px; padding-top: 1px; }
.rtp-dir-dist { font-size: 11px; color: #64748b; white-space: nowrap; }
.rtp-calc-hint { font-size: 12px; color: #6b7280; margin-top: 8px; line-height: 1.4; min-height: 1.2em; }
.rtp-calc-hint.rtp-calc-hint-warn { color: #b45309; }
.rtp-sum-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #0369a1; font-weight: 600; margin-bottom: 4px; }
.rtp-sum-row:last-child { margin-bottom: 0; }
#rtpClearBtn {
  width: 100%;
  margin-top: 6px;
  padding: 7px 14px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  color: #6b7280;
}
#rtpClearBtn:hover { background: #fee2e2; border-color: #fca5a5; color: #ef4444; }
.rtp-add-btn {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.rtp-add-btn:hover { background: #dbeafe; }
@media (max-width: 768px) {
  #roadTripPanel { width: 100%; }
  #roadTripToggle { bottom: 100px; right: 10px; padding: 8px 12px; font-size: 13px; }
}
