/* Estilos do formulário de agendamento (modal), extraídos do apple.css para a página nova.
   O modal é montado pelo assets/js/apple.js. Mexer aqui só se o visual do formulário mudar. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}

:root {
  /* Verde Esmeralda Noturna / Veludo Nobre:
     Substitui o antigo musgo/oliva terroso por um tom de joalheria,
     profundo e acetinado, com alto contraste e requinte sob a luz do ouro. */
  --verde-950: #041410;
  --verde-900: #072019;
  --verde-800: #0A2B22;   /* cor base: verde esmeralda aveludado */
  --verde-700: #113C30;
  --verde-600: #1B5443;
  --verde-500: #26725B;
  --jade-claro: #A3C9B8;

  /* Latão escovado da fonte. */
  --ouro-claro: #E8D1A0;
  --ouro: #C9A45C;
  --ouro-escuro: #9C7A3E;

  --marfim: #F5F1E8;
  --marfim-72: rgba(245, 241, 232, .72);
  --marfim-60: rgba(245, 241, 232, .60);
  --linha: rgba(232, 209, 160, .16);

  --fonte: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(20px, 5vw, 48px);

  /* Tokens de Vidro & Vibrancy (Apple Liquid Glass) */
  --vidro-blur: 24px;
  --vidro-saturate: 180%;
  --vidro-borda: 1px solid rgba(255, 255, 255, .16);
  --vidro-brilho: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -1px 0 rgba(0, 0, 0, .2);
  --vidro-sombra: 0 20px 48px -12px rgba(0, 0, 0, .45);
  --vidro-sheen: linear-gradient(135deg, rgba(255, 255, 255, .15) 0%, rgba(255, 255, 255, 0) 50%);
}


@property --anel {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.botao {
  --mx: 50%;
  --my: -120%;                     /* reflexo do mouse fora do botão até passar por cima */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 251, 238, .6), rgba(255, 251, 238, 0) 42%),
    linear-gradient(180deg, #E6C88E 0%, #CFAD68 48%, #B38C48 100%);
  color: var(--verde-900);
  font: 600 17px/1 var(--fonte);
  letter-spacing: -.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 222, .75),
    inset 0 -1px 0 rgba(80, 56, 20, .35),
    0 1px 2px rgba(3, 12, 7, .35),
    0 10px 30px -8px rgba(201, 164, 92, .45);
  cursor: pointer;
  transition: transform .3s var(--ease), filter .3s var(--ease);
  animation: botao-halo 3.6s ease-in-out infinite;
}

/* O fio de luz girando na borda. */
.botao::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--anel),
    rgba(255, 251, 235, 0) 0deg,
    rgba(255, 251, 235, 0) 230deg,
    rgba(255, 251, 235, .95) 300deg,
    rgba(255, 251, 235, 0) 345deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: botao-anel 4.5s linear infinite;
  pointer-events: none;
}

/* A faixa de brilho que atravessa. */
.botao::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  z-index: -1;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 250, 235, .6), transparent);
  transform: skewX(-18deg);
  animation: botao-brilho 4.5s var(--ease) infinite;
  pointer-events: none;
}

.botao__seta {
  width: 18px;
  height: 18px;
  transition: transform .3s var(--ease);
}

.botao--pequeno {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

@keyframes botao-anel { to { --anel: 360deg; } }

@keyframes botao-brilho {
  0%, 62% { left: -60%; }
  100%    { left: 130%; }
}

@keyframes botao-halo {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 246, 222, .75), inset 0 -1px 0 rgba(80, 56, 20, .35), 0 1px 2px rgba(3, 12, 7, .35), 0 10px 30px -8px rgba(201, 164, 92, .4); }
  50%      { box-shadow: inset 0 1px 0 rgba(255, 246, 222, .75), inset 0 -1px 0 rgba(80, 56, 20, .35), 0 1px 2px rgba(3, 12, 7, .35), 0 14px 42px -6px rgba(201, 164, 92, .72); }
}

@media (hover: hover) and (pointer: fine) {
  .botao:hover { transform: translateY(-2px); filter: brightness(1.05); }
  .botao:hover .botao__seta { transform: translateX(4px); }
}

.botao:active { transform: translateY(0) scale(.98); }

/* ============================================================
   Modal de agendamento — Apple Liquid Glass Conversacional
   Diálogo translúcido ultra-elegante em passos atômicos.
   Design leve, estilo vidro fosco premium, tipografia refinada.
   ============================================================ */

html:has(.modal[open]) { overflow: hidden; }

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

.modal {
  width: min(500px, calc(100% - 32px));
  max-width: 500px;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  overflow: visible;
}

.modal::backdrop {
  background: rgba(1, 9, 6, 0.38);
  -webkit-backdrop-filter: blur(5px) saturate(120%);
          backdrop-filter: blur(5px) saturate(120%);
}

.modal__painel--conversa {
  position: relative;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: clamp(28px, 4vw, 36px);
  border: 1px solid rgba(238, 244, 239, 0.30);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .035) 30%, rgba(201, 164, 92, .03) 100%),
    rgba(7, 24, 18, 0.50);
  -webkit-backdrop-filter: blur(30px) saturate(165%) brightness(.96);
          backdrop-filter: blur(30px) saturate(165%) brightness(.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(201, 164, 92, .08),
    0 28px 72px -18px rgba(0, 0, 0, 0.70);
}

.modal__painel--conversa::-webkit-scrollbar { display: none; }

/* ----- Barra Superior (Voltar + Stepper + Fechar) ----- */

.modal__topo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 36px;
  gap: 16px;
  margin-bottom: 22px;
  padding-inline: 6px;
}

.modal__voltar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font: 500 13px/1 var(--fonte);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.modal__voltar:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}
.modal__voltar svg { width: 14px; height: 14px; }
.modal__voltar[data-oculto] {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal__trilhos {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  justify-self: center;
}

.modal__trilho-item {
  flex: none;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.modal__trilho-item--ativo {
  background: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.modal__fechar {
  position: absolute;
  top: -8px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.70);
  cursor: pointer;
  transition: color .2s var(--ease), transform .2s var(--ease), background-color .2s var(--ease);
}
.modal__fechar:hover {
  background: transparent;
  color: #FFFFFF;
}
.modal__fechar:active { transform: scale(.92); }
.modal__fechar:focus-visible {
  outline: none;
  color: var(--ouro-claro);
  filter: drop-shadow(0 0 5px rgba(226, 194, 128, .45));
}
.modal__fechar svg { width: 18px; height: 18px; }

/* ----- Passos do Fluxo Conversacional ----- */

.modal__fluxo {
  position: relative;
  min-height: 218px;
  display: flex;
  flex-direction: column;
}

.modal__passo {
  display: none;
  flex-direction: column;
  flex: 1;
}
.modal__passo[data-ativo] {
  display: flex;
  animation: modal-passo-entra .28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-passo-entra {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal__pergunta {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 1.25rem + 0.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  color: #FFFFFF;
}

.modal__contexto {
  margin: -8px 0 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.45;
}
.modal__nome-destaque {
  color: #FFFFFF;
  font-weight: 700;
}

/* Campos de entrada conversacionais */
.modal__campo-conversa {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.modal__campo-conversa input:not([type=checkbox]),
.modal__campo-conversa textarea {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
  font: 400 16px/1.4 var(--fonte);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.modal__campo-conversa textarea {
  min-height: 84px;
  resize: vertical;
}

.modal__campo-conversa input::placeholder,
.modal__campo-conversa textarea::placeholder {
  color: rgba(255, 255, 255, 0.40);
}

.modal__campo-conversa input:hover,
.modal__campo-conversa textarea:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}

.modal__campo-conversa input:focus,
.modal__campo-conversa textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.modal__campo-conversa input:-webkit-autofill {
  -webkit-text-fill-color: #FFFFFF;
  -webkit-box-shadow: 0 0 0 100px #181A1F inset;
  caret-color: #FFFFFF;
}

.modal__erro {
  display: block;
  margin-top: 6px;
  min-height: 18px;
  color: #FF8F8F;
  font-size: 13px;
  line-height: 1.3;
}
.modal__erro:empty {
  visibility: hidden;
}

.modal__erro--aceite {
  margin-top: 4px;
}

/* Aceite LGPD elegante */
.modal__aceite-wrapper {
  margin-bottom: 14px;
}

.aceite {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.70) !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.45;
  cursor: pointer;
}
.aceite input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
}
.aceite__caixa {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 5px;
  background: rgba(255, 255, 255, .06);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.aceite__caixa::after {
  content: "";
  width: 8px;
  height: 4px;
  border: solid #0E1013;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .2s var(--ease);
}
.aceite input:checked + .aceite__caixa {
  border-color: #FFFFFF;
  background: #FFFFFF;
}
.aceite input:checked + .aceite__caixa::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.aceite input:focus-visible + .aceite__caixa { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.aceite a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; }

/* Rodapés de cada passo */
.modal__rodape-passo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.botao--conversa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #0E1013;
  font: 600 15px/1 var(--fonte);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
  min-height: 48px;
}
.botao--conversa:hover {
  transform: translateY(-1px);
  background: #EAEAEA;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.botao--conversa svg {
  width: 15px;
  height: 15px;
  transition: transform .2s var(--ease);
}
.botao--conversa:hover svg {
  transform: translateX(2px);
}

/* Passo 4 - Ações finais */
.modal__acoes-finais {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.botao--whatsapp-pro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 999px;
  background: #25D366;
  color: #FFFFFF;
  font: 600 16px/1 var(--fonte);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px -4px rgba(37, 211, 102, 0.35);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
  min-height: 52px;
}
.botao--whatsapp-pro:hover {
  transform: translateY(-1px);
  background: #20BA5A;
  box-shadow: 0 12px 30px -4px rgba(37, 211, 102, 0.5);
}
.botao--whatsapp-pro svg {
  width: 20px;
  height: 20px;
}

.modal__botao-pular {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font: 400 13px/1.4 var(--fonte);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 6px;
  transition: color .2s var(--ease);
}
.modal__botao-pular:hover {
  color: #FFFFFF;
}

.form__aviso {
  margin: 0;
  color: #FF8F8F;
  font-size: 13px;
  text-align: center;
}
.form__aviso:empty { display: none; }

.form__seguro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  text-align: center;
}
.form__seguro svg { width: 14px; height: 14px; flex: none; opacity: .8; }

/* Animações e abertura */
@media (prefers-reduced-motion: no-preference) {
  .modal[open] .modal__painel--conversa { animation: modal-entra .45s var(--ease); }
  .modal[open]::backdrop { animation: modal-fundo .35s ease; }
}
@keyframes modal-entra {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes modal-fundo {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Celular iOS: folha de vidro translúcida */
@media (max-width: 620px) {
  .modal {
    position: fixed;
    inset: var(--modal-visual-top, 0px) 0 auto 0;
    align-items: flex-end;
    width: 100%;
    height: var(--modal-visual-height, 100dvh);
    max-width: none;
    max-height: none;
    margin: 0;
    overflow: hidden;
  }
  .modal[open] { display: flex; }
  .modal__painel--conversa {
    width: 100%;
    max-height: 100%;
    margin-top: auto;
    padding: 30px 18px calc(20px + env(safe-area-inset-bottom));
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
  }
  .modal__topo {
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    min-height: 34px;
    margin-bottom: 20px;
    padding-inline: 4px;
  }
  .modal__voltar {
    min-height: 44px;
    padding: 7px 10px 7px 7px;
  }
  .modal__fechar {
    top: -13px;
    right: -10px;
    width: 42px;
    height: 42px;
  }
  .modal__trilhos { width: auto; justify-self: center; }
  .modal__contexto { margin-bottom: 16px; }
  .modal__fluxo { min-height: 210px; }
  .modal__pergunta { font-size: 1.4rem; }
  .modal__campo-conversa input:not([type=checkbox]),
  .modal__campo-conversa textarea { border-radius: 14px; }
  .modal__rodape-passo .botao--conversa { width: 100%; justify-content: center; }
  .modal__painel--conversa::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .3);
    transform: translateX(-50%);
  }
  .modal__atalho-dica {
    display: none;
  }
  .modal[data-teclado] .modal__painel--conversa {
    padding: 18px 18px 14px;
    border-radius: 20px 20px 0 0;
  }
  .modal[data-teclado] .modal__topo { margin-bottom: 12px; }
  .modal[data-teclado] .modal__contexto { display: none; }
  .modal[data-teclado] .modal__fluxo { min-height: 190px; }
  @media (prefers-reduced-motion: no-preference) {
    .modal[open] .modal__painel--conversa { animation: modal-sobe .45s var(--ease); }
  }
}

@media (min-width: 621px) and (max-width: 1024px) {
  .modal { width: min(520px, calc(100% - 48px)); }
  .modal__painel--conversa { padding: 32px; }
}

@media (max-height: 560px) {
  .modal__painel--conversa { max-height: calc(var(--modal-visual-height, 100dvh) - 8px); }
  .modal__painel--conversa { padding-top: 22px; padding-bottom: 18px; }
  .modal__topo { margin-bottom: 12px; }
  .modal__contexto { display: none; }
  .modal__fluxo { min-height: 190px; }
}
@keyframes modal-sobe {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

/* Fallback de vidro para navegadores legados (fundo fumê escuro neutro, nunca verde) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .modal__painel--conversa { background: #12141A; }
}

