/* Maps by Funk — Atlas: trips (trips.js). Tokens from styles.css.
   "Been" is teal and solid, like the video pins. "Want to go" is amber and
   hollow. The two must never be mistakable for each other at a glance. */

:root {
  --wish: #e8b877;
}

.trip-list,
.trip-stops {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-card a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--near-black);
  text-decoration: none;
  color: inherit;
}

.trip-card a:hover {
  border-color: var(--teal-deep);
  background: var(--surface-hi);
}

.trip-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-card-head b {
  font-family: var(--f-display);
  font-size: 14.5px;
  flex: 1;
  min-width: 0;
}

.trip-card-meta,
.trip-card-note {
  font-size: 11.5px;
  color: var(--text-faint);
}

.trip-card-note {
  color: var(--text-dim);
}

.trip-status {
  padding: 2px 8px;
  border-radius: 9px;
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.trip-status-done {
  background: rgba(103, 203, 166, 0.18);
  color: var(--teal);
}

.trip-status-planned {
  background: rgba(232, 184, 119, 0.16);
  color: var(--wish);
}

.trip-status-ongoing {
  background: rgba(244, 244, 244, 0.12);
  color: var(--text-dim);
}

/* The little route rail on a trip card. */
.trip-rail {
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.trip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.trip-dot-been {
  background: var(--teal);
}

.trip-dot-planned {
  background: transparent;
  border: 1.5px solid var(--wish);
}

.trip-leg {
  flex: 1;
  max-width: 26px;
  height: 1px;
  background: var(--line);
}

/* ---------- the trip page ---------- */

.trip-view h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trip-stops {
  gap: 0;
}

.trip-stop {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.trip-stop:last-child {
  border-bottom: 0;
}

/* The vertical rail joining the numbered stops. */
.trip-stop:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 40px;
  bottom: -4px;
  width: 1px;
  background: var(--line);
}

.trip-stop-mark {
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 700;
  z-index: 1;
}

.trip-stop-been .trip-stop-mark {
  background: var(--teal);
  color: var(--near-black);
}

.trip-stop-planned .trip-stop-mark {
  background: var(--near-black);
  border: 1.5px dashed var(--wish);
  color: var(--wish);
}

.trip-stop-body {
  flex: 1;
  min-width: 0;
}

.trip-stop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-stop-head b {
  font-family: var(--f-display);
  font-size: 15px;
}

.trip-scope {
  padding: 1px 7px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trip-stop-state {
  font-size: 11.5px;
  color: var(--text-faint);
}

.trip-stop-planned .trip-stop-state {
  color: var(--wish);
}

.trip-stop-note {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.trip-stop.is-flash {
  background: rgba(103, 203, 166, 0.08);
}

.trip-videos {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.trip-videos a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.trip-videos img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-hi);
}

.trip-videos span {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trip-videos a:hover span {
  color: var(--text);
}

.trip-more {
  align-self: center;
  font-size: 11.5px;
  color: var(--text-faint);
}

.trip-empty {
  padding: 12px 0;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- markers on the trip map ---------- */

.trip-marker {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.trip-marker-n {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 0 1.5px var(--near-black);
}

.trip-marker-been .trip-marker-n {
  background: var(--teal);
  color: var(--near-black);
}

.trip-marker-planned .trip-marker-n {
  background: var(--near-black);
  border: 1.5px dashed var(--wish);
  color: var(--wish);
}

.trip-marker-name {
  font-family: var(--f-display);
  font-size: 11.5px;
  color: var(--off-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.lg-been {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

/* ---------- the wishlist layer on the main map ---------- */

.wish-marker {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: 11.5px;
  color: var(--wish);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.chip.chip-wish[aria-pressed="true"] {
  background: rgba(232, 184, 119, 0.2);
  border-color: var(--wish);
  color: var(--wish);
}

.chip.chip-wish .cv-wish-diamond {
  margin-right: 2px;
}

/* ---------- the trip editor (Studio) ---------- */

.tf-stops {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.tf-stop {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: var(--near-black);
  border-bottom: 1px solid var(--line);
}

.tf-stop:last-child {
  border-bottom: 0;
}

.tf-stop.is-dragging {
  opacity: 0.5;
}

.tf-grip {
  cursor: grab;
  color: var(--text-faint);
  font-size: 14px;
  touch-action: none;
  user-select: none;
}

.tf-n {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-hi);
  font-size: 11px;
  font-weight: 700;
}

.tf-body {
  flex: 1;
  min-width: 0;
}

.tf-body b {
  display: block;
  font-size: 13.5px;
}

.tf-body span {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-move {
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
}

.tf-move:hover:not(:disabled) {
  border-color: var(--teal-deep);
  color: var(--teal);
}

.tf-move:disabled {
  opacity: 0.3;
}

.tf-remove:hover {
  border-color: #b4574f;
  color: #e08d85;
}

.tf-empty {
  padding: 14px 10px;
  background: var(--near-black);
  color: var(--text-faint);
  font-size: 12.5px;
  text-align: center;
}

.tf-hint b {
  color: var(--text-dim);
}

.tf-country-list button.is-chosen {
  background: rgba(103, 203, 166, 0.18);
  outline: 1px solid var(--teal);
}

.tf-wish-pick {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tf-wish-pick label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.tf-wish-pick label:hover {
  background: var(--surface-hi);
}

.tf-wish-pick > li > label > span {
  flex: 1;
  min-width: 0;
}

.tf-wish-pick b {
  font-size: 13.5px;
}

.tf-wish-pick em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ---------- "part of a trip" on a video page ---------- */

.vv-trips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
}

.vv-trip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "kicker title"
    "rail   meta";
  align-items: center;
  gap: 3px 9px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal-deep);
  border-radius: 8px;
  background: var(--near-black);
  text-decoration: none;
  color: inherit;
}

.vv-trip:hover {
  border-color: var(--teal-deep);
  background: var(--surface-hi);
}

.vv-trip-kicker {
  grid-area: kicker;
  font-family: var(--f-display);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.vv-trip-title {
  grid-area: title;
  font-family: var(--f-display);
  font-size: 14.5px;
  color: var(--teal);
}

.vv-trip .trip-rail {
  grid-area: rail;
  margin: 0;
}

.vv-trip-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-faint);
}

/* The stop you are actually looking at. */
.trip-dot.is-here {
  outline: 2px solid var(--off-white);
  outline-offset: 1px;
}

/* ---------- the trip bar on the main map ---------- */

.trips-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.trips-bar[hidden] {
  display: none;
}

.trips-bar-label {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-right: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.chip.chip-trip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip-trip-title {
  font-family: var(--f-display);
}

.chip.chip-trip .trip-rail {
  margin-top: 0;
}

.chip.chip-trip[aria-pressed="true"] {
  background: rgba(103, 203, 166, 0.2);
  border-color: var(--teal);
  color: var(--teal);
}

.chip.chip-trip-open {
  text-decoration: none;
}

.chip.chip-trip-clear {
  width: 28px;
  padding: 0;
  text-align: center;
  font-size: 15px;
  line-height: 1;
}

/* ---------- trip card actions ---------- */

.trip-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--near-black);
}

.trip-card.is-showing {
  border-color: var(--teal);
  background: rgba(103, 203, 166, 0.07);
}

.trip-card-link {
  flex: 1;
  min-width: 0;
  font-family: var(--f-display);
  font-size: 14.5px;
  color: var(--text);
  text-decoration: none;
}

.trip-card-link:hover {
  color: var(--teal);
}

.trip-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.trip-zoom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 10px;
  border: 1px solid var(--teal-deep);
  border-radius: 5px;
  background: transparent;
  color: var(--teal);
  font-family: var(--f-display);
  font-size: 11.5px;
}

.trip-zoom:hover {
  background: rgba(103, 203, 166, 0.14);
}

.trip-card.is-showing .trip-zoom {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--near-black);
}

.trip-open {
  font-size: 11.5px;
  color: var(--text-faint);
  text-decoration: none;
}

.trip-open:hover {
  color: var(--text);
}

/* ---------- trip control in the panel head ---------- */

.trips-bar[hidden] {
  display: none;
}

.trip-select {
  width: 100%;
}

.trip-active {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--teal-deep);
  border-radius: 6px;
  background: rgba(103, 203, 166, 0.1);
}

.trip-active-mark {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--teal);
}

.trip-active-title {
  flex: 1;
  min-width: 0;
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--teal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-active-open {
  font-size: 11.5px;
  color: var(--text-dim);
  text-decoration: none;
}

.trip-active-open:hover {
  color: var(--text);
}

.trip-active-clear {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

.trip-active-clear:hover {
  color: var(--text);
}

/* ---------- the route block at the top of the list ---------- */

.panel-route {
  margin: 0 0 6px;
  padding: 10px 12px 4px;
  border-bottom: 1px solid var(--line);
  background: var(--near-black);
}

.panel-route-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.panel-route-head b {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.panel-route-head span {
  font-size: 11px;
  color: var(--text-faint);
}

.panel-stops {
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel-stop {
  position: relative;
}

/* The rail joining the stops, as on the trip page. */
.panel-stop:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.panel-stop button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  color: inherit;
}

.panel-stop button:hover {
  background: var(--surface-hi);
}

.panel-stop-n {
  width: 23px;
  height: 23px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 700;
  z-index: 1;
}

.panel-stop-been .panel-stop-n {
  background: var(--teal);
  color: var(--near-black);
}

.panel-stop-planned .panel-stop-n {
  background: var(--near-black);
  border: 1.5px dashed var(--wish);
  color: var(--wish);
}

.panel-stop-body {
  flex: 1;
  min-width: 0;
}

.panel-stop-body b {
  display: block;
  font-size: 13px;
}

.panel-stop-body > span {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-stop-planned .panel-stop-body > span {
  color: var(--wish);
}

/* ---------- map tools ---------- */

.map-tools {
  position: absolute;
  left: 12px;
  bottom: 52px;
  z-index: 5;
  display: flex;
  gap: 6px;
}

.chip.chip-tool[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--near-black);
  font-weight: 700;
}

/* The pin dropped by the add-a-place tool, before it is saved. */
.add-pin {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--wish);
  border: 2px solid var(--near-black);
  box-shadow: 0 0 0 1px var(--wish);
}

.pf-note-full {
  margin: 0;
  padding: 8px 12px;
  border-radius: 5px;
  background: rgba(232, 184, 119, 0.14);
  border: 1px solid var(--wish);
  color: var(--wish);
  font-size: 12.5px;
}

/* ---------- wishlist / been, on the selected trip ---------- */

.trip-mark {
  display: flex;
  gap: 0;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.trip-mark-btn {
  flex: 1;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--f-display);
  font-size: 11.5px;
}

.trip-mark-btn + .trip-mark-btn {
  border-left: 1px solid var(--line);
}

.trip-mark-btn:hover {
  background: var(--surface-hi);
  color: var(--text);
}

.trip-mark-wishlist[aria-pressed="true"] {
  background: rgba(232, 184, 119, 0.2);
  color: var(--wish);
  font-weight: 700;
}

.trip-mark-done[aria-pressed="true"] {
  background: rgba(103, 203, 166, 0.2);
  color: var(--teal);
  font-weight: 700;
}

@media (max-width: 760px) {
  .map-tools {
    bottom: 46px;
  }
}

/* ---------- places layer ---------- */

.chip.chip-places[aria-pressed="true"] {
  background: rgba(103, 203, 166, 0.2);
  border-color: var(--teal);
  color: var(--teal);
}

.places-status {
  position: absolute;
  left: 12px;
  bottom: 88px;
  z-index: 5;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(17, 21, 23, 0.88);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-dim);
}

.places-status[hidden] {
  display: none;
}

/* ---------- the place card (places.js) ---------- */

.place-card .maplibregl-popup-content {
  padding: 0;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--teal-deep);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.place-card .maplibregl-popup-tip {
  border-top-color: var(--teal-deep);
  border-bottom-color: var(--teal-deep);
}

.place-card .maplibregl-popup-close-button {
  right: 2px;
  top: 0;
  color: var(--text-faint);
  font-size: 17px;
  background: none;
}

.place-card .maplibregl-popup-close-button:hover {
  color: var(--text);
  background: none;
}

.pc-body {
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pc-name {
  font-family: var(--f-display);
  font-size: 14px;
  padding-right: 14px;
}

.pc-type {
  font-size: 11.5px;
  color: var(--teal);
}

.pc-src {
  font-size: 10px;
  color: var(--text-faint);
}

.pc-add {
  display: block;
  width: 100%;
  height: 32px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--near-black);
  color: var(--teal);
  font-family: var(--f-display);
  font-size: 12.5px;
}

.pc-add:hover {
  background: rgba(103, 203, 166, 0.14);
}

.pc-add.is-saved {
  color: var(--text-faint);
}

/* ---------- itinerary ---------- */

.trip-range {
  margin: 2px 0 0;
  font-family: var(--f-display);
  font-size: 12.5px;
  color: var(--wish);
}

.itin-day {
  margin-bottom: 14px;
}

.itin-day h3 {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 2px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--teal-deep);
  font-family: var(--f-display);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-dim);
}

.itin-day-n {
  font-weight: 700;
  font-size: 13px;
  color: var(--teal);
}

.itin-day-open .itin-day-n {
  color: var(--wish);
}

.itin-day-open h3 {
  border-bottom-color: var(--wish);
}

.trip-date input[type="date"] {
  height: 24px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--near-black);
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  color-scheme: dark;
}

.trip-date input[type="date"]:hover,
.trip-date input[type="date"]:focus {
  border-color: var(--teal);
  color: var(--text);
  outline: none;
}

.trip-date-static {
  font-size: 11px;
  color: var(--wish);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- printing ---------- */

#print-root {
  display: none;
}

@media print {
  body.is-printing > *:not(#print-root) {
    display: none !important;
  }

  body.is-printing #print-root {
    display: block;
    position: static;
    background: #fff;
    color: #111;
  }

  body.is-printing {
    background: #fff;
    overflow: visible;
    height: auto;
  }
}
