/* S2 Busca — mesmo desenho do formulário da loja (s2-frontend, home). */

@font-face {
  font-family: 'S2 Exo 2';
  src: url('fonts/Exo2-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.s2b {
  --s2b-ink: #282521;
  --s2b-text: #3C3935;
  --s2b-muted: #6F6A64;
  --s2b-line: #E5E7EB;
  --s2b-wine: #800000;
  --s2b-wine-hover: #5C0000;
  --s2b-wine-50: #FAF4F4;
  --s2b-wine-100: #F5E8E8;
  --s2b-wine-200: #EBD1D1;
  --s2b-error: #B42318;
  --s2b-surface: #FFFDFB;

  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 28px auto 0;
  font-family: 'S2 Exo 2', 'Exo 2', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  color: var(--s2b-text);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.s2b *, .s2b *::before, .s2b *::after { box-sizing: border-box; }

/*
 * O tema (Hello) pinta botão em :hover/:focus de rosa e o kit do Elementor
 * força fonte/borda em input. O reset fica um degrau acima deles (0,2,1) e as
 * regras do componente usam `.s2b[data-s2b] …` (0,3,0), acima do reset.
 */
.s2b.s2b button, .s2b button:hover, .s2b button:focus, .s2b button:active,
.s2b.s2b input, .s2b.s2b select {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  line-height: inherit;
  min-height: 0;
  height: auto;
  width: auto;
  outline: none;
}
.s2b.s2b button { cursor: pointer; }
.s2b.s2b button:disabled { cursor: not-allowed; }
.s2b[data-s2b] :focus-visible { outline: 2px solid var(--s2b-wine); outline-offset: 2px; }
/* Dentro do campo quem mostra o foco é a borda do próprio campo. */
.s2b[data-s2b] .s2b-field-body :focus-visible { outline: none; }
.s2b svg { display: block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Abas (sobre a foto) ---------- */

.s2b-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.s2b[data-s2b] .s2b-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(40, 37, 33, 0.62);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: background-color .15s, color .15s;
}
.s2b[data-s2b] .s2b-tab:hover { background: rgba(40, 37, 33, 0.8); }
.s2b[data-s2b] .s2b-tab[aria-selected="true"] { background: #fff; color: var(--s2b-wine); }
.s2b[data-s2b] .s2b-tab svg { width: 18px; height: 18px; }

/* ---------- Cartão ---------- */

.s2b-card {
  position: relative;
  padding: 16px;
  border-radius: 20px;
  background: var(--s2b-surface);
  box-shadow: 0 18px 40px -18px rgba(40, 37, 33, 0.45);
}

.s2b-trip { display: flex; gap: 8px; margin-bottom: 12px; }
.s2b[data-s2b] .s2b-trip button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--s2b-line);
  border-radius: 999px;
  background: #fff;
  color: var(--s2b-text);
  font-size: 14px;
  font-weight: 500;
}
.s2b[data-s2b] .s2b-trip button svg { width: 16px; height: 16px; }
.s2b[data-s2b] .s2b-trip button[aria-pressed="true"] { border-color: var(--s2b-wine); background: var(--s2b-wine); color: #fff; }

.s2b-row { display: grid; gap: 12px; align-items: stretch; }
.s2b-row--hotel { grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.s2b-row--flight { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; }

/* ---------- Campo ---------- */

.s2b-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid var(--s2b-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.s2b-field:hover { border-color: #D3D0CC; }
.s2b-field.is-open, .s2b-field:focus-within { border-color: var(--s2b-wine); box-shadow: 0 0 0 3px var(--s2b-wine-100); }
.s2b-field.is-invalid { border-color: var(--s2b-error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.s2b-field > svg { width: 20px; height: 20px; color: var(--s2b-wine); }

.s2b[data-s2b] .s2b-field-body { display: flex; flex-direction: column; min-width: 0; flex: 1; margin: 0; line-height: 1.35; }
.s2b[data-s2b] .s2b-label { margin: 0 0 2px; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--s2b-ink); }
.s2b[data-s2b] .s2b-value, .s2b[data-s2b] .s2b-field input.s2b-input {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: inherit;
  font-weight: 400;
  height: auto;
  line-height: 1.35;
  display: block;
  width: 100%;
  overflow: hidden;
  font-size: 16px;
  color: var(--s2b-ink);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.s2b[data-s2b] .s2b-value.is-placeholder, .s2b[data-s2b] .s2b-field input.s2b-input::placeholder { color: var(--s2b-muted); opacity: 1; }
/* O botão do campo cobre o cartão todo para o clique valer em qualquer ponto. */
.s2b[data-s2b] .s2b-trigger::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }

.s2b[data-s2b] .s2b-swap {
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--s2b-line);
  border-radius: 999px;
  background: #fff;
  color: var(--s2b-text);
  transition: transform .2s;
}
.s2b[data-s2b] .s2b-swap:hover { color: var(--s2b-wine); border-color: var(--s2b-wine-200); }
.s2b[data-s2b] .s2b-swap svg { width: 16px; height: 16px; }

.s2b[data-s2b] .s2b-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: center;
  height: 56px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--s2b-wine);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s;
}
.s2b[data-s2b] .s2b-submit:hover { background: var(--s2b-wine-hover); }
.s2b[data-s2b] .s2b-submit svg { width: 18px; height: 18px; }

.s2b-error {
  margin: 10px 4px 0;
  color: var(--s2b-error);
  font-size: 14px;
  font-weight: 500;
}
.s2b-error:empty { display: none; }

/* ---------- Popovers ---------- */

.s2b-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  padding: 8px;
  border: 1px solid var(--s2b-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 40px -12px rgba(40, 37, 33, 0.28);
  color: var(--s2b-text);
}
.s2b-pop[hidden] { display: none; }

/* Sugestões */
.s2b-pop:not(.s2b-pop--calendar):not(.s2b-pop--people) { width: max(100%, 380px); }
.s2b-option > span:not(.s2b-option-code) { min-width: 0; }
.s2b-options { max-height: 340px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.s2b-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.s2b-option[aria-selected="true"], .s2b-option:hover { background: var(--s2b-wine-50); }
.s2b-option > svg { width: 18px; height: 18px; color: var(--s2b-muted); }
.s2b-option-main { display: block; font-size: 15px; font-weight: 600; color: var(--s2b-ink); }
.s2b-option-sub { display: block; overflow: hidden; font-size: 13px; color: var(--s2b-muted); text-overflow: ellipsis; white-space: nowrap; }
.s2b-option-code { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--s2b-wine); }
.s2b-hint { padding: 10px 12px; font-size: 14px; color: var(--s2b-muted); }

/* Calendário */
.s2b-pop--calendar { width: max-content; padding: 16px; }
.s2b-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.s2b[data-s2b] .s2b-cal-nav {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--s2b-text);
}
.s2b[data-s2b] .s2b-cal-nav:hover:not(:disabled) { background: var(--s2b-wine-50); color: var(--s2b-wine); }
.s2b[data-s2b] .s2b-cal-nav:disabled { opacity: .3; }
.s2b[data-s2b] .s2b-cal-nav svg { width: 18px; height: 18px; }
.s2b-cal-months { display: flex; gap: 28px; }
.s2b-month { width: 280px; }
.s2b-month-title { margin: 0 0 8px; text-align: center; font-size: 15px; font-weight: 600; color: var(--s2b-ink); }
.s2b-month-title::first-letter { text-transform: uppercase; }
.s2b-week, .s2b-days { display: grid; grid-template-columns: repeat(7, 40px); }
.s2b-week span { display: grid; place-items: center; height: 28px; font-size: 12px; font-weight: 600; color: var(--s2b-muted); }
.s2b[data-s2b] .s2b-day {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 14px;
  color: var(--s2b-ink);
}
.s2b[data-s2b] .s2b-day span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; }
.s2b[data-s2b] .s2b-day:hover:not(:disabled) span { background: var(--s2b-wine-100); }
.s2b[data-s2b] .s2b-day:disabled { color: #C9C5C0; }
.s2b[data-s2b] .s2b-day.is-today span { box-shadow: inset 0 0 0 1px var(--s2b-wine-200); }
.s2b[data-s2b] .s2b-day.in-range { background: var(--s2b-wine-50); }
.s2b[data-s2b] .s2b-day.is-start { background: linear-gradient(to right, transparent 50%, var(--s2b-wine-50) 50%); }
.s2b[data-s2b] .s2b-day.is-end { background: linear-gradient(to left, transparent 50%, var(--s2b-wine-50) 50%); }
.s2b[data-s2b] .s2b-day.is-start.is-end { background: none; }
.s2b[data-s2b] .s2b-day.is-start span, .s2b[data-s2b] .s2b-day.is-end span,
.s2b[data-s2b] .s2b-day.is-start:hover span, .s2b[data-s2b] .s2b-day.is-end:hover span { background: var(--s2b-wine); color: #fff; font-weight: 600; }
.s2b-cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--s2b-line); font-size: 14px; color: var(--s2b-muted); }

/* Hóspedes / passageiros */
.s2b-pop--people { width: 340px; padding: 16px; }
.s2b-room + .s2b-room { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--s2b-line); }
.s2b-room-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 14px; font-weight: 700; color: var(--s2b-ink); }
.s2b[data-s2b] .s2b-link { color: var(--s2b-wine); font-size: 14px; font-weight: 600; }
.s2b[data-s2b] .s2b-link:hover { color: var(--s2b-wine-hover); text-decoration: underline; }
.s2b-counter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.s2b-counter-name { display: block; font-size: 15px; font-weight: 600; color: var(--s2b-ink); }
.s2b-counter-hint { display: block; font-size: 12px; color: var(--s2b-muted); }
.s2b-stepper { display: flex; align-items: center; gap: 12px; }
.s2b-stepper output { min-width: 18px; text-align: center; font-size: 16px; font-weight: 600; color: var(--s2b-ink); }
.s2b[data-s2b] .s2b-step {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--s2b-line);
  border-radius: 999px;
  color: var(--s2b-wine);
}
.s2b[data-s2b] .s2b-step:hover:not(:disabled) { border-color: var(--s2b-wine); background: var(--s2b-wine-50); }
.s2b[data-s2b] .s2b-step:disabled { color: #C9C5C0; }
.s2b[data-s2b] .s2b-step svg { width: 14px; height: 14px; }
.s2b-ages { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 0 8px; }
.s2b[data-s2b] .s2b-age { display: flex; flex-direction: column; gap: 4px; margin: 0; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--s2b-muted); }
.s2b[data-s2b] .s2b-age select {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--s2b-line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: var(--s2b-ink);
}
.s2b[data-s2b] .s2b-age select.is-invalid { border-color: var(--s2b-error); }
.s2b-cabin { display: flex; gap: 8px; padding: 8px 0 4px; }
.s2b[data-s2b] .s2b-cabin button {
  flex: 1;
  height: 40px;
  border: 1px solid var(--s2b-line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.s2b[data-s2b] .s2b-cabin button[aria-pressed="true"] { border-color: var(--s2b-wine); background: var(--s2b-wine-50); color: var(--s2b-wine); }
.s2b-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--s2b-line); }
.s2b[data-s2b] .s2b-done {
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--s2b-wine);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.s2b[data-s2b] .s2b-done:hover { background: var(--s2b-wine-hover); }
.s2b-section-title { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--s2b-ink); }

/* No Elementor, o widget de shortcode herda a largura da coluna do título: solta até 1180px. */
.e-con .elementor-element.elementor-widget-shortcode:has(.s2b),
.elementor-section .elementor-element.elementor-widget-shortcode:has(.s2b) {
  --s2b-width: min(1180px, calc(100vw - 32px));
  width: var(--s2b-width) !important;
  max-width: none !important;
  /* Centraliza mesmo quando é mais larga que a coluna (margem negativa). */
  margin-left: calc((100% - var(--s2b-width)) / 2) !important;
  margin-right: 0 !important;
}

.s2b-noscript { color: #fff; font-weight: 600; }

/* ---------- Telas menores ---------- */

@media (max-width: 1080px) {
  .s2b-row--flight { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .s2b-row--flight .s2b-dates { grid-column: 1 / 3; }
  .s2b-row--flight .s2b-submit { grid-column: 1 / -1; width: 100%; }
  .s2b-row--hotel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .s2b-row--hotel .s2b-dest { grid-column: 1 / -1; }
  .s2b-row--hotel .s2b-submit { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 720px) {
  .s2b { margin-top: 20px; }
  .s2b-card { padding: 12px; border-radius: 16px; }
  .s2b-row--hotel, .s2b-row--flight { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .s2b-row--flight .s2b-dates, .s2b-row--hotel .s2b-dest { grid-column: auto; }
  .s2b[data-s2b] .s2b-swap { position: absolute; z-index: 2; right: 24px; margin-top: -24px; transform: rotate(90deg); }
  .s2b-swap-slot { position: relative; height: 0; }
  .s2b-field { min-height: 64px; }
  .s2b[data-s2b] .s2b-tab { flex: 1; justify-content: center; }
  .s2b-pop { left: 0 !important; right: 0; width: auto; min-width: 0; }
  .s2b-pop--people { width: auto; }
  .s2b-pop--calendar { width: auto; padding: 12px; }
  .s2b-month { width: 100%; }
  .s2b-week, .s2b-days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .s2b[data-s2b] .s2b-day { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .s2b *, .s2b *::before, .s2b *::after { transition: none !important; }
}
