/* =====================================================
   WhatsApp — FAB + Modal
   ===================================================== */

/* ---- Botão flutuante (FAB) ---- */
.wa-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px 13px 16px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  animation: wa-pulse 3s ease-in-out infinite;
}
.wa-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.65), 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: none;
}
.wa-fab__label { white-space: nowrap; }

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0,0,0,0.35); }
  50%       { box-shadow: 0 4px 28px rgba(37, 211, 102, 0.80), 0 2px 12px rgba(0,0,0,0.35); }
}

@media (max-width: 640px) {
  .wa-fab {
    bottom: 20px;
    right: 16px;
    padding: 12px 14px;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    justify-content: center;
  }
  .wa-fab__label { display: none; }
}

/* ---- Overlay ---- */
.wa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 28px 96px;
  animation: wa-fade-in 0.18s ease;
}
@keyframes wa-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 640px) {
  .wa-overlay {
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
}

/* ---- Modal ---- */
.wa-modal {
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #0D1322;
  border: 1px solid rgba(61, 139, 240, 0.18);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: wa-slide-up 0.26s cubic-bezier(0.34, 1.48, 0.64, 1);
}
@keyframes wa-slide-up {
  from { opacity: 0; transform: translateY(28px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* Header estilo WhatsApp */
.wa-modal__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  position: relative;
}
.wa-modal__avatar {
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.wa-modal__info { flex: 1; min-width: 0; }
.wa-modal__name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.wa-modal__status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 2px;
}
.wa-modal__dot {
  width: 7px; height: 7px;
  background: #7FE89A;
  border-radius: 50%;
  box-shadow: 0 0 6px #7FE89A;
  animation: wa-blink 1.8s ease-in-out infinite;
}
@keyframes wa-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.wa-modal__close {
  width: 30px; height: 30px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.wa-modal__close:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* Balão de mensagem */
.wa-modal__bubble {
  margin: 16px 18px 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 12px 12px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
}
.wa-modal__bubble::before {
  content: '';
  position: absolute;
  top: 0; left: -8px;
  border: 8px solid transparent;
  border-right-color: rgba(255, 255, 255, 0.06);
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* Formulário */
.wa-modal__form {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wa-modal__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.wa-modal__field > label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.wa-modal__field input[type="text"] {
  width: 100%;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wa-modal__field input[type="text"]::placeholder { color: rgba(255, 255, 255, 0.28); }
.wa-modal__field input[type="text"]:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.14);
}

/* Opções de assunto */
.wa-modal__radios {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.wa-modal__radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s var(--ease-out);
  user-select: none;
}
.wa-modal__radio:hover {
  border-color: rgba(37, 211, 102, 0.35);
  background: rgba(37, 211, 102, 0.06);
  color: #fff;
}
.wa-modal__radio.is-checked {
  border-color: #25D366;
  background: rgba(37, 211, 102, 0.12);
  color: #fff;
}
.wa-modal__radio input[type="radio"] { display: none; }

/* Indicador circular customizado */
.wa-modal__radio::before {
  content: '';
  flex-shrink: 0;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.15s;
}
.wa-modal__radio.is-checked::before {
  border-color: #25D366;
  background: #25D366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.22);
}

/* Botão principal */
.wa-modal__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 13px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
  margin-top: 2px;
}
.wa-modal__submit:hover:not(:disabled) {
  background: #1fbd5a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}
.wa-modal__submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Link "pular" */
.wa-modal__skip {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 0;
  margin-top: -4px;
  transition: color 0.15s;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wa-modal__skip:hover { color: var(--text-secondary); }
