/* The planner, the mountain index in search, and a place's page. Same language as style.css (dark glass,
   one alpenglow accent); kept in its own file while several people edit style.css. */

/* ---------- Search: places first ---------- */
.place-hit {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent;
  border-radius: 12px; padding: 8px 8px 8px 6px;
}
.place-hit:hover, #search-results .active { background: rgba(255, 255, 255, 0.1); }
#search-results .active { box-shadow: inset 0 0 0 1px var(--accent); }
.place-hit > svg { width: 34px; height: 34px; padding: 8px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.place-hit span { display: grid; gap: 1px; min-width: 0; flex: 1; }
.place-hit b { font-family: var(--display); font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-hit small { color: var(--ink-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-hit em { font-style: normal; color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; flex: none; }
#search-results .place-row { border-bottom: 0; border-top: 0.5px solid var(--hairline); margin-top: 8px; color: var(--ink-2); font-size: 13px; }

/* ---------- A place's page ---------- */
.place-names { color: var(--ink-2); margin: 4px 0 0; font-size: 13px; }
#place .actions { grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.place-pin { display: grid; justify-items: center; pointer-events: none; }
.place-pin b {
  font-family: var(--display); font-size: 12.5px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px;
  padding: 3px 10px; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.place-pin i { width: 2px; height: 22px; background: var(--accent); }
.place-pin::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); margin-top: -2px; }

/* ---------- Plan ---------- */
/* Explore's activity chips and filters choose what the map lists; the planner has its own activity. */
body[data-view="plan"] .chips-row, body[data-view="plan"] #filters { display: none; }
.plan-sport { padding: 4px 0 10px; }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 2px; font-size: 13px; color: var(--ink-2); }
.plan-row .seg { flex: none; }
.plan-row .seg button { padding: 5px 11px; }
.plan-note { font-size: 12px; line-height: 1.45; color: var(--ink-3); margin: 8px 2px 14px; }

.plan-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.plan-points li { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 11px; padding: 7px 4px 7px 10px; }
.plan-points li span { display: grid; min-width: 0; flex: 1; }
.plan-points li b { font-family: var(--display); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-points li small { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.plan-points .plan-empty { display: block; padding: 12px 14px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; box-shadow: inset 0 0 0 1px rgba(255, 106, 61, 0.45); background: var(--accent-soft); }
.plan-points .plan-empty b { font-family: inherit; display: inline; color: var(--ink); font-size: inherit; }

/* A point of the itinerary, in the list and on the map: A, 2, 3... B. */
.plan-wp {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #101218; border: 2.5px solid var(--accent); font: 700 11px/1 var(--display); font-style: normal;
}
.plan-wp.start { background: #34c759; border-color: #fff; color: #fff; }
.plan-wp.end { background: #101218; border-color: #fff; color: #fff; }
.maplibregl-marker.plan-wp { cursor: grab; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

.plan-add { position: relative; margin: 6px 0 2px; }
.plan-add input { width: 100%; border: 0; background: var(--fill); border-radius: 10px; padding: 9px 11px; font-size: 14px; outline: none; }
.plan-add input::placeholder { color: var(--ink-3); }
.plan-add input:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.plan-suggest { display: grid; gap: 2px; margin-top: 4px; background: var(--card); border-radius: 11px; padding: 4px; }
.plan-suggest button { display: grid; gap: 1px; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 6px 8px; }
.plan-suggest button:hover { background: rgba(255, 255, 255, 0.1); }
.plan-suggest b { font-weight: 600; font-size: 13.5px; }
.plan-suggest small { color: var(--ink-2); font-size: 12px; }
.plan-suggest .empty { margin: 6px 8px; }
.plan-tools .pill { padding: 6px 12px; }
.plan-warning { font-size: 12.5px; line-height: 1.45; color: #ffd9a8; background: rgba(243, 148, 25, 0.16); border-radius: 10px; padding: 8px 10px; margin: 0 0 4px; }

/* What to do next, on the map itself. */
.plan-banner {
  position: fixed; z-index: 2; top: 66px;
  left: calc(var(--side) + var(--gap) + (100vw - var(--side) - var(--gap)) / 2); transform: translateX(-50%);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 550; white-space: nowrap; pointer-events: none;
  max-width: calc(100vw - var(--side) - 150px); overflow: hidden; text-overflow: ellipsis;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 106, 61, 0.55);
}
.plan-banner.busy::before {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; vertical-align: -1px; border-radius: 50%;
  border: 2px solid var(--accent); border-top-color: transparent; animation: plan-spin 0.8s linear infinite;
}
@keyframes plan-spin { to { transform: rotate(360deg); } }
body.flying .plan-banner { opacity: 0; }
@media (max-width: 760px) {
  .plan-banner { top: calc(60px + env(safe-area-inset-top)); left: 10px; transform: none; max-width: calc(100vw - 70px); }
}
@media (prefers-reduced-motion: reduce) { .plan-banner.busy::before { animation: none; } }
