/* Holiday Planner (/holiday and /holiday/s/:token).
   Phone: the panel scrolls with the page and the map sits under it, clear
   of the tab bar. From md up: the trip planner's shape, a fixed shell with
   the panel on the left and the map filling the rest. */
.hp-shell { font-family: 'Inter', sans-serif; background: #F5F7FB; }
.hp-main { display: flex; flex-direction: column; }
.hp-panel { background: #F8FAFC; }
.hp-map-wrap { position: relative; height: 55vh; min-height: 280px; }
#hpMap { position: absolute; inset: 0; }
.leaflet-container { font-family: 'Inter', sans-serif; }

@media (min-width: 768px) {
    .hp-shell { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
    .hp-main { flex: 1; flex-direction: row; overflow: hidden; }
    .hp-panel { width: 460px; flex-shrink: 0; overflow-y: auto; border-right: 1px solid #e2e8f0; }
    .hp-map-wrap { flex: 1; height: auto; }
}

.hp-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.hp-label { display: block; font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.hp-input { width: 100%; padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: #fff; }
.hp-input:focus, .hp-btn:focus-visible, .hp-act:focus-visible { outline: 2px solid #7B61FF; outline-offset: 1px; }
fieldset.hp-card { margin: 0; min-width: 0; }
fieldset.hp-card legend { font-size: 11px; font-weight: 600; color: #64748b; padding: 0 4px; }

.hp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600;
          padding: 7px 12px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: #334155; cursor: pointer; }
.hp-btn:hover { border-color: #7B61FF; color: #7B61FF; }
.hp-btn[disabled] { opacity: .5; cursor: default; }
.hp-icon-btn { padding: 6px; border: 0; background: none; color: #94a3b8; cursor: pointer; border-radius: 6px; }
.hp-icon-btn:hover { color: #7B61FF; }
.hp-icon-btn[disabled] { opacity: .25; cursor: default; }

.hp-dot { width: 22px; height: 22px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700;
          display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

.hp-status { font-size: 12px; color: #64748b; min-height: 1em; }
.hp-status.hp-error { color: #b91c1c; }

.hp-base-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; font-weight: 700; font-size: 13px; color: #0B1022; }
.hp-day { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; margin: 0 12px 8px; }
.hp-day-date { font-size: 12px; font-weight: 700; color: #0B1022; }
.hp-meta { font-size: 12px; color: #64748b; }
.hp-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; margin: 2px 4px 0 0;
          background: #eef2ff; color: #4338ca; }
.hp-tag-warn { background: #fef3c7; color: #92400e; }
.hp-legs { margin-top: 6px; font-size: 12px; color: #475569; }
.hp-legs li { margin-top: 2px; }
.hp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hp-act { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; border: 1px solid #e2e8f0; background: #f8fafc;
          color: #475569; cursor: pointer; }
.hp-act:hover { border-color: #7B61FF; color: #7B61FF; }
.hp-act[aria-pressed="true"] { background: #7B61FF; border-color: #7B61FF; color: #fff; }
.hp-act[disabled], .hp-link[disabled] { opacity: .6; cursor: default; pointer-events: none; }
/* A plan solved from the request before the last edit: dimmed, actions off, until it is replaced. */
.hp-stale > :not(.hp-stale-note) { opacity: .5; }
.hp-link { color: #7B61FF; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* An affiliate link's visible label, before the link (spec 8.2). */
.hp-ad { display: inline-block; font-size: 10px; font-weight: 700; line-height: 1; padding: 2px 4px; margin-right: 4px; border-radius: 4px;
         border: 1px solid #94a3b8; color: #475569; vertical-align: 1px; }
/* The visitor's own Eurostar times, optional (spec section 9). */
.hp-times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hp-time-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #64748b; }
.hp-time { padding: 2px 4px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; background: #fff; }
.hp-time:focus { outline: 2px solid #7B61FF; outline-offset: 1px; }

/* ---- Version 2 (holiday-planner-v2.md section 3): Start, Anchor, Explore,
   Your best trip. Start alone has no map and a wider column; with an anchor
   the panel widens beside the map. On a phone the stages stack, the map
   moves into Explore (the script) and a bar holds the summary and Save. ---- */
body[data-view="start"] .hp-map-wrap { display: none; }
@media (min-width: 768px) {
    body[data-view="start"] .hp-panel { width: 100%; max-width: 760px; margin: 0 auto; border-right: 0; }
    body[data-view="v2"] .hp-panel { width: 540px; }
}
@media (max-width: 767px) {
    body[data-view="v2"] .hp-main { padding-bottom: calc(64px + var(--jf-tabbar-h, 0px)); }
    #hpMapSlot .hp-map-wrap { height: 50vh; margin-top: 8px; border-radius: 12px; overflow: hidden; }
}
.hp-stage { padding: 16px; border-bottom: 1px solid #e2e8f0; }
.hp-stage-head { font-family: 'Manrope', 'Inter', sans-serif; font-size: 16px; font-weight: 800; color: #0B1022; margin-bottom: 8px; }
.hp-sub { font-size: 13px; font-weight: 700; color: #0B1022; margin: 16px 0 6px; }
.hp-summary { font-size: 13px; font-weight: 700; color: #0B1022; margin: 8px 0 4px; }
.hp-tip { font-size: 12px; color: #334155; background: #eef2ff; border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.hp-more { font-size: 13px; font-weight: 600; color: #7B61FF; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.hp-kicker { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #FF3EA5; }
.hp-anchor-name { font-family: 'Manrope', 'Inter', sans-serif; font-size: 18px; font-weight: 800; color: #0B1022; line-height: 1.2; }

/* 44 px targets for every v2 action. */
.hp-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.hp-chip, .hp-act2 { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px;
    border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #334155; font-size: 13px; font-weight: 600;
    white-space: nowrap; cursor: pointer; flex-shrink: 0; }
.hp-chip:hover, .hp-act2:hover { border-color: #7B61FF; color: #7B61FF; }
.hp-chip[aria-pressed="true"], .hp-act2[aria-pressed="true"] { background: #7B61FF; border-color: #7B61FF; color: #fff; }
.hp-act2-main { border-color: #7B61FF; color: #7B61FF; }
.hp-chip[disabled], .hp-act2[disabled], .hp-like[disabled] { opacity: .5; cursor: default; }
.hp-chip:focus-visible, .hp-act2:focus-visible, .hp-like:focus-visible, .hp-tile-add button:focus-visible { outline: 2px solid #7B61FF; outline-offset: 2px; }
.hp-like { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
    border: 1px solid #7B61FF; background: #fff; color: #7B61FF; font-size: 13px; font-weight: 600; cursor: pointer; }
.hp-like[aria-pressed="true"] { background: #7B61FF; color: #fff; }
.hp-ev-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
/* go-there.js adds its button's style only when a sheet first opens; the
   planner draws many buttons before that, so it carries the same pill. */
.hp-shell .jf-gt-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 11px; border: 0;
    border-radius: 999px; color: #7B61FF; background: color-mix(in srgb, currentColor 12%, transparent); font: 600 12px/1 Inter, sans-serif;
    white-space: nowrap; cursor: pointer; }
.hp-shell .jf-gt-btn:hover { background: color-mix(in srgb, currentColor 20%, transparent); }
.hp-ev-acts .jf-gt-btn { min-height: 44px; padding: 0 14px; }

.hp-hits { margin-top: 6px; }
.hp-hit, .hp-ev, .hp-left, .hp-sleep { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.hp-hit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hp-hit > :first-child { flex: 1 1 220px; }
.hp-ev-when { font-size: 12px; font-weight: 700; color: #7B61FF; }
.hp-ev-name { font-weight: 700; color: #0B1022; }

.hp-anchor-card { display: flex; gap: 12px; background: #fff; border: 1px solid #FF3EA5; border-radius: 14px; padding: 12px; }
.hp-dateblock { width: 56px; flex-shrink: 0; align-self: flex-start; border-radius: 12px; background: #FF3EA5; color: #fff;
    display: flex; flex-direction: column; align-items: center; padding: 6px 0; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.hp-dateblock b { font-size: 22px; line-height: 1.1; }

/* The nights ribbon scrolls sideways at any width. */
.hp-ribbon { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.hp-tile { flex: 0 0 176px; scroll-snap-align: start; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; }
.hp-tile-anchor { border-color: #FF3EA5; background: #fff0f7; }
.hp-tile-date { font-size: 12px; font-weight: 700; color: #0B1022; }
.hp-tile-what { font-size: 13px; color: #334155; margin-top: 2px; }
.hp-tile-add { flex: 0 0 104px; padding: 0; border-style: dashed; display: flex; }
.hp-tile-add button { flex: 1; min-height: 44px; border: 0; background: none; color: #7B61FF; font-weight: 700; font-size: 13px; cursor: pointer; border-radius: 12px; }
.hp-tile-add button[disabled] { color: #cbd5e1; cursor: default; }
/* v2.1 (7.2): each night is a button that opens its editor under the strip. */
.hp-tile:has(> .hp-tile-btn) { padding: 0; display: flex; }
.hp-tile-btn { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; min-height: 44px;
    border: 0; background: none; text-align: left; cursor: pointer; border-radius: 12px; font: inherit; color: inherit; }
.hp-tile-btn:focus-visible { outline: 2px solid #7B61FF; outline-offset: 2px; }
.hp-tile-open { border-color: #7B61FF; box-shadow: 0 0 0 2px #7B61FF33; }
.hp-tile-sub { font-size: 12px; color: #64748b; }
.hp-tile-sleep { font-size: 11px; color: #475569; margin-top: 4px; }
.hp-tile-left { font-size: 11px; font-weight: 700; color: #7B61FF; }
.hp-tile-way { border-color: #c4b5fd; }
.hp-tile-way button span { display: block; font-weight: 500; font-size: 12px; color: #64748b; }
@keyframes hp-pulse { 0% { box-shadow: 0 0 0 0 #7B61FF88; } 100% { box-shadow: 0 0 0 12px #7B61FF00; } }
.hp-tile-flash { border-color: #7B61FF; animation: hp-pulse 0.9s ease-out 2; }
@media (prefers-reduced-motion: reduce) { .hp-tile-flash { animation: none; } }
.hp-night-ed { background: #fff; border: 1px solid #7B61FF; border-radius: 12px; padding: 10px 12px; margin: 4px 0 10px; }
.hp-night-ed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hp-night-opt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 0; border-top: 1px solid #f1f5f9; }
.hp-said { font-size: 13px; color: #334155; margin: 6px 0 0; }
.hp-said-in { color: #5b21b6; font-weight: 600; }
.hp-way-head { font-size: 15px; font-weight: 800; color: #0B1022; margin: 22px 0 4px; padding-top: 14px; border-top: 1px solid #e2e8f0; }
.hp-pin-way { background: #0B1022; border: 3px solid #fff; }
.hp-pick { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f1f5f9; }
.hp-pick-name { font-size: 12px; font-weight: 700; color: #0B1022; }
.hp-pick .hp-act2, .hp-pick .jf-gt-btn { white-space: normal; text-align: center; }

.hp-way { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }

.hp-nights { margin-top: 8px; }
.hp-night { display: flex; gap: 10px; margin: 0 0 8px; }
.hp-num { width: 24px; height: 24px; border-radius: 999px; background: #7B61FF; color: #fff; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hp-use { min-height: 44px; padding: 0 18px; margin-top: 12px; font-size: 14px; }

/* Map pins: the anchor pink, grey also on, hollow purple left out, filled
   purple and numbered in the trip. */
.hp-pin { background: none; border: 0; }
.hp-pin-dot { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 999px;
    font: 700 11px/1 'Inter', sans-serif; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); box-sizing: border-box; }
.hp-pin-anchor { background: #FF3EA5; border: 3px solid #fff; }
.hp-pin-trip { background: #7B61FF; border: 2px solid #fff; }
.hp-pin-left { background: #fff; border: 3px solid #7B61FF; }
.hp-pin-also { background: #94a3b8; border: 2px solid #fff; }
.hp-ring-label { background: none; border: 0; color: #7B61FF; font: 700 11px/16px 'Inter', sans-serif; text-align: center; white-space: nowrap;
    text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.hp-popup { font-family: 'Inter', sans-serif; font-size: 12px; min-width: 190px; }

/* The phone's bar: the trip so far and Save, above the tab bar. */
.hp-bar { position: fixed; left: 0; right: 0; bottom: var(--jf-tabbar-h, 0px); z-index: 1000; display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: #fff; border-top: 1px solid #e2e8f0; box-shadow: 0 -4px 16px rgba(11,16,34,.08); }
.hp-bar .btn-primary { min-height: 44px; flex-shrink: 0; }
.hp-bar-summary { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; color: #0B1022; }
.hp-bar.hidden { display: none; }
@media (min-width: 768px) { .hp-bar { display: none; } }

/* v2.1 (7.2): on a phone the strip stays in view while the page scrolls. */
@media (max-width: 767px) {
    .hp-ribbon { position: sticky; top: 0; z-index: 5; background: #f8fafc; padding-top: 6px; }
}
