/* FAB + modal de busca global (todas as páginas com tabbar) */

.global-search-fab,
.global-search {
  --global-search-shell-w: 560px;
  --gs-tabbar-h: calc(56px + env(safe-area-inset-bottom, 0px));
}

.global-search-fab {
  position: fixed;
  /* Mesma coluna do .shell / tabbar: 16px da borda direita do layout mobile */
  right: max(
    16px,
    calc((100vw - min(var(--global-search-shell-w), 100vw)) / 2 + 16px),
    env(safe-area-inset-right, 0px)
  );
  bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 2100;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(234, 88, 12, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.22), 0 2px 8px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.global-search-fab:hover {
  background: rgba(234, 88, 12, 0.78);
}

.global-search-fab svg {
  width: 22px;
  height: 22px;
  display: block;
}

.global-search-fab:active {
  transform: scale(0.94);
  background: rgba(234, 88, 12, 0.88);
}

.global-search-fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

html.global-search-open {
  overflow: hidden;
}

html.global-search-open body {
  overflow: hidden;
}

.global-search {
  border: none;
  padding: 0;
  margin: auto;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(440px, calc(min(var(--global-search-shell-w), 100vw) - 28px));
  max-height: min(78dvh, 560px);
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.global-search[open] {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 14px 0;
}

.global-search::backdrop {
  position: fixed;
  inset: -8px;
  bottom: var(--gs-tabbar-h);
  margin: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

html.global-search-open .tabbar.tabbar--public {
  z-index: 2200;
  pointer-events: auto;
}

html.global-search-open .global-search-fab {
  opacity: 0;
  pointer-events: none;
}

html.global-search-open .global-search[open] {
  pointer-events: none;
}

html.global-search-open .global-search__panel {
  pointer-events: auto;
}

html.global-search-navigating.global-search-open .global-search__panel {
  visibility: hidden;
}

.global-search-nav-curtain {
  border: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: var(--bg, #fff);
  pointer-events: none;
}

.global-search-nav-curtain::backdrop {
  background: var(--bg, #fff);
}

.global-search__panel {
  width: 100%;
  max-height: min(78dvh, 560px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.global-search__head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line, #e2e5ec);
}

.global-search__head-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-search__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 44px;
  border-radius: 12px;
  background: #f4f5f8;
  border: 1px solid transparent;
}

.global-search__field:focus-within {
  border-color: rgba(241, 90, 36, 0.45);
  background: #fff;
}

.global-search__field svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #7b8194;
}

.global-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  /* ≥16px evita zoom automático no iOS ao focar */
  font-size: max(16px, 1rem);
  color: var(--ink, #0f172a);
  outline: none;
  -webkit-text-size-adjust: 100%;
}

.global-search__input::placeholder {
  color: #9aa0b0;
}

.global-search__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f4f5f8;
  color: #5c6378;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-search__view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 10px;
  padding: 3px;
  border-radius: 10px;
  background: #f4f5f8;
}

.global-search__view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: #f4f5f8;
}

.global-search__view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7b8194;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.global-search__view-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.global-search__view-btn.is-active {
  background: #fff;
  color: var(--brand, #ea580c);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.global-search__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 12px;
}

.global-search__body[data-global-search-layout="grid"] {
  padding: 10px 12px 12px;
}

.global-search__box-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.global-search__box-item {
  min-width: 0;
}

.global-search__box-item--empresa .biz-card {
  aspect-ratio: 1 / 1;
}

.global-search__box-item--promo .promo-card,
.global-search__box-item--evento .highlight-card,
.global-search__box-item--guia_ponto .highlight-card,
.global-search__box-item--guia_roteiro .highlight-card,
.global-search__box-item--guia_influencer .highlight-card {
  width: 100%;
  flex: none;
  margin: 0;
  scroll-snap-align: unset;
}

.global-search__box-item--promo .promo-card {
  display: block;
  min-height: 100%;
  box-sizing: border-box;
}

.global-search__box-item--evento .highlight-card,
.global-search__box-item--guia_ponto .highlight-card,
.global-search__box-item--guia_roteiro .highlight-card,
.global-search__box-item--guia_influencer .highlight-card,
.global-search__box-item--guia_ponto .global-search__guia-card,
.global-search__box-item--guia_roteiro .global-search__guia-card,
.global-search__box-item--guia_influencer .global-search__guia-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

.global-search__box-item--evento .highlight-img,
.global-search__box-item--guia_ponto .highlight-img,
.global-search__box-item--guia_roteiro .highlight-img,
.global-search__box-item--guia_influencer .highlight-img {
  height: 112px;
}

.global-search__box-item--promo .promo-card {
  display: block;
  min-height: 100%;
  box-sizing: border-box;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line, #e2e5ec);
  border-radius: var(--radius-lg, 16px);
  padding: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.global-search__box-item--promo .promo-card:active {
  transform: scale(0.97);
}

.global-search__box-item--promo .promo-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent, #ea580c);
  color: #fff;
  font-family: var(--font-display, inherit);
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 6px 12px;
  border-bottom-left-radius: 12px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search__box-item--promo .promo-badge--esgotado,
.global-search__box-item--promo .promo-badge--state {
  background: #64748b;
}

.global-search__box-item--promo .promo-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--accent-soft, #fff7ed);
  border: 1px solid rgba(234, 88, 12, 0.18);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: var(--accent, #ea580c);
}

.global-search__box-item--promo .promo-icon svg {
  width: 18px;
  height: 18px;
}

.global-search__box-item--promo .promo-place {
  font-size: 0.6875rem;
  color: var(--ink-faint, #7b8194);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 4px;
}

.global-search__box-item--promo .promo-title {
  font-family: var(--font-display, inherit);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--ink, #111018);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.global-search__box-item--promo .promo-expiry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--ink-faint, #7b8194);
}

.global-search__box-item--promo .promo-expiry svg {
  width: 12px;
  height: 12px;
}

.global-search__box-item--evento .highlight-card {
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line, #e2e5ec);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.global-search__box-item--evento .highlight-card:active {
  transform: scale(0.97);
}

.global-search__box-item--evento .highlight-img {
  width: 100%;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0f172a;
  position: relative;
  overflow: hidden;
}

.global-search__box-item--evento .highlight-img__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.global-search__box-item--evento .highlight-body {
  padding: 11px 12px 13px;
}

.global-search__box-item--evento .highlight-name {
  font-family: var(--font-display, inherit);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
  line-height: 1.2;
  color: var(--ink, #111018);
}

.global-search__box-item--evento .highlight-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--ink-faint, #7b8194);
}

.global-search__box-item--evento .highlight-meta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.global-search__box-item--evento .highlight-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.global-search__box-item--evento .tag-festa { background: rgba(124, 92, 252, 0.7); color: #e9d5ff; }
.global-search__box-item--evento .tag-gastronomia { background: rgba(234, 88, 12, 0.7); color: #ffedd5; }
.global-search__box-item--evento .tag-praia { background: rgba(56, 189, 248, 0.7); color: #e0f2fe; }
.global-search__box-item--evento .tag-cultura { background: rgba(251, 146, 60, 0.7); color: #fff7ed; }
.global-search__box-item--evento .tag-bemestar { background: rgba(34, 197, 94, 0.65); color: #ecfdf5; }
.global-search__box-item--evento .tag-musica { background: rgba(99, 102, 241, 0.65); color: #eef2ff; }

.global-search__box-item--guia_ponto .global-search__guia-card,
.global-search__box-item--guia_roteiro .global-search__guia-card,
.global-search__box-item--guia_influencer .global-search__guia-card {
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line, #e2e5ec);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

@media (min-width: 420px) {
  .global-search__box-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

.global-search__hint,
.global-search__empty,
.global-search__loading {
  padding: 28px 20px;
  text-align: center;
  color: #7b8194;
  font-size: 14px;
  line-height: 1.45;
}

.global-search__empty strong {
  display: block;
  color: var(--ink, #0f172a);
  margin-bottom: 4px;
}

.global-search__group-label {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa0b0;
}

.global-search__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.global-search__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.global-search__item:active,
.global-search__item:focus-visible {
  background: #f8f9fc;
  outline: none;
}

.global-search__thumb {
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #ffe8de, #ffd4c4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-search__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.global-search__thumb-icon {
  width: 20px;
  height: 20px;
  color: var(--brand, #f15a24);
}

.global-search__text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.global-search__title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink, #0f172a);
  display: block;
  width: 100%;
}

.global-search__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}

.global-search__subtitle {
  font-size: 13px;
  line-height: 1.35;
  color: #7b8194;
  display: block;
  width: 100%;
}

.global-search__kind {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--brand, #ea580c);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.global-search__list .global-search__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search__list .global-search__subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .global-search[open] {
    top: 0;
    right: 0;
    bottom: var(--gs-tabbar-h);
    left: 0;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
    box-sizing: border-box;
  }

  .global-search[open] .global-search__panel {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .global-search__head {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }

  .global-search__body {
    padding-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-search-fab {
    transition: none;
  }
}

/* Seletor de idioma — canto inferior esquerdo (espelha o FAB de busca) */
.guia-langbar {
  --guia-lang-shell-w: 560px;
  position: fixed;
  left: max(
    16px,
    calc((100vw - min(var(--guia-lang-shell-w), 100vw)) / 2 + 16px),
    env(safe-area-inset-left, 0px)
  );
  bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 2099;
  pointer-events: none;
}

.guia-langbar__inner {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  pointer-events: auto;
}

.guia-langbar__btn {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #6b7280);
  font-family: var(--font-body, 'Plus Jakarta Sans', system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.guia-langbar__btn.is-active {
  background: var(--accent, #ea580c);
  color: #fff;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.22);
}

.guia-langbar__btn:active:not(:disabled) {
  transform: scale(0.96);
}

.guia-langbar__btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.guia-langbar__btn:focus-visible {
  outline: 2px solid var(--accent, #ea580c);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .guia-langbar__btn {
    transition: none;
  }
}
