/* ============================================================
   ASESOR DE NEGOCIOS — Popup de la calculadora
   Común a las dos skins. Colores editables en
   Personalizar → 💼 Asesor — Editor → 🧲 Popup de la calculadora
   (llegan como variables --ase-pop-*).
   ============================================================ */

.ase-pop {
  --ase-pop-bg: #DDFFCC;
  --ase-pop-btn: #62C3CC;
  --ase-pop-ink: #111111;
  --ase-pop-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --ase-pop-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 100000; /* por encima del header fijo, del botón de WhatsApp y de la barra de cookies */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.ase-pop[hidden] { display: none; }
.ase-pop *,
.ase-pop *::before,
.ase-pop *::after { box-sizing: border-box; }
.ase-pop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .28s ease, visibility 0s;
}

html.ase-pop-lock,
html.ase-pop-lock body { overflow: hidden; }

.ase-pop__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* ── Tarjeta ───────────────────────────────────────────── */
.ase-pop__card {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ase-pop-bg);
  color: var(--ase-pop-ink);
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  transform: translateY(18px) scale(.97);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  outline: none;
}
.ase-pop.is-open .ase-pop__card { transform: none; }

.ase-pop__body { padding: 44px 48px 40px; }

/* ── Cerrar ────────────────────────────────────────────── */
.ase-pop__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .07);
  color: var(--ase-pop-ink);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.ase-pop__close:hover { background: rgba(0, 0, 0, .14); transform: rotate(90deg); }
.ase-pop__close:focus-visible { outline: 2px solid var(--ase-pop-ink); outline-offset: 2px; }
.ase-pop__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* ── Titulares ─────────────────────────────────────────── */
.ase-pop__kicker,
.ase-pop__title,
.ase-pop__points {
  font-family: var(--ase-pop-display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ase-pop-ink);
  letter-spacing: .01em;
}

.ase-pop__kicker {
  margin: 0 0 6px;
  padding-right: 24px; /* deja sitio al botón de cerrar */
  font-size: 46px;
  line-height: 1;
}

.ase-pop__head {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin: 0 0 34px;
  padding-left: 18px;
}

.ase-pop__title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 92px;
  line-height: .9;
}

.ase-pop__points {
  flex: 0 0 auto;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 32px;
  line-height: 1.12;
}
.ase-pop__points li { margin: 0; padding: 0; }
.ase-pop__points li::before,
.ase-pop__points li::marker { content: none; }

/* ── Formulario ────────────────────────────────────────── */
.ase-pop__form { margin: 0; }

.ase-pop__fields {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 18px;
  margin-bottom: 22px;
}

.ase-pop__fields input {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 18px;
  font-family: var(--ase-pop-body);
  font-size: 16px; /* 16 px evita el zoom automático de iOS al enfocar */
  font-weight: 600;
  color: var(--ase-pop-ink);
  background: #fff;
  border: 2px solid var(--ase-pop-ink);
  border-radius: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow .2s;
}
.ase-pop__fields input::placeholder { color: #8a8a8a; opacity: 1; }
.ase-pop__fields input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ase-pop-btn);
}
.ase-pop__fields input.is-invalid { border-color: #d13333; }

.ase-pop__check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
  font-family: var(--ase-pop-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ase-pop-ink);
  cursor: pointer;
  text-align: left;
}
.ase-pop__check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ase-pop-ink);
  cursor: pointer;
}
.ase-pop__check a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ase-pop__check.is-invalid { color: #d13333; }

.ase-pop__btn {
  display: block;
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 10px 24px 8px;
  font-family: var(--ase-pop-display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ase-pop-ink);
  background: var(--ase-pop-btn);
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .18s, filter .18s, box-shadow .18s;
}
.ase-pop__btn:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .14); }
.ase-pop__btn:focus-visible { outline: 3px solid var(--ase-pop-ink); outline-offset: 3px; }
.ase-pop__btn[disabled] { opacity: .65; cursor: wait; transform: none; }

.ase-pop .ase-pop__msg {
  min-height: 0;
  margin: 14px 0 0;
  font-family: var(--ase-pop-body);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.ase-pop .ase-pop__msg:empty { display: none; }
.ase-pop .ase-pop__msg.is-ok  { color: #1f7a35; }
.ase-pop .ase-pop__msg.is-err { color: #c62828; }

/* ── Estado "enviado" ──────────────────────────────────── */
.ase-pop__done {
  padding: 8px 0 4px;
  text-align: center;
  font-family: var(--ase-pop-body);
  color: var(--ase-pop-ink);
}
.ase-pop__done[hidden] { display: none; }
.ase-pop__done-ico {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--ase-pop-btn);
}
.ase-pop__done-ico svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--ase-pop-ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ase-pop__done-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}
.ase-pop__done-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  opacity: .8;
}

/* Formulario externo (shortcode) dentro del popup */
.ase-pop__embed { max-width: 100%; }

/* ── Tablet ────────────────────────────────────────────── */
@media (max-width: 680px) {
  .ase-pop__body { padding: 40px 26px 30px; }
  .ase-pop__kicker { font-size: 34px; }
  .ase-pop__head { gap: 18px; padding-left: 0; margin-bottom: 26px; }
  .ase-pop__title { font-size: 66px; }
  .ase-pop__points { font-size: 24px; margin-top: 6px; }
  .ase-pop__btn { font-size: 30px; }
}

/* ── Móvil ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ase-pop { padding: 12px; align-items: center; }
  .ase-pop__body { padding: 36px 20px 24px; }
  .ase-pop__kicker { font-size: 28px; padding-right: 30px; }
  .ase-pop__head {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
  }
  .ase-pop__title { font-size: 58px; }
  .ase-pop__points {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin: 0;
    font-size: 21px;
  }
  .ase-pop__points li + li::before {
    content: "·";
    margin-right: 14px;
    opacity: .5;
  }
  .ase-pop__fields { grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
  .ase-pop__check { font-size: 13.5px; justify-content: flex-start; margin-bottom: 20px; }
  .ase-pop__btn { font-size: 27px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ase-pop,
  .ase-pop__card,
  .ase-pop__close,
  .ase-pop__btn { transition: none; }
}
