/* Shared trip timeline and editor, including the standalone preview. */
.trip-plan {
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(135deg, #151e28, #11161d);
  padding: 18px;
  box-shadow: var(--shadow);
}
.trip-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.trip-heading h2 {
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.02em;
}
.trip-caption {
  font-size: 11px;
  color: var(--muted);
}
.trip-scroll {
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-width: thin;
  scrollbar-color: #44536a #11161d;
}
.trip-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.trip-track {
  position: relative;
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: 20px;
  isolation: isolate;
}
.trip-track:before {
  content: "";
  position: absolute;
  top: 41px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: #3c4a60;
  z-index: -1;
}
.route-group {
  position: relative;
  display: flex;
  flex: 1;
  gap: 20px;
  padding-top: 30px;
}
.route-direction {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  color: #9baac0;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.route-stop,
.route-stay {
  position: relative;
  min-width: 120px;
  max-width: 160px;
  flex: 1;
  text-align: center;
  padding: 30px 6px 0;
}
.route-stop:before,
.route-stay:before {
  content: "";
  position: absolute;
  top: 5px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a5b6f4;
  border: 3px solid #263450;
  box-shadow: 0 0 0 3px #141d28;
}
.route-stop.empty:before {
  background: #141d28;
  border: 2px dashed #72829d;
}
.route-place {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.route-time {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: #cfdaff;
}
.route-stop.empty .route-place {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.route-stay {
  margin-top: 30px;
  min-width: 125px;
  max-width: 145px;
  color: #b9edce;
}
.route-stay:before {
  left: calc(50% - 18px);
  width: 36px;
  border-radius: 10px;
  background: #62d69a;
  border-color: #284d3b;
}
.route-stay .route-time {
  font-size: 12px;
  color: #a9c6b6;
  font-weight: 600;
  letter-spacing: 0;
}
.trip-editor {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.trip-editor[hidden] {
  display: none;
}
.trip-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.trip-editor-head strong {
  font-size: 13px;
}
.trip-editor-head .btn {
  padding: 0 10px;
  font-size: 12px;
}
.trip-editor-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.trip-editor-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #111720;
}
.trip-editor-group h3 {
  font-size: 12px;
  margin: 0 0 12px;
  color: #bcc9dc;
}
.trip-stop-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 105px 34px;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}
.trip-stop-editor label {
  display: grid;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  min-width: 0;
}
.trip-stop-editor input {
  height: 38px;
  min-width: 0;
  font-size: 13px;
  padding: 0 9px;
  border-radius: 9px;
}
.trip-stop-editor .btn {
  height: 38px;
  border-radius: 9px;
}
.trip-add {
  width: 100%;
  font-size: 12px;
  color: #cfdaff;
  border-style: dashed;
}
.trip-message {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 12px;
  color: var(--muted);
}
.trip-empty-editor {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}
.trip-stop-editor input[data-dirty="true"] {
  border-color: #a6b4dc;
}
@media (max-width: 760px) {
  .trip-plan {
    padding: 14px 12px;
    margin-bottom: 22px;
  }
  .trip-editor-columns {
    grid-template-columns: 1fr;
  }
  .trip-heading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }
  .trip-track {
    gap: 12px;
  }
  .route-group {
    gap: 12px;
  }
  .route-stop {
    min-width: 112px;
    max-width: 140px;
  }
  .trip-stop-editor {
    grid-template-columns: minmax(0, 1fr) 100px 34px;
  }
}

.edit-mode-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.edit-mode-bar[hidden],
#productForm[hidden] {
  display: none;
}
.edit-mode-bar .btn {
  padding: 0 14px;
  font-size: 12px;
}
.edit-mode-bar .btn[aria-pressed="true"] {
  border-color: #7c8cff;
  color: #cdd7ff;
  background: #202a40;
}
