/* Base, casca do site e componentes. As cores, a fonte e os raios vêm de css/tokens.css. */

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5rem;
  font-weight: 800;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h2 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: var(--color-link);
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- casca */

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: var(--z-skip-link);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-1);
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.skip-link:focus {
  top: 0.5rem;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: var(--z-top-bar);
  height: var(--top-bar-height);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-1);
}

.top-bar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.logo {
  width: 2.25rem;
  height: 2.25rem;
}

.logo-m {
  stroke: var(--color-text);
}

.top-bar-spacer {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

/* ---------------------------------------------------------------- busca de local na barra */

.place-search {
  position: relative;
  width: min(26rem, 100%);
}

/* No desktop a caixa fica sempre na barra; o botão de abrir é só do celular. */
.place-search-toggle {
  display: none;
}

.place-search-form {
  display: flex;
  gap: 0.375rem;
}

.place-search-input {
  flex: 1;
  min-width: 0;
}

.place-search-submit {
  flex: none;
  padding-inline: 0.75rem;
}

/* Os locais achados abrem por cima do mapa, logo abaixo da caixa. */
.place-search-panel {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface-raised);
  color: var(--color-text);
  box-shadow: var(--shadow-2);
}

.place-search-panel-empty {
  display: none;
}

.place-search-message {
  margin: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.place-search-results {
  display: grid;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.place-search-result {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 0;
  border-radius: var(--radius-1);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.place-search-result:hover,
.place-search-result:focus-visible {
  background: var(--color-background);
}

.place-search-result:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: -3px;
}

/* No celular: só o botão de busca na barra; a caixa e os locais abrem numa faixa por cima do mapa. */
@media (max-width: 47.99rem) {
  .top-bar-spacer {
    justify-content: flex-end;
  }

  .place-search {
    position: static;
    width: auto;
  }

  .place-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: var(--radius-1);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
  }

  .place-search-toggle:focus-visible {
    outline: 3px solid var(--color-focus);
  }

  .place-search-form,
  .place-search-panel {
    display: none;
  }

  .place-search-open .place-search-form {
    display: flex;
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-1);
  }

  .place-search-open .place-search-panel:not(.place-search-panel-empty) {
    display: grid;
    position: fixed;
    top: calc(var(--top-bar-height) + 3.5rem);
    left: 0.75rem;
    right: 0.75rem;
  }
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar-menu {
  display: none;
  position: relative;
}

.top-bar-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-1);
  cursor: pointer;
  color: var(--color-text);
}

.top-bar-menu > summary::-webkit-details-marker {
  display: none;
}

.top-bar-menu > summary:hover {
  background: var(--color-secondary);
}

.top-bar-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-2);
}

.shell-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shell-content:focus {
  outline: none;
}

/* O título recebe o foco ao trocar de página (leitores de tela começam por ele), mas não é clicável: sem contorno. */
h1:focus {
  outline: none;
}

.centered-content {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

@media (max-width: 47.99rem) {
  .top-bar {
    padding: 0 0.75rem;
  }

  .top-bar-actions {
    display: none;
  }

  .top-bar-menu {
    display: block;
  }
}

.footer {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.875rem;
}

.footer a {
  color: var(--color-text-muted);
}

.credits ul {
  margin: 0;
  padding-left: 1.25rem;
}

.credits li + li {
  margin-top: 0.5rem;
}

.credits .card {
  margin-top: 1rem;
}

/* ---------------------------------------------------------------- idioma e tema */

.language-selector {
  display: flex;
  gap: 0.25rem;
}

.language-selector a {
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
}

.language-selector a:hover {
  background: var(--color-secondary);
  color: var(--color-text);
}

.language-selector a[aria-current="true"] {
  background: var(--color-secondary);
  color: var(--color-text);
}

.theme-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.theme-button:hover {
  background: var(--color-secondary);
}

/* Fora do menu do celular, o rótulo fica só para leitores de tela (o botão mostra o ícone). */
.theme-button-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.top-bar-menu-panel .theme-button {
  justify-content: flex-start;
  width: 100%;
  padding: 0 0.75rem;
  white-space: nowrap;
}

/* No menu do celular, a chave mostra se o tema escuro está ligado (aria-pressed, marcado pelo theme.js). */
.top-bar-menu-panel .theme-button::after {
  content: "";
  flex: none;
  width: 2.25rem;
  height: 1.25rem;
  margin-left: auto;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 0.625rem 50%, #FFFFFF 0.375rem, transparent 0.4375rem), var(--color-border-strong);
  /* No alto contraste do sistema os fundos sumiriam e, com eles, a chave. */
  forced-color-adjust: none;
}

.top-bar-menu-panel .theme-button[aria-pressed="true"]::after {
  background: radial-gradient(circle at calc(100% - 0.625rem) 50%, var(--color-primary-text) 0.375rem, transparent 0.4375rem),
    var(--color-primary);
}

.top-bar-menu-panel .theme-button-label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.theme-sun {
  display: none;
}

:root[data-theme="dark"] .theme-sun {
  display: block;
}

:root[data-theme="dark"] .theme-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-moon {
    display: none;
  }
}

/* ---------------------------------------------------------------- inicial: o mapa em tela cheia, ao fundo */

/* A inicial tem a altura exata da tela, sem rolagem: o mapa ocupa tudo abaixo da barra. */
.shell:has(.home) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.home {
  position: relative;
  flex: 1;
  min-height: 0;
}

.map-area {
  position: absolute;
  inset: 0;
  z-index: var(--z-map);
  /* As camadas do mapa (z-index altos do Leaflet) ficam contidas aqui, abaixo da barra, do menu e dos cartões. */
  isolation: isolate;
  background: var(--color-background);
}

.map-canvas {
  position: absolute;
  inset: 0;
  background: var(--color-background);
  font: inherit;
}

/* Enquanto o mapa não sobe, o indicador fica no meio da área do mapa. */
.map-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

/* Pedido de pins em andamento: um giro discreto no alto, sem cobrir o mapa. */
.map-busy {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  z-index: var(--z-map-control);
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
}

/* Aviso do mapa (aproximar, recusa da API): embaixo, no meio, acima dos créditos no celular. */
.map-message {
  position: absolute;
  left: 50%;
  bottom: 3rem;
  z-index: var(--z-map-control);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1.5rem);
  margin: 0;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-2);
  font-size: 0.875rem;
  text-align: center;
}

/* Pin: a etiqueta de preço na cor da finalidade (laranja venda, marinho locação), com a ponta no ponto do anúncio. */
.map-pin {
  background: none;
  border: 0;
}

.map-pin-label {
  position: absolute;
  bottom: 0.375rem;
  left: 0;
  transform: translateX(-50%);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-1);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.map-pin-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.375rem;
  transform: translateX(-50%);
  border: 0.375rem solid transparent;
  border-bottom: 0;
  border-top-color: inherit;
}

.map-pin-sale .map-pin-label {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

.map-pin-rent .map-pin-label {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-text);
}

.map-pin:focus-visible .map-pin-label {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Cluster: círculo marinho com borda laranja e a contagem; cresce com a quantidade. */
.map-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--brand-orange);
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-text);
  box-shadow: var(--shadow-1);
  font-weight: 800;
}

.map-cluster-small {
  width: 2.25rem;
  height: 2.25rem;
  margin: -1.125rem 0 0 -1.125rem;
  font-size: 0.8125rem;
}

.map-cluster-medium {
  width: 2.75rem;
  height: 2.75rem;
  margin: -1.375rem 0 0 -1.375rem;
  font-size: 0.875rem;
}

.map-cluster-large {
  width: 3.25rem;
  height: 3.25rem;
  margin: -1.625rem 0 0 -1.625rem;
  font-size: 0.9375rem;
}

/* Mini card do pin e controles do Leaflet nas cores do tema. */
.map-popup {
  display: grid;
  gap: 0.25rem;
  min-width: 10rem;
}

.map-popup strong {
  font-size: 1rem;
}

.map-area .leaflet-popup-content-wrapper,
.map-area .leaflet-popup-tip,
.map-area .leaflet-bar a,
.map-area .leaflet-control-attribution {
  background: var(--color-surface);
  color: var(--color-text);
}

.map-area .leaflet-popup-content {
  margin: 0.75rem 1rem;
  font: inherit;
}

.map-area .leaflet-bar a {
  border-bottom-color: var(--color-border);
}

.map-area .leaflet-control-attribution a,
.map-area .leaflet-popup-content a {
  color: var(--color-link);
}

/* Cartão do título por cima do mapa; compacto, para o mapa continuar sendo o que aparece. */
.home-callout {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: var(--z-map-overlay);
  max-width: min(24rem, calc(100% - 1.5rem));
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface);
  box-shadow: var(--shadow-2);
}

.home-callout h1 {
  margin: 0;
  font-size: 1.125rem;
}

.home-callout p {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Na inicial, o link dos créditos flutua discreto sobre o mapa (canto esquerdo: o direito fica para a atribuição do
   mapa), sem tirar altura dele. */
.shell:has(.home) .footer {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: var(--z-map-overlay);
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 0.75rem;
}

@media (max-width: 47.99rem) {
  .home-callout {
    top: 0.5rem;
    left: 0.5rem;
    max-width: calc(100% - 1rem);
    padding: 0.5rem 0.75rem;
  }

  .home-callout h1 {
    font-size: 1rem;
  }

  /* No celular, a chamada fica só para leitores de tela e buscadores: o mapa precisa da tela. */
  .home-callout p {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------------- botões */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-primary {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.button-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.button-accent {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.button-accent:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.button-secondary {
  background: var(--color-secondary);
  color: var(--color-secondary-text);
}

.button-secondary:hover:not(:disabled) {
  background: var(--color-secondary-hover);
}

.button-danger {
  background: var(--color-error);
  color: var(--color-error-text);
}

.button-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.button-ghost:hover:not(:disabled) {
  background: var(--color-secondary);
}

.button-block {
  width: 100%;
}

.button-spinner,
.loading-spinner {
  display: inline-block;
  border-radius: 50%;
  border-style: solid;
  border-color: currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}

.button-spinner {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button-spinner,
  .loading-spinner {
    animation-duration: 2.4s;
  }
}

/* ---------------------------------------------------------------- carregando */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  color: var(--color-text-muted);
}

.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 4px;
  border-color: var(--brand-orange);
  border-right-color: transparent;
}

/* ---------------------------------------------------------------- campos */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.field-label {
  font-weight: 700;
  font-size: 0.9375rem;
}

.field-input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-1);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.field-input::placeholder {
  color: var(--color-text-muted);
}

.field-input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 0;
  border-color: var(--color-focus);
}

.field-invalid .field-input {
  border-color: var(--color-error);
}

.field-help {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.field-error {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-error);
}

/* ---------------------------------------------------------------- seletor de localidade */

.location-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.option-list {
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-1);
  background: var(--color-surface);
}

.option {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--radius-1);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.option:hover {
  background: var(--color-secondary);
}

.chosen-city {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.25rem 0.25rem 0.875rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-1);
  background: var(--color-surface);
  font-weight: 700;
}

/* ---------------------------------------------------------------- cartão */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  padding: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
}

.card > :last-child {
  margin-bottom: 0;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ---------------------------------------------------------------- diálogo */

.dialog {
  width: calc(100% - 2rem);
  max-width: 26rem;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 1.5rem;
  border: 0;
  background: var(--color-surface-raised);
  color: var(--color-text);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-2);
}

.dialog::backdrop {
  background: rgba(10, 35, 80, 0.45);
}

:root[data-theme="dark"] .dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
  }
}

.dialog-message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: 700;
  font-size: 1.0625rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ---------------------------------------------------------------- avisos */

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-2);
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  color: var(--color-text);
  box-shadow: var(--shadow-2);
}

.toast-floating {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(28rem, calc(100% - 2rem));
}

.toast-message {
  flex: 1;
  margin: 0;
  font-weight: 600;
}

.toast-success {
  background: var(--color-success-background);
  border-color: var(--color-success);
}

.toast-success .icon {
  color: var(--color-success);
}

.toast-error {
  background: var(--color-error-background);
  border-color: var(--color-error);
}

.toast-error .icon {
  color: var(--color-error);
}

.toast-info {
  background: var(--color-info-background);
  border-color: var(--color-info);
}

.toast-info .icon {
  color: var(--color-info);
}

.toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: -0.25rem -0.375rem -0.25rem 0;
  border: 0;
  border-radius: var(--radius-1);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.toast-close:hover {
  background: var(--color-secondary);
}

/* ---------------------------------------------------------------- página de erro */

.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.error-page .card {
  max-width: 30rem;
  text-align: center;
}

.error-page .logo {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
}

.error-page-code {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  word-break: break-all;
}

/* ---------------------------------------------------------------- página do anúncio */

.listing-page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  min-width: 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.breadcrumb li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.25rem;
}

.breadcrumb a {
  color: var(--color-link);
}

.listing-notice {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-2);
  background: var(--color-info-background);
  color: var(--color-info);
}

/* Galeria: rolagem lateral com encaixe, sem JavaScript; no celular uma foto por vez, no desktop a próxima aparece. */
.listing-gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius-2);
  margin-bottom: 1.25rem;
}

.listing-gallery img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  max-height: 32rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  scroll-snap-align: start;
  border-radius: var(--radius-2);
  background: var(--color-secondary);
}

@media (min-width: 64rem) {
  .listing-gallery img {
    flex-basis: 48rem;
    width: 48rem;
  }
}

.listing-no-photos {
  color: var(--color-text-muted);
}

.listing-body {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 64rem) {
  .listing-body {
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: start;
  }
}

.listing-header h1 {
  margin: 0.25rem 0;
  font-size: 1.75rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.listing-kind,
.listing-place {
  margin: 0;
  color: var(--color-text-muted);
}

.listing-price {
  margin: 0.5rem 0 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
}

.listing-section {
  margin-top: 1.5rem;
}

.listing-section h2,
.listing-contact h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.listing-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing-features li {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-secondary);
  color: var(--color-secondary-text);
  font-weight: 600;
}

.listing-description {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.listing-hint {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.listing-contact {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
}

@media (min-width: 64rem) {
  .listing-contact {
    position: sticky;
    top: calc(var(--top-bar-height) + 1rem);
  }
}

.location-map {
  position: relative;
  margin-bottom: 0.75rem;
  height: 16rem;
  border-radius: var(--radius-2);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--color-border);
  background: var(--color-background);
}

.location-map-canvas {
  position: absolute;
  inset: 0;
  font: inherit;
}

.map-location-area {
  fill: var(--brand-orange);
  fill-opacity: 0.18;
  stroke: var(--brand-orange);
  stroke-width: 2;
}

.map-location-point {
  fill: var(--brand-orange);
  fill-opacity: 1;
  stroke: #FFFFFF;
  stroke-width: 3;
}

/* ---------------------------------------------------------------- cadastro e telas de conta */

.account-page {
  max-width: 34rem;
}

.account-page h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.sign-up-form {
  margin-top: 1.25rem;
}

.form-message {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-1);
  background: var(--color-error-background);
  color: var(--color-error);
  font-weight: 700;
}

.choice-group {
  min-width: 0;
  padding: 0;
  border: 0;
}

.choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choice-option {
  display: flex;
  flex: 1 1 10rem;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-1);
  background: var(--color-surface);
  cursor: pointer;
}

.choice-option:has(input:checked) {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
  font-weight: 700;
}

.choice-option input,
.checkbox-option input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  flex: none;
  accent-color: var(--color-primary);
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}

.checkbox-option input {
  margin-top: 0.2rem;
}

.password-requirements {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.password-requirements li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-requirements .requirement-met {
  color: var(--color-success);
  font-weight: 700;
}

.requirement-dot {
  width: 0.5rem;
  height: 0.5rem;
  margin: 0 0.375rem;
  border-radius: 50%;
  background: var(--color-border-strong);
}

.sign-up-done {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--color-success);
}

.sign-up-done h2 {
  margin: 0;
  color: var(--color-text);
}

.sign-up-done p {
  margin: 0;
  color: var(--color-text);
}

.form-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* ---------------------------------------------------------------- menu da conta na barra superior */

.user-menu-placeholder {
  display: inline-block;
  width: 6rem;
  height: 2.5rem;
}

.user-menu-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-menu {
  position: relative;
}

.user-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 14rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-secondary);
  color: var(--color-secondary-text);
  font-weight: 700;
  cursor: pointer;
}

.user-menu > summary::-webkit-details-marker {
  display: none;
}

.user-menu-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: var(--z-top-bar);
  min-width: 13rem;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-2);
}

.user-menu-panel a,
.user-menu-signout {
  display: block;
  padding: 0.625rem 0.75rem;
  border: 0;
  border-radius: var(--radius-1);
  background: none;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-panel a:hover,
.user-menu-signout:hover {
  background: var(--color-secondary);
}

/* No menu do celular, a conta abre como lista, sem painel flutuante. */
.top-bar-menu-panel .user-menu-links {
  flex-direction: column;
  align-items: stretch;
}

.top-bar-menu-panel .user-menu-panel {
  position: static;
  box-shadow: none;
  border: 0;
  padding: 0;
  margin-top: 0.5rem;
}

.sign-in-form {
  margin-top: 1rem;
}

.sign-in-form .button {
  width: 100%;
  margin-bottom: 0.5rem;
}

.sign-in-signup {
  margin: 1rem 0 0;
}

/* Aviso de e-mail não confirmado, logo abaixo da barra superior. */
.email-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.625rem 1rem;
  background: var(--color-info-background);
  color: var(--color-info);
  border-bottom: 1px solid var(--color-border);
}

.email-notice p {
  margin: 0;
  flex: 1 1 16rem;
  min-width: 0;
}

.email-notice .form-message {
  flex-basis: 100%;
  margin: 0;
}

.email-notice-sent {
  flex-basis: 100%;
  color: var(--color-success);
  font-weight: 700;
}

@media (max-width: 640px) {
  .email-notice {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .email-notice .button {
    min-height: 2.25rem;
    padding: 0.25rem 0.875rem;
  }
}

/* Faixa do ambiente de homologação (Site:Homologation), acima da barra superior. */
.homologation-banner {
  margin: 0;
  padding: 0.25rem 1rem;
  background: var(--color-error);
  color: var(--color-error-text);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
}
