/* Maps offered for free time — the picker, the owner's chips, the guest's cards. */

/* The picker, inside the stop form. Matches the visit-details fieldset beside it. */
.itinerary-idea-picker {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: #f5f7fa;
}
.itinerary-idea-picker legend { padding-inline: 0.3rem; font-size: 0.8rem; font-weight: 600; }
.itinerary-idea-picker .field-hint { margin: 0; font-size: 0.75rem; line-height: 1.5; }
/* A long library scrolls inside the form rather than pushing the submit button
   off the screen. */
.itinerary-idea-picker__list {
  display: grid;
  gap: 0.1rem;
  max-height: 14rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
}
.itinerary-idea-picker__option { padding: 0.45rem 0.7rem; }
.itinerary-idea-picker__option:has(input[type="checkbox"]:checked) { background: var(--accent-wash); }
/* A Map's title is the owner's own words and must read as they wrote them.
   `.itinerary-form__row label` sets every label in the editor uppercase, and
   this fieldset is a form row, so the override has to out-specify it — an
   equal-weight selector here would lose in silence, because `ideas.css` is
   bundled before `itineraries.css`. */
.itinerary-idea-picker label.itinerary-idea-picker__pick {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
}
.itinerary-idea-picker__pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  /* A comfortable touch target: the owner picks these on a phone too. */
  padding-block: 0.25rem;
  cursor: pointer;
}
.itinerary-idea-picker__pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
/* The line only matters once a Map is picked, so it stays out of the way
   until then rather than doubling the height of every row. */
.itinerary-idea-picker__line {
  width: 100%;
  margin-top: 0.3rem;
  font-size: 0.75rem;
}
.itinerary-idea-picker__option:not(:has(input[type="checkbox"]:checked)) .itinerary-idea-picker__line {
  display: none;
}
.itinerary-idea-picker__title { font-size: 0.85rem; overflow-wrap: anywhere; }
.itinerary-idea-picker__count { color: var(--ink-soft); font-size: 0.7rem; white-space: nowrap; }
.itinerary-idea-picker__empty { margin: 0; color: var(--ink-soft); font-size: 0.8rem; }

/* The owner's own view of a stop: a short list, not cards. They know their
   own library; what they need here is which Maps this stop offers. */
.itinerary-item__ideas {
  display: grid;
  gap: 0.15rem;
  margin: 0.5rem 0 0;
  padding: 0 0 0 0.6rem;
  border-left: 2px solid var(--line);
  list-style: none;
}
.itinerary-item__idea { font-size: 0.72rem; line-height: 1.5; }
.itinerary-item__idea-map { color: var(--accent); text-decoration: none; }
.itinerary-item__idea-map:hover { text-decoration: underline; }
.itinerary-item__idea-note { color: var(--ink-soft); }
.itinerary-item__idea-note::before { content: " — "; }

/* The guest's view: a card per Map, under the stop it belongs to. */
.itinerary-deck__ideas { margin: 0.8rem 0 0; }
.itinerary-deck__ideas-label {
  margin: 0 0 0.5rem;
  color: var(--muted, var(--ink-soft));
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.itinerary-deck__idea-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.itinerary-deck__idea-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.itinerary-deck__idea-link:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.itinerary-deck__idea-link--closed { cursor: default; }
.itinerary-deck__idea-cover {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--surface-soft);
}
.itinerary-deck__idea-cover img { width: 100%; height: 100%; object-fit: cover; }
.itinerary-deck__idea-body { display: grid; gap: 0.15rem; min-width: 0; }
.itinerary-deck__idea-title { font-size: 0.85rem; font-weight: 600; overflow-wrap: anywhere; }
.itinerary-deck__idea-count { color: var(--muted, var(--ink-soft)); font-size: 0.7rem; }
.itinerary-deck__idea-note { color: var(--muted, var(--ink-soft)); font-size: 0.75rem; line-height: 1.5; }

@media (max-width: 850px) {
  .itinerary-idea-picker__list { max-height: 13rem; }
}

/* A Map that stays shut on a public deck: the hook, and a way to ask. */
.itinerary-deck__idea-link--locked { cursor: default; background: var(--surface-soft); }
.itinerary-deck__idea-cover--locked {
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}
.itinerary-deck__idea-cover--locked svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.itinerary-deck__idea-invite {
  margin: 0.5rem 0 0;
  color: var(--muted, var(--ink-soft));
  font-size: 0.75rem;
  line-height: 1.5;
}
.itinerary-deck__idea-invite a { color: var(--accent); }
