/* Páginas de la newsletter, con el estilo del resto de la web (fondo lavanda, barra blanca, tarjetas blancas con sombra
   suave, violeta y amarillo de la marca):
   - Landing (template-newsletter.php): texto y formulario a la izquierda, el regalo a la derecha. Una pantalla, sin scroll.
   - «Revisa tu email» (template-newsletter-revisa.php) y las de los enlaces de los emails (confirmar, baja: .nlm):
     una tarjeta centrada, como la de Acceder. */

/* ---------- Armazón: barra con el logo y el contenido centrado en el alto que queda ---------- */
.nlp {
  position: relative; isolation: isolate; display: grid; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100svh;
  background: radial-gradient(900px 520px at 88% 0%, rgba(91, 96, 230, .10), transparent 65%), radial-gradient(700px 420px at 0% 100%, rgba(255, 210, 63, .10), transparent 60%), var(--bg);
}
.admin-bar .nlp { min-height: calc(100svh - 32px); }
@media (max-width: 782px) { .admin-bar .nlp { min-height: calc(100svh - 46px); } }
.nlp-bar { display: flex; align-items: center; min-height: 56px; padding: 6px clamp(12px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--border-2); }
.nlp-logo { display: flex; }
.nlp-logo .logo-img { width: 190px; max-width: 46vw; }
.nlp-main { display: grid; align-items: center; padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 48px); }
.nlp-in { width: 100%; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }

/* ---------- Texto ---------- */
.nlp-from { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--muted); font-size: .92rem; }
.nlp-from b { color: var(--ink); font-weight: 600; }
.nlp-from .lp-profes img { width: 40px; height: 40px; border-color: var(--surface); box-shadow: var(--shadow); }
.nlp h1 { max-width: 620px; margin: 0 0 16px; color: var(--ink); font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 800; line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.nlp h1 mark { display: inline-block; padding: 0 .14em; border-radius: .16em; background: var(--yellow); color: var(--yellow-ink); transform: rotate(-1.5deg); box-shadow: 0 10px 24px -12px rgba(224, 176, 0, .75); }
.nlp-sub { max-width: 520px; margin: 0 0 28px; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.14rem); line-height: 1.6; }
.nlp-sub b { color: var(--ink); font-weight: 600; }

/* ---------- Formulario: una sola pieza blanca (email + botón); debajo, la casilla y la confianza ---------- */
.nlp-box { max-width: 540px; scroll-margin-top: 90px; }
.nlp-form { display: grid; gap: 14px; }
.nlp-row { position: relative; display: flex; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.nlp-row:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 4px var(--soft), var(--shadow); }
.nlp-row input { flex: 1 1 auto; min-width: 0; min-height: 50px; margin: 0; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 400 1rem var(--font); }
.nlp-row input::placeholder { color: var(--muted-2); }
.nlp-row input:focus { outline: none; box-shadow: none; }
.nlp-row .btn { flex: none; white-space: nowrap; }

.nlp-check { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 0; padding-left: 4px; color: var(--text); font-size: .88rem; line-height: 1.5; cursor: pointer; }
.nlp-check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex: none; margin: 1px 0 0; border: 1.5px solid var(--border); border-radius: 6px; background: var(--surface) center / 13px no-repeat; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.nlp-check input:hover { border-color: var(--primary-2); }
.nlp-check input:checked { border-color: var(--primary); background-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.nlp-check input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--soft); }
.nlp-check a { color: var(--primary); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.nlp-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0 0 0 4px; list-style: none; color: var(--muted); font-size: .84rem; font-weight: 500; }
.nlp-trust li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.nlp-trust .i { width: 15px; height: 15px; color: var(--ok); stroke-width: 3; }
.nlp-err { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #f3c7c4; border-radius: 12px; background: #fdf1f0; color: #a4262c; font-size: .9rem; font-weight: 500; }

/* Avisos del formulario (newsletter-landing.js): el campo se marca y tiembla; sale un globo oscuro */
.nlp-tip { position: absolute; bottom: calc(100% + 12px); left: 16px; z-index: 5; padding: 8px 13px; border-radius: 10px; background: #14152b; color: #fff; font-size: .84rem; font-weight: 600; line-height: 1.3; white-space: nowrap; box-shadow: 0 12px 28px -10px rgba(20, 21, 43, .45); transform-origin: 20px 100%; animation: nlp-tip-pop .32s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: none; }
.nlp-tip::after { content: ""; position: absolute; top: 100%; left: 16px; border: 6px solid transparent; border-top-color: #14152b; }
.nlp-check .nlp-tip { top: calc(100% + 10px); bottom: auto; left: -2px; transform-origin: 20px 0; }
.nlp-check .nlp-tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #14152b; }
@keyframes nlp-tip-pop { from { opacity: 0; transform: translateY(6px) scale(.92); } }
.nlp-shake { animation: nlp-shake .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes nlp-shake { 20%, 80% { translate: -3px 0; } 40%, 60% { translate: 5px 0; } 50% { translate: -5px 0; } }
.nlp-row.nlp-bad { border-color: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .14), var(--shadow); }
.nlp-check.nlp-bad input { border-color: #e5484d; animation: nlp-ring 1.3s ease-out infinite; }
@keyframes nlp-ring { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); } 100% { box-shadow: 0 0 0 10px rgba(229, 72, 77, 0); } }

/* Tras suscribirse (si no se redirige): el aviso ocupa el sitio del formulario */
.nlp-done { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border: 1px solid var(--border-2); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); animation: nlp-in .35s ease both; }
.nlp-done-i { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #e4f4f3; color: var(--ok); }
.nlp-done-i .i { width: 20px; height: 20px; stroke-width: 3; }
.nlp-done b { color: var(--ink); font-size: 1.08rem; }
.nlp-done p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
@keyframes nlp-in { from { opacity: 0; transform: translateY(6px); } }

/* Cifra de suscriptores (a partir de 1.000) */
.nlp-count { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 0; color: var(--muted); font-size: .92rem; }
.nlp-count b { color: var(--ink); font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }

/* ---------- El regalo: el caso como una tarjeta, con dos hojas suaves detrás ---------- */
.nlp-gift { position: relative; width: min(100%, 420px); margin: 0 auto; }
.nlp-gift-sheet { position: absolute; inset: 0; border: 1px solid var(--border-2); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.nlp-gift-sheet:first-child { transform: rotate(5deg) translate(12px, 6px); background: var(--yellow-soft); }
.nlp-gift-sheet:nth-child(2) { transform: rotate(-3.5deg) translate(-10px, 4px); background: var(--soft); }
.nlp-doc { position: relative; overflow: hidden; border: 1px solid var(--border-2); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); animation: nlp-float 7s ease-in-out infinite; }
@keyframes nlp-float { 50% { transform: translateY(-6px); } }
.nlp-doc-img { aspect-ratio: 16 / 8; overflow: hidden; border-bottom: 1px solid var(--border-2); background: var(--soft-2); }
.nlp-doc-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nlp-doc-noimg { display: grid; place-items: center; height: 100%; background: var(--grad); }
.nlp-doc-noimg .tool-logo { width: 56px; height: 56px; padding: 10px; border-radius: 16px; background: #fff; }
.nlp-doc-body { padding: 18px 22px 20px; }
.nlp-doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; color: var(--muted); font-size: .78rem; }
.nlp-doc-meta b { color: var(--ink); font-weight: 600; }
.nlp-doc-meta span { padding: 2px 9px; border-radius: 999px; background: var(--soft-2); font-weight: 500; }
.nlp-doc-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 14px; color: var(--ink); font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.nlp-doc-steps { display: grid; gap: 9px; margin: 0 0 16px; padding: 0; list-style: none; filter: blur(.5px); opacity: .75; }
.nlp-doc-steps li { display: flex; align-items: center; gap: 10px; margin: 0; }
.nlp-doc-steps span { width: 20px; height: 20px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--soft); color: var(--primary); font-size: .66rem; font-weight: 700; }
.nlp-doc-steps i { height: 8px; border-radius: 999px; background: var(--border-2); }
.nlp-doc-lock { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--primary); font-size: .78rem; font-weight: 600; }
.nlp-doc-lock .i { width: 14px; height: 14px; }
.nlp-gift-tag { position: absolute; top: -16px; left: -12px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px; background: var(--yellow); color: var(--yellow-ink); font-size: .86rem; font-weight: 700; transform: rotate(-5deg); box-shadow: 0 10px 22px -12px rgba(224, 176, 0, .95); }
.nlp-gift-tag .sparkles { width: 15px; height: 15px; }
.nlp-gift-tool { position: absolute; z-index: 2; width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--border-2); border-radius: 50%; background: #fff; box-shadow: var(--shadow); animation: nlp-bob 6s ease-in-out infinite; }
.nlp-gift-tool img { width: 25px; height: 25px; }
.nlp-gift-tool.is-a { top: 30%; right: -24px; }
.nlp-gift-tool.is-b { bottom: -20px; left: 20%; animation-delay: -2s; }
.nlp-gift-tool.is-c { bottom: 24%; left: -26px; animation-delay: -4s; }
@keyframes nlp-bob { 50% { translate: 0 -6px; } }
.nlp-gift-stamp { position: absolute; top: 40%; left: 50%; z-index: 3; display: none; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--ok); color: #fff; font-size: 1.05rem; font-weight: 700; box-shadow: 0 14px 30px -12px rgba(42, 157, 151, .8); translate: -50% 0; rotate: -6deg; }
.nlp-gift-stamp .i { width: 20px; height: 20px; stroke-width: 3.2; }
.nlp-gift.is-sent .nlp-gift-stamp { display: inline-flex; animation: nlp-stamp .45s cubic-bezier(.2, 1.5, .4, 1) .2s both; }
.nlp-gift.is-sent .nlp-doc { animation: none; }
@keyframes nlp-stamp { from { opacity: 0; scale: 1.6; } }

/* ==========================================================================
   «Revisa tu email» y páginas de los enlaces (confirmar, baja): una tarjeta centrada, como la de Acceder
   ========================================================================== */
.nlr .nlp-main { place-items: center; }
.nlr-in { width: 100%; max-width: 680px; margin: 0 auto; padding: clamp(28px, 4vw, 40px) clamp(22px, 4vw, 44px) clamp(24px, 3vw, 32px); border: 1px solid var(--border-2); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.nlr h1 { max-width: none; margin: 0 auto 12px; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.nlr-sub { max-width: 520px; margin: 0 auto 24px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.nlr-sub b { color: var(--ink); font-weight: 600; }

/* Sobre: entra suave, la carta asoma y salta el «1» de mensaje nuevo */
.nlr-env { position: relative; width: 96px; height: 70px; margin: 0 auto 22px; animation: nlr-drop .55s cubic-bezier(.2, 1.3, .4, 1) both; }
.nlr-env-body { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: 14px; background: var(--grad); box-shadow: var(--shadow-lg); }
.nlr-env-body::before, .nlr-env-body::after { content: ""; position: absolute; top: -50%; width: 100%; height: 120%; border-bottom: 2px solid rgba(255, 255, 255, .55); }
.nlr-env-body::before { left: -50%; transform: rotate(35deg); transform-origin: 100% 100%; }
.nlr-env-body::after { right: -50%; transform: rotate(-35deg); transform-origin: 0 100%; }
.nlr-env-letter { position: absolute; left: 12px; right: 12px; top: 6px; height: 52px; z-index: 1; display: grid; place-items: start center; padding-top: 6px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); color: var(--yellow); box-shadow: var(--shadow); animation: nlr-letter 2.6s ease-in-out .6s infinite; }
.nlr-env-letter .sparkles { width: 18px; height: 18px; }
.nlr-env-badge { position: absolute; top: -10px; right: -10px; z-index: 3; width: 28px; height: 28px; display: grid; place-items: center; border: 3px solid var(--surface); border-radius: 50%; background: #e5484d; color: #fff; font-size: .78rem; font-weight: 700; animation: nlr-badge .4s cubic-bezier(.2, 1.6, .4, 1) .5s both, nlr-pulse 2s ease-out 1.2s infinite; }
@keyframes nlr-drop { from { opacity: 0; transform: translateY(-16px) scale(.92); } }
@keyframes nlr-letter { 0%, 100% { translate: 0 0; } 45%, 60% { translate: 0 -22px; } }
@keyframes nlr-badge { from { opacity: 0; transform: scale(0); } }
@keyframes nlr-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); } 100% { box-shadow: 0 0 0 10px rgba(229, 72, 77, 0); } }

/* Pasos: hecho, ahora (late) y lo que viene */
.nlr-steps { display: flex; justify-content: center; margin: 0 auto 26px; padding: 0; list-style: none; }
.nlr-steps li { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 14px; white-space: nowrap; color: var(--muted-2); font-size: .86rem; font-weight: 500; }
.nlr-steps li + li::before { content: ""; position: absolute; left: -10px; top: 50%; width: 20px; border-top: 1.5px dashed var(--border); }
.nlr-steps span { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border: 1.5px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 700; }
.nlr-steps .i { width: 14px; height: 14px; stroke-width: 2.6; }
.nlr-steps .is-done { color: var(--ok); }
.nlr-steps .is-done span { border-color: var(--ok); background: var(--ok); color: #fff; }
.nlr-steps .is-done .i { stroke-width: 3.2; }
.nlr-steps .is-now { color: var(--ink); font-weight: 600; }
.nlr-steps .is-now span { border-color: var(--primary); background: var(--primary); color: #fff; animation: nlr-now 1.8s ease-out infinite; }
@keyframes nlr-now { 0% { box-shadow: 0 0 0 0 rgba(91, 96, 230, .45); } 100% { box-shadow: 0 0 0 10px rgba(91, 96, 230, 0); } }

/* Abrir el correo: el suyo en el botón principal; los demás, en pastillas */
.nlr-open { display: grid; justify-items: center; gap: 12px; }
.nlr-main { min-height: 54px; padding: 8px 26px 8px 10px; font-size: 1.02rem; box-shadow: var(--shadow-lg); }
.nlr-main .nlr-tile { width: 36px; height: 36px; border: 2px solid rgba(255, 255, 255, .9); }
.nlr-or { margin: 4px 0 0; color: var(--muted-2); font-size: .84rem; }
.nlr-provs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nlr-prov { display: inline-flex; align-items: center; gap: 9px; padding: 6px 15px 6px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .88rem; font-weight: 600; transition: border-color .15s, color .15s, box-shadow .15s; }
.nlr-prov:hover { border-color: var(--primary-2); color: var(--primary); box-shadow: var(--shadow); }
.nlr-tile { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--c); color: #fff; font-size: .8rem; font-weight: 700; line-height: 1; }
.nlr-help { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--border-2); color: var(--muted); font-size: .86rem; line-height: 1.55; text-align: left; }
.nlr-help .i { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--primary); }
.nlr-help b { color: var(--ink); font-weight: 600; }
.nlr-help a { color: var(--primary); font-weight: 600; }

/* Páginas de los enlaces de los emails (dai_nl_pagina): icono en un círculo, como en el resto de avisos de la web */
.nlm .nlr-in { max-width: 520px; }
.nlm-ico { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: var(--soft); color: var(--primary); }
.nlm-ico .i { width: 28px; height: 28px; }
.nlm-ico.is-check { background: #e4f4f3; color: var(--ok); }
.nlm-ico.is-check .i { stroke-width: 3; }
.nlm-ico.is-x { background: #fdf1f0; color: #c4413b; }
.nlm .nlr-sub { margin-bottom: 20px; }
.nlm form { margin: 0 0 6px; }
.nlm-home { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border-2); font-size: .9rem; }
.nlm-home a { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .nlp-doc, .nlp-gift-tool, .nlp-gift-stamp, .nlp-done, .nlp-tip, .nlp-shake, .nlp-check.nlp-bad input,
  .nlr-env, .nlr-env-letter, .nlr-env-badge, .nlr-steps .is-now span { animation: none !important; }
}

/* ---------- Pantallas medianas y móvil ---------- */
@media (max-width: 960px) {
  .nlp-in { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  /* El regalo, compacto: sin portada, hojas ni pegatinas */
  .nlp-gift { width: 100%; margin: 4px 0 0; }
  .nlp-gift-sheet, .nlp-gift-tool, .nlp-doc-img, .nlp-doc-steps { display: none; }
  .nlp-doc { animation: none; box-shadow: var(--shadow); }
  .nlp-doc-body { padding: 22px 18px 16px; }
  .nlp-doc-t { margin-bottom: 10px; font-size: 1rem; }
  .nlp-gift-tag { top: -14px; left: 14px; padding: 5px 12px; font-size: .78rem; }
  .nlp-gift-stamp { top: 32%; padding: 7px 14px; font-size: .9rem; }
}
@media (max-width: 960px) and (max-height: 760px) { .nlp-gift { display: none; } } /* móviles bajos: que siga sin haber scroll */
@media (max-width: 600px) {
  .nlp-bar { min-height: 52px; }
  .nlp-logo .logo-img { width: 160px; }
  .nlp-main { align-items: start; padding-top: 22px; padding-bottom: 20px; }
  .nlp-from { margin-bottom: 14px; font-size: .86rem; }
  .nlp-from .lp-profes img { width: 34px; height: 34px; }
  .nlp-sub { margin-bottom: 20px; }
  .nlp-row { flex-direction: column; padding: 6px; border-radius: 22px; }
  .nlp-row input { min-height: 48px; text-align: center; }
  .nlp-row .btn { width: 100%; justify-content: center; }
  .nlr .nlp-main { align-items: center; padding-top: 16px; }
  .nlr-in { padding: 24px 18px 20px; border-radius: 22px; }
  .nlr-env { width: 82px; height: 60px; margin-bottom: 14px; }
  .nlr-env-letter { height: 44px; }
  .nlr h1 { font-size: 1.85rem; }
  .nlr-sub { margin-bottom: 16px; font-size: .95rem; }
  .nlr-steps { flex-direction: column; align-items: flex-start; gap: 6px; width: max-content; margin-bottom: 18px; }
  .nlr-steps li { padding: 0; }
  .nlr-steps li + li::before { display: none; }
  .nlr-main { width: 100%; justify-content: center; }
  .nlr-prov { font-size: .82rem; }
  .nlr-help { margin-top: 18px; padding-top: 14px; font-size: .8rem; }
}
@media (max-height: 720px) and (min-width: 961px) {
  .nlp h1 { font-size: clamp(2.2rem, 4vw, 3.3rem); }
  .nlp-gift { width: min(100%, 370px); }
  .nlp-doc-img { aspect-ratio: 16 / 7; }
}
