/* Trip planner pieces used on every page: add buttons, the sticky "My trip" button, the drawer,
   suggestion cards and strips, the booking popup. The full planner page has trip-plan.css. */

/* ── "Add to trip" button: the label and icon change on the same button ── */
.tadd {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 12px; cursor: pointer;
  border: 1.5px solid var(--gold); border-radius: 999px; background: var(--gold); color: var(--navy);
  font: 800 14.5px/1 var(--sans); white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s, transform .45s var(--spring);
}
.tadd:hover { transform: translateY(-2px); }
.tadd:active { transform: scale(.96); }
.tadd__ic { position: relative; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgb(11 28 40 / .12); }
.tadd__plus, .tadd__ok { grid-area: 1 / 1; display: grid; place-items: center; font-weight: 900; transition: opacity .25s, transform .45s var(--spring); }
.tadd__ok { opacity: 0; transform: scale(.4) rotate(-45deg); }
.tadd__labels { display: inline-grid; }
.tadd__l { grid-area: 1 / 1; transition: opacity .25s, transform .4s var(--ease); }
.tadd__l--in { opacity: 0; transform: translateY(8px); }
.tadd.is-in { border-color: var(--alpine); background: #fff; color: var(--alpine); }
.tadd.is-in .tadd__ic { background: var(--alpine); color: var(--gold); }
.tadd.is-in .tadd__plus { opacity: 0; transform: scale(.4) rotate(90deg); }
.tadd.is-in .tadd__ok { opacity: 1; transform: none; }
.tadd.is-in .tadd__l--add { opacity: 0; transform: translateY(-8px); }
.tadd.is-in .tadd__l--in { opacity: 1; transform: none; }
.tadd--sm { height: 36px; padding: 0 12px 0 8px; gap: 6px; font-size: 13px; }
.tadd--sm .tadd__ic { width: 20px; height: 20px; }
.tadd--sm .tadd__ic .ic { width: 14px; height: 14px; }
.tadd--icon { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; }
.tadd--icon .tadd__ic { width: 40px; height: 40px; background: none; font-size: 18px; }
.tadd--light { border-color: rgb(255 255 255 / .55); background: rgb(255 255 255 / .12); color: #fff; backdrop-filter: blur(8px); }
.tadd--light .tadd__ic { background: rgb(255 255 255 / .18); }
.tadd--light.is-in { border-color: #fff; background: #fff; color: var(--alpine); }

/* ── Sticky "My trip" button ── */
.tpill {
  position: fixed; z-index: 60; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 10px 0 14px; cursor: pointer;
  border: 0; border-radius: 999px; background: var(--alpine-d); color: #fff; font: 800 15px/1 var(--sans);
  box-shadow: 0 14px 34px rgb(11 28 40 / .32), 0 0 0 1px rgb(255 255 255 / .08) inset;
  opacity: 0; visibility: hidden; transform: translateY(24px) scale(.9);
  transition: opacity .3s, transform .55s var(--spring), visibility 0s linear .55s;
}
.tpill.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .55s var(--spring), visibility 0s; }
.tpill:hover { background: var(--navy); }
.tpill__ic { display: grid; place-items: center; color: var(--gold); }
.tpill__n { display: grid; min-width: 34px; height: 34px; padding: 0 9px; overflow: hidden; border-radius: 999px; background: var(--gold); color: var(--navy); font-variant-numeric: tabular-nums; }
.tpill__roll { display: grid; grid-auto-rows: 34px; align-items: center; justify-items: center; }
.tpill__roll.is-up { animation: tpill-up .42s cubic-bezier(.3,.8,.3,1) forwards; }
.tpill__roll.is-down { animation: tpill-down .42s cubic-bezier(.3,.8,.3,1) forwards; }
@keyframes tpill-up { from { transform: translateY(0); } to { transform: translateY(-34px); } }
@keyframes tpill-down { from { transform: translateY(-34px); } to { transform: translateY(0); } }
body:has(.rx-dock.is-on) .tpill { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 76px); }
html.tlock .tpill { opacity: 0; pointer-events: none; }
.tfly { position: fixed; z-index: 70; left: 0; top: 0; width: 44px; height: 44px; border: 3px solid #fff; border-radius: 50%; background: var(--gold) center / cover; box-shadow: 0 8px 20px rgb(11 28 40 / .3); pointer-events: none; }

/* ── Drawer: a side sheet on desktop, a bottom sheet on phones ── */
html.tlock { overflow: hidden; }
.tdrawer { position: fixed; z-index: 80; inset: 0; visibility: hidden; transition: visibility 0s linear .5s; }
.tdrawer.is-open { visibility: visible; transition: none; }
.tdrawer__scrim { position: absolute; inset: 0; background: rgb(6 16 24 / .5); opacity: 0; transition: opacity .35s; }
.tdrawer.is-open .tdrawer__scrim { opacity: 1; }
.tdrawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(440px, 100%);
  background: var(--warm); box-shadow: -20px 0 60px rgb(6 16 24 / .25);
  transform: translateX(104%); transition: transform .5s var(--ease);
}
.tdrawer.is-open .tdrawer__panel { transform: none; }
.tdrawer__grab { display: none; }
.tdrawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.tdrawer__kicker { margin: 0; color: var(--gold-2); font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tdrawer__title { margin: 2px 0 0; color: var(--ink); font-family: var(--serif); font-size: 24px; font-weight: 600; }
.tdrawer__x { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--stone); color: var(--ink); cursor: pointer; }
.tdrawer__body { flex: 1; overflow-y: auto; padding: 14px 18px 24px; overscroll-behavior: contain; }
.tdrawer__foot { display: grid; gap: 8px; padding: 14px 18px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.tdrawer__foot .btn { justify-content: center; width: 100%; }
.tdrawer__off { margin: 0; color: var(--muted); font-size: 12.5px; text-align: center; }
.tdrawer__empty { padding: 30px 6px; color: var(--slate); font-size: 15.5px; line-height: 1.6; }

.tday + .tday { margin-top: 14px; }
.tday__h { display: flex; align-items: baseline; gap: 10px; margin: 6px 4px 10px; font: 800 13px/1.2 var(--sans); }
.tday__n { color: var(--gold-2); letter-spacing: .1em; text-transform: uppercase; }
.tday__a { color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: 0; }
.tday__d { margin-left: auto; color: var(--muted); font-weight: 600; }
.tday__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tday__empty { padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 14px; }
.trow { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 1px 0 var(--line); }
.tdrawer.is-open .trow { animation: trow-in .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
@keyframes trow-in { from { opacity: 0; transform: translateX(18px); } }
.trow.is-focus { box-shadow: 0 0 0 2px var(--gold); }
.trow__img { flex: none; width: 58px; height: 58px; overflow: hidden; border-radius: 10px; background: var(--stone); }
.trow__img img { width: 100%; height: 100%; object-fit: cover; }
.trow__body { display: grid; flex: 1; min-width: 0; gap: 2px; }
.trow__name { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 800; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.trow__line { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.trow__book { justify-self: start; margin-top: 4px; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--gold); color: var(--navy); font: 800 12.5px/1 var(--sans); cursor: pointer; }
.trow__rm { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--faint); cursor: pointer; }
.trow__rm:hover { background: #fbe9e9; color: #a12a2a; }
.trow--ghost .trow__bar { display: block; width: 70%; height: 10px; border-radius: 6px; background: var(--stone); }
.trow--ghost .trow__bar--s { width: 45%; margin-top: 6px; }

.tdrawer__sug { margin-top: 22px; }
.tdrawer__sugh { margin: 0 4px 10px; color: var(--ink); font-weight: 800; }
.tdrawer__cards { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* ── Suggestion cards ── */
.tcard { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--spring), box-shadow .35s; }
.tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tcard__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone); }
.tcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.tcard:hover .tcard__media img { transform: scale(1.06); }
.tcard__ph { display: grid; place-items: center; height: 100%; color: var(--faint); }
.tcard__flag { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 999px; background: rgb(255 255 255 / .94); color: var(--alpine); font-size: 11.5px; font-weight: 800; }
.tcard__flag--feat { background: var(--gold); color: var(--navy); }
.tcard__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px 14px; }
.tcard__name { color: var(--ink); font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.25; text-decoration: none; }
.tcard__line { color: var(--muted); font-size: 14px; line-height: 1.5; }
.tcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.tcard__price { color: var(--ink); font-weight: 800; }
.tcard__cat { color: var(--muted); font-size: 13px; font-weight: 700; }
.tcard--row { flex-direction: row; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; }
.tcard--row:hover { transform: none; box-shadow: 0 0 0 1px var(--gold); }
.tcard--row .tcard__media { flex: none; width: 64px; height: 64px; aspect-ratio: auto; border-radius: 10px; }
.tcard--row .tcard__flag { position: static; justify-self: start; padding: 2px 8px; background: var(--stone); font-size: 11px; white-space: nowrap; }
.tcard--row .tcard__flag--feat { background: var(--gold); }
.tcard--row .tcard__body { display: grid; flex: 1; min-width: 0; padding: 0; gap: 2px; }
.tcard--row .tcard__name { overflow: hidden; font-family: var(--sans); font-size: 14.5px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tcard--row .tcard__line { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }

/* ── "Plan your trip" strip on pages ── */
.tstrip { background: linear-gradient(180deg, var(--warm), #fff); }
.tstrip__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.tstrip__head .h3 { margin: 4px 0 0; }
.tstrip__tabs { display: flex; gap: 8px; margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.tstrip__tabs::-webkit-scrollbar { display: none; }
.tstrip__tab { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 700 14px/1 var(--sans); transition: background .25s, color .25s, border-color .25s; }
.tstrip__tab .ic { color: var(--alpine-l); }
.tstrip__tab[aria-selected='true'] { border-color: var(--alpine); background: var(--alpine); color: #fff; }
.tstrip__tab[aria-selected='true'] .ic { color: var(--gold); }
.tstrip__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }

/* ── Booking popup ── */
.tbook { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 16px; visibility: hidden; transition: visibility 0s linear .4s; }
.tbook.is-open { visibility: visible; transition: none; }
.tbook__scrim { position: absolute; inset: 0; background: rgb(6 16 24 / .55); opacity: 0; transition: opacity .3s; }
.tbook.is-open .tbook__scrim { opacity: 1; }
.tbook__card { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgb(6 16 24 / .4); opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .3s, transform .5s var(--spring); }
.tbook.is-open .tbook__card { opacity: 1; transform: none; }
.tbook__top { position: relative; height: 130px; background: var(--alpine-d); }
.tbook__top img { width: 100%; height: 100%; object-fit: cover; }
.tbook__x { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: var(--ink); cursor: pointer; }
.tbook__body { padding: 18px 20px 20px; }
.tbook__kicker { margin: 0; color: var(--gold-2); font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tbook__name { margin: 4px 0 6px; color: var(--ink); font-family: var(--serif); font-size: 25px; font-weight: 600; line-height: 1.2; }
.tbook__when { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; color: var(--slate); font-size: 14px; font-weight: 700; }
.tbook__when svg { width: 16px; height: 16px; color: var(--gold-2); }
.tbook__opts { display: grid; gap: 8px; }
.tbook__opt { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: border-color .25s, transform .4s var(--spring), background .25s; }
.tbook.is-open .tbook__opt { animation: trow-in .45s var(--ease) backwards; }
.tbook.is-open .tbook__opt:nth-child(2) { animation-delay: .06s; } .tbook.is-open .tbook__opt:nth-child(3) { animation-delay: .12s; } .tbook.is-open .tbook__opt:nth-child(4) { animation-delay: .18s; }
.tbook__opt:hover { border-color: var(--gold); transform: translateX(3px); }
.tbook__opt b { display: block; font-size: 15px; }
.tbook__opt small { display: block; color: var(--muted); font-size: 12.5px; }
.tbook__ic { display: grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--stone); color: var(--alpine); }
.tbook__opt--wa { border-color: #1fa855; background: #effaf3; }
.tbook__opt--wa .tbook__ic { background: #1fa855; color: #fff; }
.tbook__page { display: inline-block; margin-top: 14px; color: var(--alpine); font-weight: 800; font-size: 14px; }

@media (max-width: 640px) {
  .tpill { left: 50%; right: auto; transform: translate(-50%, 24px) scale(.9); }
  .tpill.is-on { transform: translateX(-50%); }
  .tdrawer__panel { top: auto; left: 0; width: 100%; max-height: 88dvh; border-radius: 22px 22px 0 0; transform: translateY(104%); }
  .tdrawer__grab { display: block; width: 44px; height: 5px; margin: 8px auto 0; border-radius: 5px; background: var(--line); }
  .tdrawer__head { padding: 10px 18px 12px; border-radius: 22px 22px 0 0; }
  .tbook { align-items: end; padding: 0; }
  .tbook__card { width: 100%; border-radius: 22px 22px 0 0; transform: translateY(100%); }
  .tbook__body { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .tstrip__list { display: flex; gap: 12px; margin-inline: calc(var(--pad) * -1); padding: 2px var(--pad) 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .tstrip__list::-webkit-scrollbar { display: none; }
  .tstrip__list > .tcard { flex: 0 0 78%; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  .tadd, .tadd *, .tpill, .tdrawer__panel, .tdrawer__scrim, .trow, .tcard, .tcard__media img, .tbook__card, .tbook__opt { transition: none !important; animation: none !important; }
}

@media print { .tpill, .tdrawer, .tbook { display: none !important; } }

/* Pieces placed on pages */
.tadd--block { justify-content: center; width: 100%; }
.dest-trip { display: flex; flex-wrap: wrap; gap: 10px; }
.dest-trip .tadd__ic { background: rgb(11 28 40 / .12); }
.hhero__actions .tadd { height: 48px; }
.tdrawer__cards + .tdrawer__sugh { margin-top: 18px; }
.tdrawer__grp + .tdrawer__grp { margin-top: 18px; }
.tdrawer__grp--ask { padding: 12px; border-radius: 16px; background: #eef3f6; }
.tdrawer__grp--ask .tdrawer__sugh { margin-bottom: 2px; }
.tdrawer__sugs { margin: 0 4px 10px; color: var(--muted); font-size: 13px; }
