/* Botão flutuante de WhatsApp e popup de campanha. */

/* ---------- WhatsApp ---------- */

.gm-wa {
  position: fixed;
  right: clamp(0.9rem, 3vw, 1.6rem);
  bottom: clamp(0.9rem, 3vw, 1.6rem);
  z-index: 9000;

  display: inline-flex;
  align-items: center;
  gap: 0.6rem;

  height: 56px;
  padding: 0 1.1rem;
  border-radius: 999px;

  background: #25D366;
  color: #0B3B22;
  font-family: var(--gm-font-display, system-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;

  box-shadow: 0 6px 18px rgba(11, 59, 34, 0.28), 0 2px 6px rgba(11, 59, 34, 0.2);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease;
}
.gm-wa:hover,
.gm-wa:focus-visible {
  color: #0B3B22;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(11, 59, 34, 0.34), 0 3px 8px rgba(11, 59, 34, 0.24);
}
.gm-wa__icon { width: 26px; height: 26px; flex-shrink: 0; }

/* No celular vira só o círculo: o rótulo roubaria metade da tela de leitura. */
@media (max-width: 640px) {
  .gm-wa { width: 56px; padding: 0; justify-content: center; }
  .gm-wa__label { display: none; }
}

/* Sobe um pouco quando o popup está aberto, para não brigar com o botão fechar. */
.gm-popup-open .gm-wa { opacity: 0; pointer-events: none; }

/* ---------- Popup ---------- */

.gm-popup {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}
.gm-popup[hidden] { display: none; }

.gm-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 23, 20, 0.72);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 260ms ease;
}

.gm-popup__box {
  position: relative;
  max-width: min(560px, 100%);
  max-height: 88vh;
  border-radius: var(--gm-radius-lg, 22px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);

  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gm-popup.is-open .gm-popup__backdrop { opacity: 1; }
.gm-popup.is-open .gm-popup__box { opacity: 1; transform: none; }

.gm-popup__box img,
.gm-popup__link {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88vh;
  object-fit: contain;
}

.gm-popup__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;

  background: rgba(31, 23, 20, 0.72);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background-color 140ms ease, transform 140ms ease;
}
.gm-popup__close:hover { background: rgba(31, 23, 20, 0.92); transform: scale(1.06); }

body.gm-popup-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .gm-popup__backdrop,
  .gm-popup__box { transition: none; }
}
