/* =========================================================
   Guide chips (.tb-guide-chips) and the Destination stays sidebar (.tb-stays).
   Markup is written into every guide page by scripts/guide_sync.py; behaviour is
   redesign-guide.js. Tokens only (redesign-tokens.css).

   >= 1620px  stays sidebar fixed in the right gutter, starting under the hero
              and sticking below the header (redesign-guide.js sets its top)
   901-1619px stays panel is a banner in the page flow above the footer
   <= 900px   stays panel stacks
   ========================================================= */

/* ---------- Shared label look ---------- */
.tb-stays__kicker,
.tb-guide-chips__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Destination stays panel ---------- */
.tb-stays { font-family: var(--sans); }
.tb-stays__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.tb-stays__card:hover { border-color: var(--rule-2); }
.tb-stays__img {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  background: var(--paper-3) center / cover no-repeat;
}
.tb-stays__kicker { display: block; padding: 4px 4px 0; }
.tb-stays__kicker span { font-family: var(--jp); letter-spacing: .02em; text-transform: none; }
.tb-stays__title {
  display: block;
  padding: 0 4px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.15;
  color: var(--ink);
}
.tb-stays__copy {
  display: block;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}
.tb-stays__cta {
  display: block;
  margin-top: 4px;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.tb-stays__card:hover .tb-stays__cta { opacity: .9; }
.tb-stays__hotels {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.35;
  text-decoration: none;
}
.tb-stays__hotels span { display: block; color: var(--accent); font-weight: 600; font-size: 13px; }
.tb-stays__hotels span::before { content: "宿"; font-family: var(--jp); font-weight: 400; margin-right: 6px; }
.tb-stays__hotels:hover { background: var(--paper-3); }

/* ---------- Chips row ---------- */
.tb-guide-chips {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.tb-guide-chips__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--site-w);
  margin: 0 auto;
  padding: 10px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tb-guide-chips__inner::-webkit-scrollbar { display: none; }
.tb-guide-chips__label { flex: none; padding-right: 4px; white-space: nowrap; }
.tb-guide-chips__chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--paper-3);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12.5px;
  white-space: nowrap;
  text-decoration: none;
}
.tb-guide-chips__chip:hover { background: var(--rule); color: var(--ink); }
.tb-guide-chips__chip--sub { color: var(--ink-3); }
.tb-guide-chips__chip--stays { background: var(--ink); color: var(--paper); font-weight: 600; }
.tb-guide-chips__chip--stays:hover { background: var(--ink); color: var(--paper); opacity: .9; }
.tb-guide-chips__chip--hotels { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.tb-guide-chips__chip--hotels:hover { background: var(--accent-soft); color: var(--accent-ink); }
.tb-guide-chips__chip[aria-current="page"] {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  border-color: var(--ink);
}

/* =========================================================
   >= 1620px: sidebar in the right gutter, under the hero then sticky
   ========================================================= */
@media (min-width: 1620px) {
  .tb-stays {
    --tb-gw: min(250px, calc((100vw - var(--site-w)) / 2 - 28px));
    position: fixed;
    top: var(--tb-stays-top, 140px);
    right: calc((100vw - var(--site-w)) / 2 - var(--tb-gw) - 12px);
    width: var(--tb-gw);
    max-height: calc(100vh - var(--tb-stays-top, 140px) - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    z-index: 29;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  body.tb-stays-placed .tb-stays { opacity: 1; pointer-events: auto; }
  /* the right gutter belongs to the sidebar: the eSIM offer card (redesign-offer.js) pops up on the left */
  body:has(.tb-stays) .tb-offer { right: auto; left: 12px; transform: translateX(-24px); }
  body:has(.tb-stays) .tb-offer.is-shown { transform: none; }
  body.tb-guide-hidden .tb-stays {
    opacity: 0;
    pointer-events: none;
  }
}

/* =========================================================
   901-1619px: stays banner in flow
   ========================================================= */
@media (min-width: 901px) and (max-width: 1619px) {
  .tb-stays {
    width: calc(100% - 2 * var(--gutter));
    max-width: calc(var(--site-w) - 2 * var(--gutter));
    margin: 48px auto;
  }
  .tb-stays__card {
    display: grid;
    grid-template-columns: 40% 1fr;
    grid-template-rows: 1fr repeat(4, auto) 1fr;
    column-gap: 28px;
    row-gap: 8px;
    padding: 12px;
    align-items: start;
  }
  .tb-stays__img { grid-column: 1; grid-row: 1 / -1; aspect-ratio: 16 / 10; }
  .tb-stays__kicker { grid-column: 2; grid-row: 2; }
  .tb-stays__title { grid-column: 2; grid-row: 3; font-size: 28px; }
  .tb-stays__copy { grid-column: 2; grid-row: 4; font-size: 15px; max-width: 52ch; }
  .tb-stays__cta { grid-column: 2; grid-row: 5; justify-self: start; padding: 11px 22px; }
}

/* =========================================================
   <= 900px: stays stacks
   ========================================================= */
@media (max-width: 900px) {
  .tb-stays {
    width: calc(100% - 32px);
    margin: 36px auto;
  }
  .tb-stays__img { aspect-ratio: 16 / 10; }
  .tb-stays__title { font-size: 24px; }
  .tb-stays__copy { font-size: 14px; }
}
@media (max-width: 560px) {
  .tb-guide-chips__inner { padding-left: 16px; padding-right: 16px; }
}

@media print {
  .tb-guide-chips,
  .tb-stays { display: none !important; }
}
