/*
 * Travel Platform brand override.
 * Loaded after the GoTrip theme's main.css. The theme drives its primary colour
 * through the `--color-blue-1` custom property, so re-pointing it recolours the
 * whole UI (buttons, links, accents) to the Travel Platform teal palette.
 */
:root {
  --color-blue-1: #22bfc8;

  --bs-primary-rgb: 34, 191, 200;
  --bs-primary-50: #e3f8f9;
  --bs-primary-100: #c7f1f3;
  --bs-primary-200: #8fe4e7;
  --bs-primary-300: #57d6db;
  --bs-primary-400: #2fc9cf;
  --bs-primary-500: #22bfc8;
  --bs-primary-600: #1eaab3;
  --bs-primary-700: #1a959e;
  --bs-primary-800: #178089;
  --bs-primary-900: #136b74;
  --bs-body-color: #212927;
  --bs-form-control-bg: #fff;
  --bs-primary-green: #0b7d82;
  --bs-primary-gray: #383838;
}

/* Keep hover/darker accents inside the teal family. */
.button.-dark-1 {
  background-color: var(--bs-primary-600);
  border-color: var(--bs-primary-600);
}
.button.-dark-1:hover {
  background-color: var(--bs-primary-700);
  border-color: var(--bs-primary-700);
}

body {
  color: var(--bs-body-color);
  /* Sticky footer: keep the footer pinned to the bottom even on short pages. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1 0 auto;
}
.footer {
  flex-shrink: 0;
}

/* Brand wordmark sizing in the header. */
.header-logo img {
  height: 44px;
  width: auto;
}

/*
 * The vendored theme ships no width utility, so `w-100` (used on full-width buttons /
 * inputs on mobile) was a no-op — the Search button never filled its column. Define it.
 */
.w-100 { width: 100% !important; }

/* The theme ships h-50/h-60 only; the floating-label .form-input is 70px tall, so a button
   sitting next to one needs h-70 to line up. */
.h-70 { height: 70px !important; }

/* Comfortable tap targets + no overflow for form controls on small screens. */
.form-control { max-width: 100%; }
@media (max-width: 767px) {
  /* Buttons that opt into full width on mobile via .w-100 already stretch; ensure the
     hero search + filter controls never spill past the viewport. */
  .dest-suggest { max-height: 260px; }
}

/*
 * Footer: the theme's bg-dark-3 is a navy blue. Use a neutral dark charcoal with a
 * subtle teal tint so it complements the brand instead of reading as blue.
 */
.footer--tp {
  background-color: #1d2a2b;
}
.footer--tp .text-white-80 { color: rgba(255, 255, 255, 0.80); }
.footer--tp .text-white-60 { color: rgba(255, 255, 255, 0.60); }

/* Lightweight loading spinner (async rooms / lists). */
.tp-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--bs-primary-100, #c7f1f3);
  border-top-color: var(--color-blue-1);
  border-radius: 50%;
  animation: tp-spin 0.8s linear infinite;
}
@keyframes tp-spin { to { transform: rotate(360deg); } }

/* Home hero: extra room below the search form so the date / guests dropdowns open without
   overlapping the footer (their popovers are ~340px tall). */
.masthead.-type-1 {
  padding-bottom: 380px;
}
@media (max-width: 991px) {
  .masthead.-type-1 {
    padding-bottom: 380px;
  }
}

/* Softer overlay over the Rio hero photo: dark enough for white text + the search card,
   light enough to keep the city/bay visible. Overrides the theme's heavier left gradient. */
.masthead.-type-1 .masthead__bg::after {
  background: linear-gradient(180deg, rgba(5, 16, 54, 0.50) 0%, rgba(5, 16, 54, 0.66) 100%);
  opacity: 1;
}

/* Range date-picker (tp-calendar.js) — theme-styled popover calendar. */
.tp-cal { position: relative; }
.tp-cal__display { cursor: pointer; background: #fff; }
.tp-cal__pop {
  display: none;
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  margin-top: 6px;
  width: 320px;
  max-width: 92vw;
  padding: 18px;
  background: #fff;
  border: 1px solid #e3eaea;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.tp-cal.is-open .tp-cal__pop { display: block; }
.tp-cal__row--wd, .tp-cal__days { display: grid; grid-template-columns: repeat(7, 1fr); }
.tp-cal__wd { text-align: center; padding: 6px 0; }
.tp-cal__cell {
  text-align: center;
  line-height: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}
.tp-cal__cell--empty { cursor: default; }
.tp-cal__cell:not(.tp-cal__cell--empty):not(.is-disabled):hover { background: var(--bs-primary-50, #e3f8f9); }
.tp-cal__cell.is-disabled { color: #c7cfce; cursor: not-allowed; }
.tp-cal__cell.is-in-range { background: var(--bs-primary-50, #e3f8f9); border-radius: 0; }
.tp-cal__cell.-is-active { background: var(--color-blue-1, #22bfc8); color: #fff; }

/* Theme-styled select dropdown (tp-dropdown.js). */
.tp-dd { position: relative; }
.tp-dd__btn { cursor: pointer; background: #fff; text-align: left; }
.tp-dd__menu {
  display: none;
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e3eaea;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}
.tp-dd.is-open .tp-dd__menu { display: block; }
.tp-dd__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  background: none;
  border: 0;
  font-size: 14px;
  cursor: pointer;
}
.tp-dd__item:hover { background: var(--bs-primary-50, #e3f8f9); }
.tp-dd__item.is-active { color: var(--color-blue-1, #22bfc8); font-weight: 500; }

/* Guests selector (tp-guests.js) — theme-styled popover with +/- counters. */
.tp-guests { position: relative; }
.tp-guests__display { cursor: pointer; background: #fff; }
.tp-guests__pop {
  display: none;
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  margin-top: 6px;
  width: 300px;
  max-width: 92vw;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.tp-guests.is-open .tp-guests__pop { display: block; }

/* Maintenance snackbar (API unreachable). Uses the brand teal + Jost via the theme body font. */
.tp-snackbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 200%);
  z-index: 1000;
  display: flex;
  align-items: center;
  max-width: 92vw;
  padding: 14px 22px;
  border-radius: 8px;
  background: #1d2a2b;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: transform .35s cubic-bezier(.165,.84,.44,1), opacity .35s;
  pointer-events: none;
}
.tp-snackbar.is-shown {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Destination autocomplete. */
.dest-autocomplete {
  position: relative;
}
.dest-suggest {
  display: none;
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e3eaea;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  max-height: 320px;
  overflow-y: auto;
}
.dest-suggest__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}
.dest-suggest__item:hover {
  background: var(--bs-primary-50, #e3f8f9);
}
.dest-suggest__kind {
  font-size: 12px;
  color: #8a969b;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ---------------------------------------------------------------------------
   Hotel gallery (detail page): a hero with a 2×2 thumbnail grid whose total
   height matches the hero. Images are absolutely positioned so the side grid
   stretches to the hero's height instead of being driven by image dimensions.
   --------------------------------------------------------------------------- */
.tp-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.tp-gallery--single { grid-template-columns: 1fr; }
.tp-gallery__main,
.tp-gallery__cell {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: #eef1f1;
  border-radius: 12px;
  overflow: hidden;
}
.tp-gallery__main,
.tp-gallery__cell:not(.tp-gallery__cell--empty) { cursor: pointer; }
.tp-gallery__main { aspect-ratio: 16 / 10; }
.tp-gallery__main img,
.tp-gallery__cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.tp-gallery__main:hover img,
.tp-gallery__cell:hover img { transform: scale(1.05); }
.tp-gallery__side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}
.tp-gallery__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 16, 54, .5);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  pointer-events: none;
}
@media (max-width: 767px) {
  .tp-gallery { grid-template-columns: 1fr; }
  .tp-gallery__side { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; }
  .tp-gallery__cell { aspect-ratio: 1 / 1; }
}

/* Fullscreen image lightbox (hotel gallery). */
.tp-lb { position: fixed; inset: 0; z-index: 2000; display: none; }
.tp-lb.is-open { display: block; }
.tp-lb__backdrop { position: absolute; inset: 0; background: rgba(5, 16, 54, .92); }
.tp-lb__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 84px;
}
.tp-lb__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5);
}
.tp-lb__count {
  position: absolute;
  top: 22px;
  left: 26px;
  z-index: 2;
  color: rgba(255, 255, 255, .85);
  font-size: 15px;
  letter-spacing: .3px;
}
.tp-lb__close {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 2;
  width: 46px;
  height: 46px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}
.tp-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}
.tp-lb__nav:hover { background: rgba(255, 255, 255, .24); }
.tp-lb__nav--prev { left: 18px; }
.tp-lb__nav--next { right: 18px; }
.tp-lb--single .tp-lb__nav { display: none; }
@media (max-width: 767px) {
  .tp-lb__stage { padding: 64px 12px; }
  .tp-lb__nav { width: 44px; height: 44px; font-size: 28px; }
  .tp-lb__nav--prev { left: 6px; }
  .tp-lb__nav--next { right: 6px; }
}

/* Available rooms: Booking.com-style rows with full rate detail + a quantity selector.
   The buy column (rooms → price → reserve) stays to the right of the content down to phones. */
.tp-rooms { display: flex; flex-direction: column; gap: 16px; }
.tp-room {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 18px 28px;
  align-items: start;
}
.tp-room__info { display: flex; gap: 18px; min-width: 0; align-items: flex-start; }
/* Media column: a squarer (4:3) photo top-aligned with the room name, with the rate terms beneath. */
.tp-room__media { width: 180px; flex-shrink: 0; }
.tp-room__thumb { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #eef1f1; }
.tp-room__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-room__details { flex: 1; min-width: 0; }
.tp-room__name { line-height: 1.3; }

.tp-room__facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.tp-fact { display: inline-flex; align-items: center; font-size: 14px; color: #5a6672; }
.tp-fact i { margin-right: 8px; }

/* Auth pages (login): the Rio hero photo as a full-bleed background with a dark overlay so the
   white card stays readable — same image as the home masthead. */
.tp-auth { position: relative; background-color: #0b1f33; }
.tp-auth::before {
  content: ""; position: absolute; inset: 0;
  background: url("/img/masthead/rio.jpg") center / cover no-repeat;
}
.tp-auth::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 16, 54, .55) 0%, rgba(5, 16, 54, .72) 100%);
}
.tp-auth > .container { position: relative; z-index: 1; }

/* Inline alert component (booking confirmation / error / warning / info messaging). */
.tp-alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 8px; border: 1px solid transparent; margin-bottom: 20px; }
.tp-alert__icon { font-size: 18px; margin-top: 1px; flex-shrink: 0; }
.tp-alert__body { min-width: 0; }
.tp-alert__title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.tp-alert__msg { font-size: 14px; line-height: 1.45; }
.tp-alert--error { color: #a32130; background: #fdecee; border-color: #f7c9ce; }
.tp-alert--warning { color: #8a5a00; background: #fff6e6; border-color: #ffe0a3; }
.tp-alert--success { color: #157347; background: #e8f6ee; border-color: #bfe6cd; }
.tp-alert--info { color: #1a5f9e; background: #eaf2fc; border-color: #c4ddf7; }

/* Board (meal plan) headline: bold, no icon, flush to the left. Green when a meal is included. */
.tp-room__board { font-weight: 600; font-size: 13px; line-height: 1.35; margin-top: 12px; }
.tp-room__board--ok { color: #157347; }
.tp-room__board--muted { color: #4a5560; }

/* Rate terms (cancellation, payment, late-cancellation fee): compact icon+text lines stacked under
   the board. flex-start + a small top offset keeps the icon aligned with wrapped text. */
.tp-room__terms { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.tp-room__term { display: flex; align-items: flex-start; font-size: 13px; line-height: 1.35; }
.tp-room__term i { margin-right: 8px; margin-top: 2px; flex-shrink: 0; }
.tp-room__term span { min-width: 0; }
/* Aligns icon-less term lines (e.g. "Room only") with the iconned ones above/below. */
.tp-room__term-spacer { display: inline-block; width: 21px; flex-shrink: 0; }
.tp-room__term--ok { color: #157347; }
.tp-room__term--muted { color: #6b7785; }
.tp-room__term--info { color: var(--bs-primary-700, #1a959e); }

.tp-room__amen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tp-chip { font-size: 12px; color: #4a5560; background: #f5f7f8; border: 1px solid #eef1f1; border-radius: 20px; padding: 4px 11px; }
.tp-chip--more { color: var(--color-blue-1, #22bfc8); background: transparent; border-color: transparent; font-weight: 500; padding-left: 4px; }

.tp-room__tax { display: flex; align-items: flex-start; margin-top: 12px; }
.tp-room__tax i { margin-right: 8px; margin-top: 2px; flex-shrink: 0; }

/* Right-hand buy column: rooms → price → reserve, then the urgency cue beneath the button (CTA). */
.tp-room__aside { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.tp-room__buy { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.tp-room__buy .tp-qty-select { width: 100%; }
.tp-room__buy .button { width: 100%; justify-content: center; }
/* Urgency cue reinforces the call to action — centred directly beneath the Reserve button. */
.tp-room__left { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #c0392b; }
.tp-room__left i { margin-right: 6px; }

.tp-room__price { text-align: right; white-space: nowrap; }
.tp-room__price-from { font-size: 13px; color: #8a969b; }
.tp-room__price-amount { font-size: 22px; font-weight: 600; }
.tp-room__pernight { font-size: 13px; color: #8a969b; margin-top: 2px; }
.tp-room__price-note { font-size: 12px; color: #8a969b; margin-top: 2px; }
.tp-room__qty-label { font-size: 12px; color: #8a969b; margin-bottom: 5px; }
.tp-qty-select {
  height: 44px;
  border: 1px solid var(--color-border, #dddddd);
  border-radius: 8px;
  padding: 0 38px 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-dark-1, #051036);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23697488' stroke-width='1.6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
.tp-qty-select:focus {
  outline: none;
  border-color: var(--color-blue-1, #22bfc8);
  box-shadow: 0 0 0 3px rgba(34, 191, 200, 0.15);
}
/* On phones the buy column drops below, and the photo sits beside its rate terms (a row spanning the
   full width) so the longer cancellation line doesn't crush under a narrow thumbnail. */
@media (max-width: 575px) {
  .tp-room { grid-template-columns: 1fr; }
  .tp-room__info { flex-direction: column; gap: 14px; }
  .tp-room__media { width: 100%; display: flex; gap: 14px; align-items: flex-start; }
  .tp-room__thumb { width: 44%; max-width: 200px; }
  .tp-room__media .tp-room__terms { flex: 1; margin-top: 0; }
}

/* Mobile menu: the theme forces a permanent vertical scrollbar on the open nav list
   (.header-menu.is-menu-active .-is-active { overflow-y: scroll }) even when the few links
   fit, which shows as an empty scroll gutter on the right of the menu. Scroll only when the
   content actually overflows. */
@media (max-width: 1199px) {
  .header .header-menu.is-menu-active .menu__nav.-is-active { overflow-y: auto; }
}

