/* trip_planner.html two-pane companion map styles (was <style id="tp-companion-styles">).
   The id was never referenced from JS; lifted out with the main page styles. */
/* ===== DR-049 — two-pane map companion (Wanderlog pattern). Loaded after editorial CSS so it wins. ===== */

/* --- Slim top bar: dest search + radius + Near me only (map moved to right pane) --- */
.tp-companion .dest-picker{padding:14px 28px}
.tp-companion .dest-picker > .dest-picker-inner > h2,
.tp-companion .dest-picker > .dest-picker-inner > p{display:none}
.tp-companion .dest-picker-controls{margin-bottom:0;align-items:center;gap:10px 18px}
.tp-companion .dest-picker-label{margin-bottom:4px}
.tp-companion .dest-picker-map-wrap{display:none}

/* --- No-destination Ghost shelf: registry truth, not discovery or readiness --- */
.tp-companion .planner-ghost-host{padding:28px;text-align:left;color:var(--navy,#0c1a2e);font-size:16px!important}
.tp-companion .planner-ghost-host::before{content:none!important}
.tp-companion .planner-ghost-prompt{text-align:center;color:var(--text-muted,#6b7280);margin-bottom:22px;font-size:16px!important}
.tp-companion .planner-ghost-prompt .big-emoji{font-size:42px;margin-bottom:8px}
.planner-ghost-shelf[hidden]{display:none}
.planner-ghost-shelf__title{font-family:'Fraunces',serif;font-size:clamp(24px,3vw,34px);margin:0;color:var(--navy,#0c1a2e)}
.planner-ghost-shelf__intro{max-width:720px;margin:6px 0 20px;color:var(--text-secondary,#4a5568);font-size:14px;line-height:1.55}
.planner-ghost-shelf__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.planner-ghost-card{min-width:0;padding:18px;border:1px solid var(--border-default,#d7ded0);border-radius:14px;background:#fffefb;box-shadow:0 8px 24px rgba(12,26,46,.06);overflow-wrap:anywhere}
.planner-ghost-card__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.planner-ghost-card__name{font-family:'Fraunces',serif;font-size:20px;line-height:1.2;margin:0;color:var(--navy,#0c1a2e)}
.planner-ghost-card__badge{flex:0 1 auto;padding:4px 8px;border-radius:999px;background:#fff3cd;color:#6b4e00;font-size:11px;font-weight:700;line-height:1.25}
.planner-ghost-card__vibe,.planner-ghost-card__inventory,.planner-ghost-card__depth,.planner-ghost-card__distance{margin:7px 0;color:var(--text-secondary,#4a5568);font-size:13px;line-height:1.45}
.planner-ghost-card__depth{font-weight:650;color:#6b4e00}
.planner-ghost-card__distance{font-weight:700;color:var(--navy-mid,#2d5a3d)}
.planner-ghost-card__action,.planner-ghost-shelf__retry{min-width:140px;min-height:44px;margin-top:12px;padding:10px 14px;border:1px solid var(--navy-mid,#2d5a3d);border-radius:10px;background:var(--navy-mid,#2d5a3d);color:#fff;font:700 14px/1.25 'Inter',sans-serif;cursor:pointer}
.planner-ghost-card__action:focus-visible,.planner-ghost-shelf__retry:focus-visible{outline:3px solid #f0b429;outline-offset:3px}
.planner-ghost-shelf__panel{padding:16px;border:1px solid var(--border-default,#d7ded0);border-radius:12px;background:#fffefb;color:var(--text-secondary,#4a5568)}
.planner-ghost-shelf__panel--unavailable{border-color:#d9a441;background:#fff8e5;color:#5d4500}
@media(max-width:960px){.planner-ghost-shelf__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.tp-companion .planner-ghost-host{padding:12px 0}.tp-companion .planner-ghost-prompt{margin-bottom:12px}.planner-ghost-shelf__grid{grid-template-columns:minmax(0,1fr)}.planner-ghost-card__heading{display:block}.planner-ghost-card__badge{display:inline-block;margin-top:8px}.planner-ghost-card__action{width:100%}}

/* --- The two-pane split: left scrolls, right (map) stays put --- */
.tp-companion .tp-split{display:grid;grid-template-columns:minmax(0,1.36fr) minmax(0,1fr);min-height:520px;background:var(--sand,#faf7f2);border-top:1px solid rgba(232,220,197,0.7)}
.tp-companion .tp-split-left{min-width:0;overflow-y:auto;overflow-x:hidden;padding:0 0 40px}
.tp-companion .tp-split-right{min-width:0;position:relative;border-left:1px solid rgba(232,220,197,0.9);background:#eef1ea}
.tp-co-map{position:absolute;inset:0;width:100%;height:100%}
.tp-co-map--fallback{display:flex;align-items:center;justify-content:center;padding:24px;text-align:center;color:var(--text-secondary,#4a5568);font-size:14px}

/* Left pane inner gutter so cards aren't flush to the divider */
.tp-companion .planner-content{max-width:none;margin:0;padding:18px 24px 0}
.tp-companion #plannerBody.tp-editorial{grid-template-columns:minmax(0,1fr)!important;max-width:none!important;margin:0!important;display:block!important}

/* --- De-clutter the left pane: hide the auxiliary bars/mounts that created big gaps --- */
.tp-companion #budgetBar,
.tp-companion #progressBar,
.tp-companion #tripLifecycleBar,
.tp-companion #eaProgressMount,
.tp-companion #eaCultureMount,
.tp-companion #eaTransitMount,
.tp-companion #eaNearMount,
.tp-companion #eaTripSummaryMount{display:none!important}
.tp-companion #plannerBody .days-indicator{display:none}

/* --- Demote the mad-lib sentence from centerpiece to a slim trip-params line --- */
.tp-companion #configBar{display:block;background:transparent;border:none;box-shadow:none;padding:14px 24px 6px;max-width:none;margin:0}
.tp-companion .ea-trip-sentence{font-family:'DM Sans','Inter',sans-serif!important;font-size:14px!important;line-height:1.5!important;color:var(--text-secondary,#4a5568)!important;max-width:none}
.tp-companion .ea-trip-sentence .ea-chip{font-size:14px!important;font-weight:600;color:var(--navy-mid,#2d5a3d)}

/* --- Slim help affordance (replaces the auto-opening tour) --- */
.tp-help-btn{margin-left:auto;flex:0 0 auto;width:30px;height:30px;border-radius:50%;border:1.5px solid rgba(255,255,255,0.3);background:rgba(255,255,255,0.1);color:#fff;font-weight:700;font-size:14px;cursor:pointer;line-height:1}
.tp-help-btn:hover{background:rgba(255,255,255,0.18);border-color:var(--coral,#e8734a)}

/* --- Selected-destination mini-header: HIGH CONTRAST (fix the faded green card) --- */
.tp-companion .dest-hero{min-height:0;padding:18px 20px;margin-bottom:14px;border-radius:12px}
.tp-companion .dest-hero h2{font-size:22px;margin-bottom:2px;color:#fff}
.tp-companion .dest-hero p{font-size:12.5px;opacity:1;color:rgba(255,255,255,0.94);max-width:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tp-companion .dest-hero-stats{gap:8px;margin-top:10px}
.tp-companion .dest-hero-stat{background:rgba(255,255,255,0.22);border-color:rgba(255,255,255,0.4);color:#fff;font-weight:700;padding:5px 12px}

/* --- Planner mode bar: Map mode is redundant now (map is always visible) --- */
.tp-companion .planner-mode-bar{margin-bottom:14px}
.tp-companion .planner-mode-bar .mode-btn[data-mode="map"]{display:none}

/* --- Section tabs: horizontal scroller inside the narrow left pane --- */
.tp-companion .section-tabs{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;margin-bottom:14px;scrollbar-width:thin}
.tp-companion .section-tabs::-webkit-scrollbar{height:5px}
.tp-companion .section-tabs::-webkit-scrollbar-thumb{background:rgba(45,90,61,0.25);border-radius:3px}

/* ===== Right-pane map markers ===== */
/* Place pins (numbered) — State B */
/* Native buttons keep Enter/Space semantics; reset only their browser chrome so
   the existing marker geometry and passive origin marker remain unchanged. */
.tpco-pin[type="button"],.tpco-dpin[type="button"]{appearance:none;-webkit-appearance:none;border:0;padding:0;background:transparent;color:inherit;font:inherit}
.tpco-pin[type="button"]:focus-visible,.tpco-dpin[type="button"]:focus-visible{outline:3px solid var(--ea-terracotta)!important;outline-offset:3px!important;z-index:7}
.tpco-pin{cursor:pointer;transform:translateY(2px)}
.tpco-pin__dot{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--coral,#e8734a);border:2px solid #fff;box-shadow:0 1px 5px rgba(0,0,0,0.4);color:#fff;font:700 11px/1 'Inter',sans-serif}
.tpco-pin__dot>*{transform:rotate(45deg)}
.tpco-pin.is-hover .tpco-pin__dot,.tpco-pin.is-active .tpco-pin__dot{background:var(--navy-mid,#2d5a3d);transform:rotate(-45deg) scale(1.18);z-index:5}
.tpco-pin__pill,.tpco-pin__pill--origin{display:none}
.tpco-pin--origin .tpco-pin__pill--origin{display:block;font:600 11px/1.2 'Inter',sans-serif;background:#1b2e1f;color:#fff;padding:3px 9px;border-radius:999px;border:1px solid #2d5a3d;white-space:nowrap;margin-bottom:3px;text-align:center}
.tpco-pin--origin .tpco-pin__dot--origin{width:13px;height:13px;border-radius:50%;background:#38bdf8;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.35);margin:0 auto}
.tpco-pin--origin{display:flex;flex-direction:column;align-items:center;cursor:default;transform:translateY(-2px)}

/* Destination overview pins (pill + dot) — State A */
.tpco-dpin{display:flex;flex-direction:column;align-items:center;cursor:pointer;transform:translateY(-4px)}
.tpco-dpin--low{flex-direction:column-reverse;transform:translateY(4px)}
.tpco-dpin__pill{font:600 11px/1.2 'Inter',sans-serif;background:#fffefb;color:#1b2e1f;padding:3px 9px;border-radius:999px;border:1px solid #e8e2d8;box-shadow:0 2px 8px rgba(0,0,0,0.16);white-space:nowrap;max-width:150px;overflow:hidden;text-overflow:ellipsis;margin:0 0 3px}
.tpco-dpin--low .tpco-dpin__pill{margin:3px 0 0}
.tpco-dpin__dot{width:13px;height:13px;border-radius:50%;background:var(--coral,#e8734a);border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.35)}
.tpco-dpin.is-sel .tpco-dpin__pill{border-color:var(--coral,#e8734a);box-shadow:0 0 0 2px rgba(232,115,74,0.4);font-weight:700}
.tpco-dpin.is-sel .tpco-dpin__dot{background:#2d5a3d;transform:scale(1.2)}
.tpco-dpin:hover{z-index:6}
.tpco-dpin:hover .tpco-dpin__pill{border-color:var(--coral,#e8734a)}

/* Map popup */
.tpco-pop{font-family:'DM Sans','Inter',sans-serif;max-width:200px}
.tpco-pop__name{font-weight:700;font-size:13px;color:var(--navy,#1b2e1f);margin-bottom:2px}
.tpco-pop__meta{font-size:11.5px;color:var(--text-secondary,#4a5568)}

/* Card <-> pin sync highlight */
.tpco-card-active{outline:2px solid var(--coral,#e8734a)!important;outline-offset:1px}
.tpco-card-flash{animation:tpcoFlash 1.4s ease}
@keyframes tpcoFlash{0%{box-shadow:0 0 0 4px rgba(232,115,74,0.45)}100%{box-shadow:0 0 0 4px rgba(232,115,74,0)}}

/* ===== Mobile: list / map toggle (one full-screen at a time) ===== */
.tp-mtoggle{display:none}
@media(max-width:768px){
  .tp-companion .tp-split{display:block;height:auto!important;min-height:0}
  .tp-companion .tp-split-left{overflow:visible;max-height:none}
  .tp-companion .tp-split-right{display:none;border-left:none;height:calc(100vh - 150px);min-height:420px}
  .tp-companion .tp-split.tp-show-map .tp-split-left{display:none}
  .tp-companion .tp-split.tp-show-map .tp-split-right{display:block}
  .tp-mtoggle{display:flex;gap:0;justify-content:center;padding:10px 16px 0;background:var(--sand,#faf7f2)}
  .tp-mtoggle__btn{flex:0 0 auto;padding:8px 22px;font:600 13px/1 'Inter',sans-serif;border:1.5px solid var(--navy-mid,#2d5a3d);background:#fff;color:var(--navy-mid,#2d5a3d);cursor:pointer}
  .tp-mtoggle__btn:first-child{border-radius:8px 0 0 8px;border-right:none}
  .tp-mtoggle__btn:last-child{border-radius:0 8px 8px 0}
  .tp-mtoggle__btn.is-active{background:var(--navy-mid,#2d5a3d);color:#fff}
}
@media(min-width:769px){.tp-mtoggle{display:none!important}}

/* ===== DR-049 fix pass — neutralize the editorial 2-col sidebar inside the single-column companion ===== */
/* easeaway-polish.css renders the section tabs as a STICKY VERTICAL sidebar nav (+ a HUD sidebar) for the
   old 2-column layout. In the companion's single column that becomes a 571px sticky column that overlaps
   everything as you scroll. Force a horizontal, non-sticky tab strip and drop the sidebar HUD. */
.tp-companion #plannerBody.tp-editorial>.section-tabs#secTabs{
  position:static;grid-column:auto;grid-row:auto;align-self:auto;
  flex-direction:row;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
  background:transparent;border:none;border-bottom:1px solid rgba(232,220,197,0.75);
  border-radius:0;padding:0 0 7px;gap:3px;margin:2px 0 16px;scrollbar-width:thin;
}
.tp-companion #plannerBody.tp-editorial>.section-tabs#secTabs::-webkit-scrollbar{height:5px}
.tp-companion #plannerBody.tp-editorial>.section-tabs#secTabs::-webkit-scrollbar-thumb{background:rgba(45,90,61,0.25);border-radius:3px}
.tp-companion #plannerBody.tp-editorial .sec-tab{
  text-align:center;border-radius:8px;white-space:nowrap;flex:0 0 auto;padding:8px 13px;border:1px solid transparent;
}
.tp-companion #plannerBody.tp-editorial .sec-tab.active{background:linear-gradient(135deg,#1b2e1f,#2d5a3d);color:#fff}
.tp-companion #plannerBody.tp-editorial .sec-tab.active .tab-count{color:#cbe2d2}
/* Drop the editorial sidebar HUD (Trip snapshot / Safety Net) — clutter in the narrow pane */
.tp-companion #plannerBody.tp-editorial .tp-hud{display:none!important}
/* Belt-and-suspenders: kill stray stickies that pin + overlap inside the scrolling left pane */
.tp-companion #configBar,
.tp-companion .progress-bar,
.tp-companion .save-status-bar{position:static!important}

/* ===== Desktop: collapsible map — the split is opt-out, not forced ===== */
.tp-maptoggle-btn{flex:0 0 auto;padding:8px 14px;border-radius:var(--radius-xs,7px);border:1.5px solid rgba(255,255,255,0.25);background:rgba(255,255,255,0.1);color:#fff;font-size:12px;font-weight:600;font-family:'Inter',sans-serif;cursor:pointer;transition:background 0.2s,border-color 0.2s;white-space:nowrap}
.tp-maptoggle-btn:hover{background:rgba(255,255,255,0.18);border-color:var(--coral,#e8734a)}
@media(min-width:769px){
  .tp-companion .tp-split.tp-map-off{grid-template-columns:minmax(0,1fr)}
  .tp-companion .tp-split.tp-map-off .tp-split-right{display:none}
  .tp-companion .tp-split.tp-map-off .tp-split-left{max-width:920px;margin:0 auto;padding-left:8px;padding-right:8px}
}
@media(max-width:768px){.tp-maptoggle-btn{display:none}}

/* Phase 0.5: readable, single-scroll planner chrome and occasion intake. */
body.tp-companion{overflow-x:hidden;background:var(--ea-cream,#f9f7f2);color:var(--ea-forest,#1b2e1f)}
body.tp-companion .dest-picker{background:var(--ea-forest,#1b2e1f);color:#fff}
body.tp-companion .dest-picker-label,
body.tp-companion .dest-filter-label,
body.tp-companion .dest-filter-of{color:#fff;opacity:1;font-size:13px;font-weight:700}
body.tp-companion .dest-combobox-input,
body.tp-companion .dest-filter-select{min-height:44px;background:#fff;color:#1b2e1f;border:1px solid #d7cdb6;font-size:15px}
body.tp-companion .dest-combobox-input::placeholder{color:#5f695f;opacity:1}
body.tp-companion .dest-near-me-btn,
body.tp-companion .tp-maptoggle-btn{min-height:44px;background:#fff;color:#1b2e1f;border:1px solid #d7cdb6;font-size:14px;font-weight:700}
body.tp-companion .tp-help-btn{background:#fff;color:#1b2e1f;border-color:#d7cdb6}
body.tp-companion .tp-origin-strip{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 24px;background:#f2eee4;border-bottom:1px solid var(--ea-sand,#e7dec8);flex-wrap:wrap}
body.tp-companion .tp-origin-strip .dest-filter-label{color:#263c2b;font-size:13px;font-weight:800}
body.tp-companion .dest-origin-input{width:min(280px,35vw);min-height:42px;padding:9px 12px;background:#fff;color:#1b2e1f;border:1px solid #cfc4aa;border-radius:6px;font:600 14px/1.2 'Inter',sans-serif}
body.tp-companion .dest-origin-btn{min-height:42px;padding:8px 15px;background:var(--ea-forest,#1b2e1f);color:#fff;border:1px solid var(--ea-forest,#1b2e1f);border-radius:6px;font:700 14px/1 'Inter',sans-serif;cursor:pointer}
body.tp-companion .dest-origin-clear{min-height:42px;padding:8px 12px;background:#fff;color:#395042;border:1px solid #cfc4aa;border-radius:6px;font:700 13px/1 'Inter',sans-serif;cursor:pointer}
body.tp-companion .tp-drive-limit{min-height:42px;padding:8px 10px;background:#fff;color:#1b2e1f;border:1px solid #cfc4aa;border-radius:6px;font:600 14px/1.2 'Inter',sans-serif}
body.tp-companion .tp-origin-help{color:#536258;font-size:12px}
body.tp-companion .tp-split{height:auto!important;min-height:calc(100vh - 148px);align-items:start}
body.tp-companion .tp-split-left{overflow:visible!important;max-height:none!important}
body.tp-companion .tp-split-right{position:sticky;top:72px;height:calc(100vh - 72px);min-height:560px;align-self:start}
body.tp-companion .tp-occasion-brief{display:grid;grid-template-columns:minmax(210px,.72fr) minmax(0,1.8fr);gap:24px;align-items:end;margin:6px 24px 20px;padding:22px;border:1px solid var(--ea-sand,#e7dec8);background:rgba(255,255,255,.6);box-shadow:0 8px 24px rgba(27,46,31,.06)}
body.tp-companion .tp-occasion-copy h2{margin:5px 0 6px;font-family:'Fraunces',Georgia,serif;font-size:clamp(21px,2.1vw,30px);line-height:1.08;color:var(--ea-forest,#1b2e1f);letter-spacing:0}
body.tp-companion .tp-occasion-copy p{margin:0;color:#435247;font-size:14px;line-height:1.5}
body.tp-companion .tp-occasion-fields{display:grid;grid-template-columns:minmax(160px,1.45fr) repeat(2,minmax(76px,.55fr)) minmax(130px,.8fr);gap:12px;align-items:end}
body.tp-companion .tp-occasion-fields .ea-field{min-width:0;margin:0}
body.tp-companion .tp-occasion-fields .ea-field-label{display:block;margin-bottom:6px;color:#33463a;font-size:12px;font-weight:800}
body.tp-companion .tp-occasion-fields .ea-field-input{width:100%;min-height:44px;background:#fff;color:#1b2e1f;border:1px solid #cfc4aa;border-radius:6px;font:600 14px/1.2 'Inter',sans-serif}
body.tp-companion .tp-money-input{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px;padding-left:10px;background:#fff;border:1px solid #cfc4aa;border-radius:6px;color:#33463a;font-weight:800}
body.tp-companion .tp-money-input .ea-field-input{border:0;padding-left:0;box-shadow:none}
body.tp-companion .ai-itinerary-meta,
body.tp-companion .ai-itinerary-subtitle,
body.tp-companion .ai-itinerary-disclosure,
body.tp-companion .ai-item-meta{color:#435247!important;font-size:13px!important;line-height:1.45}
body.tp-companion .ai-itinerary-panel button,
body.tp-companion .ai-itinerary-panel a{font-size:13px;min-height:36px}
body.tp-companion :is(a,button,input,select,summary,[tabindex]):focus-visible{outline:3px solid var(--ea-terracotta,#e8734a);outline-offset:3px}
@media(max-width:1100px){body.tp-companion .tp-occasion-brief{grid-template-columns:1fr}body.tp-companion .tp-occasion-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:860px){
  body.tp-companion .tp-split{display:block;min-height:0}
  body.tp-companion .tp-split-right{position:static;height:62vh;min-height:420px}
  body.tp-companion .tp-occasion-brief{margin:8px 14px 18px;padding:18px}
  body.tp-companion .tp-occasion-fields{grid-template-columns:1fr 1fr}
}
body.tp-companion .config-party-badge{display:inline-flex;align-items:center;min-height:38px;padding:6px 12px;background:#fff;border:1px solid #cfc4aa;border-radius:6px;font:600 13px/1.2 'Inter',sans-serif;color:#1b2e1f;cursor:pointer;text-align:left;transition:border-color .15s ease,background-color .15s ease}
body.tp-companion .config-party-badge:hover{border-color:#b4a78c;background:#fbf9f4}
body.tp-companion .tp-occasion-meta{grid-column:1 / -1;display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:8px;padding-top:10px;border-top:1px dashed #cfc4aa;font-size:12px;color:#435247}
body.tp-companion .tp-meta-pill{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;background:#fbf9f4;border:1px solid #dfd6c0;border-radius:14px;cursor:pointer;transition:border-color .15s ease,background-color .15s ease}
body.tp-companion .tp-meta-pill:hover{border-color:#b4a78c;background:#f5f0e4}
@media(max-width:520px){body.tp-companion .tp-occasion-fields{grid-template-columns:1fr}body.tp-companion .dest-picker{padding:12px 14px}body.tp-companion .tp-origin-strip{display:grid;grid-template-columns:1fr auto;padding:10px 14px}body.tp-companion .tp-origin-strip .dest-filter-label,body.tp-companion .tp-origin-help{grid-column:1 / -1}body.tp-companion .dest-origin-input{width:100%}}
