/* ============================================================
   Clínica Arthena — Banner de consentimento
   ============================================================
   Injetado por assets/js/analytics.js. Todo seletor usa o prefixo
   .arthena-consent, então nada aqui alcança o restante do site.

   As cores repetem as variáveis de styles.css com fallback, para o
   banner continuar legível mesmo se o CSS principal falhar.
   ============================================================ */

.arthena-consent {
  position: fixed;
  z-index: 900; /* acima do .wpp, que é 800 */
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--sage, #3d2b1f);
  color: var(--cream, #f2ede8);
  border-top: 1px solid rgba(242, 237, 232, .14);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, .28);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  animation: arthena-consent-in .38s ease both;
}

.arthena-consent:focus { outline: none; }
.arthena-consent:focus-visible {
  outline: 2px solid var(--cream, #f2ede8);
  outline-offset: -4px;
}

.arthena-consent__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 46px);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}

.arthena-consent__copy { flex: 1 1 auto; min-width: 0; }

.arthena-consent__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 6px;
  color: var(--cream, #f2ede8);
}

.arthena-consent__text {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  /* Contraste conferido contra #3d2b1f: 9,6:1 — bem acima do mínimo
     de 4,5:1 da WCAG AA. Não trocar por um tom mais apagado. */
  color: rgba(242, 237, 232, .88);
}

.arthena-consent__link {
  color: var(--cream, #f2ede8);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.arthena-consent__acts {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
}

.arthena-consent__btn {
  font-family: inherit;
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: .02em;
  /* 44px de altura mínima: alvo de toque confortável no celular. */
  min-height: 44px;
  padding: 12px 26px;
  border-radius: 2px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.arthena-consent__btn--solid {
  background: var(--cream, #f2ede8);
  color: var(--sage, #3d2b1f);
  border: 1px solid var(--cream, #f2ede8);
}
.arthena-consent__btn--solid:hover { background: #fff; border-color: #fff; }

.arthena-consent__btn--ghost {
  background: transparent;
  color: var(--cream, #f2ede8);
  border: 1px solid rgba(242, 237, 232, .45);
}
.arthena-consent__btn--ghost:hover { border-color: var(--cream, #f2ede8); }

.arthena-consent__btn:focus-visible {
  outline: 2px solid var(--cream, #f2ede8);
  outline-offset: 3px;
}

/* Enquanto o banner está aberto, o botão flutuante do WhatsApp sobe
   a altura real do banner, medida em JS (--arthena-consent-h).
   O min() é uma trava: se a medição vier errada por algum motivo, o
   botão nunca sobe além de metade da tela. */
body.arthena-consent-open .wpp {
  bottom: min(calc(34px + var(--arthena-consent-h, 150px)), 50vh);
  transition: bottom .3s ease;
}

@keyframes arthena-consent-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Tablet === */
@media (max-width: 1100px) {
  .arthena-consent__inner { gap: 22px; }
  .arthena-consent__text { font-size: .95rem; }
}

/* === Mobile === */
@media (max-width: 640px) {
  .arthena-consent__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .arthena-consent__title { font-size: 1.3rem; }
  .arthena-consent__text { font-size: .92rem; }
  .arthena-consent__acts { flex-direction: column-reverse; gap: 10px; }
  .arthena-consent__btn { width: 100%; padding: 13px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .arthena-consent { animation: none; }
  body.arthena-consent-open .wpp { transition: none; }
}
