/* ============================================================
   AG PLOMERIA - Modal de captacion de leads por WhatsApp
   css/ag-lead-modal.css
   Color de marca: #FA562E
   ============================================================ */

:root {
  --agm-brand: #FA562E;
  --agm-brand-dark: #e04519;
  --agm-ink: #1f2d30;
  --agm-wa: #25d366;
}

/* Overlay */
#agm-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 22, 24, 0.62);
  padding: 16px;
  -webkit-backface-visibility: hidden;
}
#agm-overlay.agm-open { display: flex; }

/* Caja del modal */
.agm-box {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  color: var(--agm-ink);
  animation: agm-pop .18s ease-out;
  max-height: 94vh;
  overflow-y: auto;
}
@keyframes agm-pop {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Encabezado */
.agm-head {
  background: var(--agm-brand);
  color: #fff;
  padding: 18px 20px 16px;
  position: relative;
}
.agm-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
}
.agm-head p {
  margin: 6px 0 0;
  font-size: 13px;
  opacity: .95;
  color: #fff;
}
.agm-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s;
}
.agm-close:hover { background: rgba(255, 255, 255, 0.34); }

/* Cuerpo / formulario */
.agm-body { padding: 18px 20px 20px; }
.agm-field { margin-bottom: 13px; }
.agm-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--agm-ink);
}
.agm-field .agm-req { color: var(--agm-brand); }

.agm-input,
.agm-select,
.agm-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #d7dde0;
  border-radius: 10px;
  font-size: 15px;
  color: var(--agm-ink);
  background: #fff;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.agm-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f2d30' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.agm-textarea { min-height: 74px; resize: vertical; }
.agm-input:focus,
.agm-select:focus,
.agm-textarea:focus {
  outline: none;
  border-color: var(--agm-brand);
  box-shadow: 0 0 0 3px rgba(250, 86, 46, 0.15);
}
.agm-input.agm-error,
.agm-select.agm-error {
  border-color: #e23b3b;
  box-shadow: 0 0 0 3px rgba(226, 59, 59, 0.14);
}

/* Honeypot - oculto para humanos, visible para bots */
.agm-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Boton enviar */
.agm-submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--agm-wa);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 4px;
  transition: filter .15s, opacity .15s;
  font-family: inherit;
}
.agm-submit:hover { filter: brightness(.95); }
.agm-submit:disabled { opacity: .7; cursor: default; }
.agm-submit svg { width: 20px; height: 20px; fill: #fff; }

.agm-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: #6b7679;
  text-align: center;
  line-height: 1.45;
}

/* Spinner */
.agm-spin {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: agm-rot .7s linear infinite;
  display: none;
}
.agm-loading .agm-spin { display: inline-block; }
.agm-loading .agm-submit-label,
.agm-loading .agm-submit svg { display: none; }
@keyframes agm-rot { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .agm-box { max-width: 100%; border-radius: 14px; }
  .agm-head h3 { font-size: 17px; }
}

/* reCAPTCHA heredado: ya no aplica (los formularios van por WhatsApp) */
.g-recaptcha,
#g-recaptcha-error { display: none !important; }
