/* plan-extras.css - additions for the built-out "Plan My Evening" concierge.
 * Adds: the date + time-window controls, the two-column results/panel layout,
 * the "Your plan" side panel with a county map of numbered stops, per-stop pin
 * controls, the "build around my picks" bar, and the rebuild loading animation.
 * Brand: paper/cream + red (--red), Playfair (--display) / EB Garamond (--body).
 * Only .pl-* hooks; reuses the palette tokens already defined in bulletin.css. */

/* ---- When: date picker + time window ---- */
.pl-or { font-family: var(--body); font-style: italic; color: var(--ink-faint); font-size: 14px; margin: 0 2px; }
.pl-date-wrap { font-family: var(--stamp); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 7px; }
.pl-date, .pl-time-in {
  font-family: var(--body); font-size: 15px; padding: 6px 9px;
  border: 1px solid var(--rule-soft); background: var(--paper); border-radius: 4px; color: var(--ink);
}
.pl-date.on, .pl-time-in.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.pl-time-row { padding-top: 2px; }
.pl-time-sep { font-family: var(--body); font-style: italic; color: var(--ink-faint); font-size: 14px; }
.pl-time-hint { font-family: var(--body); font-style: italic; color: var(--ink-faint); font-size: 13px; }
.pl-date-clear, .pl-time-clear { padding: 3px 10px; font-size: 16px; line-height: 1; color: var(--ink-soft); }
.pl-date-clear:hover, .pl-time-clear:hover { color: var(--red); border-color: var(--red); }

/* ---- two-column layout: plans on the left, sticky "Your plan" panel on the right ---- */
.pl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; margin-top: 4px; }
.pl-results-col { min-width: 0; }

/* ---- "build around my picks" action bar (above the plans) ---- */
.pl-rebuild-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin: 18px 0 2px; padding: 11px 14px;
  background: #faf6ea; border: 1px solid var(--rule-soft); border-left: 4px solid var(--red);
}
.pl-pin-note { font-family: var(--body); font-style: italic; color: var(--ink-soft); font-size: 14.5px; flex: 1 1 auto; min-width: 160px; }
.pl-pin-note b { font-style: normal; color: var(--red); }
.pl-btn.pl-rebuild-btn { background: var(--red); color: #fff; border-color: var(--red); font-family: var(--display); letter-spacing: 0.02em; }
.pl-clear-pins { font-size: 13.5px; padding: 6px 12px; }

/* ---- per-stop pin control ---- */
.pl-stop { padding-left: 30px !important; }
.pl-pin {
  position: absolute; left: 0; top: 12px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--rule-soft); background: var(--paper);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-size: 12px; line-height: 1; padding: 0;
  transition: all .12s ease;
}
.pl-pin:hover { border-color: var(--red); color: var(--red); }
.pl-pin.on { background: var(--red); border-color: var(--red); color: #fff; }
.pl-pin:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.pl-stop.pl-pinned { background: rgba(168, 42, 22, .06); }

/* ---- "Your plan" panel ---- */
.pl-panel {
  position: sticky; top: 14px; align-self: start;
  border: 1px solid var(--rule-soft); border-top: 4px solid var(--ink);
  background: #faf6ea; padding: 15px 16px 16px;
}
.pl-panel-h { font-family: var(--display); font-size: 23px; margin: 0 0 2px; }
.pl-panel-sub { font-family: var(--body); font-style: italic; color: var(--ink-faint); font-size: 13.5px; margin: 0 0 12px; }

/* county map of the night's stops */
.pl-map {
  position: relative; width: 100%; aspect-ratio: 100 / 92;
  background: #f7f2e7 url("county-base.svg") center/100% 100% no-repeat;
  border: 1px solid var(--rule-soft); border-radius: 4px; margin-bottom: 12px;
}
.pl-map.is-empty { opacity: .5; }
.pl-map-dot {
  position: absolute; transform: translate(-50%, -50%);
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.35);
  color: #fff; font-family: var(--display); font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.pl-map-line { position: absolute; height: 0; border-top: 1.5px dashed var(--red); transform-origin: 0 50%; opacity: .55; pointer-events: none; }

/* the sequenced list in the panel */
.pl-panel-list { list-style: none; margin: 0; padding: 0; }
.pl-panel-item { display: grid; grid-template-columns: 24px 1fr; gap: 9px; padding: 9px 0; border-bottom: 1px dotted var(--rule-soft); align-items: start; }
.pl-panel-item:last-child { border-bottom: 0; }
.pl-panel-num { width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--display); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }
.pl-panel-time { font-family: var(--display); color: var(--red); font-weight: 700; font-size: 14.5px; }
.pl-panel-act { font-family: var(--display); font-size: 15.5px; line-height: 1.1; }
.pl-panel-ven { font-family: var(--body); font-size: 13px; color: var(--ink-soft); }
.pl-panel-hop { font-family: var(--body); font-style: italic; color: var(--ink-faint); font-size: 12.5px; }
.pl-panel-unpin { background: none; border: 0; color: var(--ink-faint); font-size: 12px; cursor: pointer; padding: 2px 0 0; text-decoration: underline; font-family: var(--body); }
.pl-panel-unpin:hover { color: var(--red); }
.pl-panel-foot { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--rule-soft); font-family: var(--body); font-size: 13.5px; color: var(--ink-soft); }
.pl-panel-foot b { color: var(--ink); font-style: normal; }

/* ---- "composing your night" loading shimmer ---- */
.pl-loading { grid-column: 1 / -1; text-align: center; padding: 40px 20px; }
.pl-loading-dots { display: inline-flex; gap: 7px; margin-bottom: 14px; }
.pl-loading-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--red); opacity: .35; animation: pl-pulse 1s ease-in-out infinite; }
.pl-loading-dots span:nth-child(2) { animation-delay: .16s; }
.pl-loading-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes pl-pulse { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
.pl-loading-text { font-family: var(--display); font-size: 21px; color: var(--ink-soft); position: relative; display: inline-block; }
.pl-loading-text::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.85) 50%, transparent 80%);
  background-size: 200% 100%; animation: pl-shimmer 1.1s linear infinite; mix-blend-mode: overlay;
}
@keyframes pl-shimmer { from { background-position: 200% 0; } to { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) {
  .pl-loading-dots span, .pl-loading-text::after { animation: none; }
}

/* ---- responsive ---- */
@media (max-width: 880px) {
  .pl-layout { grid-template-columns: 1fr; }
  .pl-panel { position: static; order: -1; }   /* on narrow screens, panel rides above the plans */
  .pl-map { max-width: 320px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
  .pl-date-wrap { width: 100%; }
  .pl-time-hint { width: 100%; }
}
