/* CG Forms — base independiente del tema (v0.79.0).

   Hasta la v0.78 el plugin heredaba del tema common-ground sus tokens
   (--green, --purple, --r-*…), el reset global, la tipografía y clases como
   .btn, .container o .section-label. Con cualquier otro tema (Flatsome,
   Astra, etc.) todo eso no existe, y además el tema trae sus propios estilos
   genéricos de input/label/button que se le cuelan a los formularios.

   Este archivo se carga ANTES de forms.css/booking.css y resuelve las dos
   cosas, con tres niveles de especificidad pensados a propósito:

     1. Tokens --cgf-* en :root (los colores/radios se pueden cambiar desde
        CG Forms → Apariencia, que imprime un :root{} inline después).
     2. "Reset" acotado a los contenedores del plugin — especificidad
        (0,1,2)–(0,2,3): le gana a los estilos genéricos del tema
        (input[type=text] = 0,1,1) pero PIERDE contra las reglas del plugin
        (todas llevan ":root body .clase" = 0,2,1 o más, ver
        tools/scope-css.php), así que nunca pisa un estilo propio.
     3. Réplica de las clases del tema common-ground que el HTML del
        plugin usa (.btn, .container, .section-label…), acotadas a los
        contenedores del plugin para no chocar con clases homónimas del
        tema activo.

   Contenedores raíz del plugin: .lead-form-section (todos los formularios
   de página), .lf-modal-overlay (aviso de privacidad, newsletter, quiz),
   .quiz-fab-wrap (burbuja flotante) y .nl-form-wrap (newsletter en línea). */

:root{
  --cgf-green:#2EB98F;--cgf-green-dark:#239572;--cgf-green-soft:rgba(46,185,143,.10);
  --cgf-purple:#4B2E83;--cgf-purple-dark:#3a2367;--cgf-purple-soft:rgba(75,46,131,.10);
  --cgf-black:#262626;--cgf-gray-700:#555;--cgf-gray-500:#8a8a8a;--cgf-gray-300:#d8d8d2;
  --cgf-gray-100:#efeee5;--cgf-cream:#fcfcf2;--cgf-white:#fff;
  /* Con el tema common-ground sigue siendo Manrope; con cualquier otro
     tema, los títulos heredan la tipografía de ese tema. */
  --cgf-serif-h:var(--serif-h,inherit);
  --cgf-r-sm:8px;--cgf-r-md:14px;--cgf-r-lg:20px;--cgf-r-pill:999px;
  --cgf-shadow-sm:0 2px 8px rgba(38,38,38,.06);--cgf-shadow-lg:0 16px 48px rgba(38,38,38,.10);
  --cgf-t:.22s cubic-bezier(.4,0,.2,1);
  /* Altura de la burbuja del quiz: con el tema common-ground queda arriba
     de su burbuja de WhatsApp; con otro tema baja, pero deja libre la
     esquina para el botón "volver arriba" que traen muchos temas
     (Flatsome incluido) — ver body.cgf-no-wa-fab más abajo. */
  --cgf-fab-bottom:5.75rem;--cgf-fab-bottom-sm:5.25rem;
  /* Modales por encima de headers fijos y lightboxes del tema (Flatsome:
     header 1001, lightbox 1043). */
  --cgf-z-modal:100000;
}
body.cgf-no-wa-fab{--cgf-fab-bottom:4.5rem;--cgf-fab-bottom-sm:4.25rem}

/* ---------- 2. Reset acotado ---------- */

html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap),
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) *,
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) *::before,
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) *::after{
  box-sizing:border-box;margin:0;padding:0;overflow-wrap:break-word;
}
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap){
  line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) :is(h1,h2,h3,h4,h5,h6){
  font-family:var(--cgf-serif-h);line-height:1.15;letter-spacing:-.015em;color:inherit;
  text-transform:none;width:auto;
}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h1{font-size:clamp(2.2rem,4.5vw,3.2rem);font-weight:800}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h2{font-size:clamp(1.8rem,3.5vw,2.6rem);font-weight:700}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h2:where(.cgf-titulo){font-size:clamp(2.2rem,4.5vw,3.2rem);font-weight:800} /* título del form incrustado: mismo aspecto que el h1 */
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h3{font-size:1.25rem;font-weight:700}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h4{font-size:1.05rem;font-weight:700}
@media (max-width:540px){
  html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h1{font-size:2rem}
  html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h2{font-size:1.6rem}
  html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) h2:where(.cgf-titulo){font-size:2rem}
}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) p{color:var(--cgf-gray-700);font-size:inherit}
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) :is(ul,ol){list-style:none}
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) a{color:inherit;text-decoration:none}
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) img{max-width:100%;display:block;height:auto}
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) svg{display:block}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) label{
  display:inline;font-size:inherit;font-weight:inherit;color:inherit;
}
/* Botones: muchos temas (Flatsome incluido) pintan <button> sin clase con
   mayúsculas, altura mínima, margen derecho, interlineado propio… */
html body :is(.lead-form-section,.lf-modal-overlay,.quiz-fab-wrap,.nl-form-wrap) button,
html body :is(.topbar-newsletter,.footer-nl-trigger,.footer-nl-unsub-link){
  font:inherit;color:inherit;cursor:pointer;border:none;background:none;border-radius:0;
  text-transform:none;letter-spacing:normal;line-height:inherit;min-height:0;min-width:0;
  max-width:none;margin:0;padding:0;text-shadow:none;box-shadow:none;vertical-align:baseline;
  width:auto;height:auto;display:inline-block;opacity:1;
}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) :is(input,select,textarea){
  font:inherit;color:inherit;height:auto;min-height:0;max-width:100%;margin:0;box-shadow:none;
  text-transform:none;letter-spacing:normal;vertical-align:baseline;transition:none;
}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) :is(input,select,textarea):focus{box-shadow:none}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) input:where([type=checkbox],[type=radio]){
  display:inline-block;width:auto;height:auto;margin:0;font-size:inherit;
}
html body :is(.lead-form-section,.lf-modal-overlay,.nl-form-wrap) fieldset{border:0;min-width:0}

/* ---------- 3. Clases que antes ponía el tema common-ground ---------- */

/* Sección y contenedor de cada formulario de página. */
:root body .lead-form-section{padding:5.5rem 0;color:var(--cgf-black)}
:root body .lead-form-section :where(.container){width:100%;max-width:1180px;margin:0 auto;padding:0 1.5rem}
@media (max-width:540px){:root body .lead-form-section :where(.container){padding:0 1rem}}
/* Dentro de la ficha de un evento del tema common-ground, el formulario de
   descarga va sin padding ni fondo propio (antes vivía en el tema). */
:root body .ev-resource-section .lead-form-section{padding:0;background:transparent}
:root body .lf-modal-overlay{color:var(--cgf-black)}

:root body :where(.lead-form-section,.lf-modal-overlay) .section-label{
  display:inline-block;font-size:.78rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--cgf-purple);margin-bottom:.85rem;
}

/* Botones .btn/.btn-primary/.btn-secondary (el HTML del plugin los usa en
   pantallas de éxito, CTA del quiz, etc.). */
:root body :where(.lead-form-section,.lf-modal-overlay) .btn{
  display:inline-flex;align-items:center;gap:.45rem;padding:.7rem 1.35rem;border-radius:var(--cgf-r-pill);
  font-size:.92rem;font-weight:700;line-height:1.6;transition:all var(--cgf-t);white-space:nowrap;
  border:2px solid transparent;text-decoration:none;text-transform:none;letter-spacing:normal;
  min-height:0;margin:0;cursor:pointer;
}
:root body :where(.lead-form-section,.lf-modal-overlay) .btn-primary{background:var(--cgf-green);color:var(--cgf-white);box-shadow:0 4px 16px rgba(46,185,143,.28)}
:root body :where(.lead-form-section,.lf-modal-overlay) .btn-primary:hover{background:var(--cgf-purple);color:var(--cgf-white);box-shadow:0 6px 22px rgba(75,46,131,.38);transform:translateY(-1px)}
:root body :where(.lead-form-section,.lf-modal-overlay) .btn-secondary{background:var(--cgf-purple);color:var(--cgf-white);box-shadow:0 4px 16px rgba(75,46,131,.28)}
:root body :where(.lead-form-section,.lf-modal-overlay) .btn-secondary:hover{background:var(--cgf-purple-dark);color:var(--cgf-white);box-shadow:0 6px 22px rgba(58,35,103,.38);transform:translateY(-1px)}
:root body :where(.lead-form-section,.lf-modal-overlay) .btn-icon{display:inline-flex;flex:none}
:root body :where(.lead-form-section,.lf-modal-overlay) .btn-icon svg{width:18px;height:18px}

/* [cg_form_gate] — botón/enlace del sitio cuyo formulario está apagado. */
.cg-form-disabled{display:inline-flex;pointer-events:none;filter:grayscale(1);opacity:.45;cursor:not-allowed}
.cg-form-disabled a,.cg-form-disabled button{pointer-events:none}

.visually-hidden{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Disparadores del newsletter ([cg_newsletter_trigger], unsubscribe) —
   se pegan en el header/footer del tema (en Flatsome: un elemento HTML del
   Header/Footer Builder). Heredan color y tipografía de donde se pongan. */
html body .topbar-newsletter{display:inline-flex;align-items:center;gap:.4rem;font-weight:600;font-size:inherit;transition:color var(--cgf-t)}
html body .topbar-newsletter:hover{color:var(--cgf-green)}
html body .topbar-newsletter svg{width:14px;height:14px;flex:none;display:block}
html body :is(.footer-nl-trigger,.footer-nl-unsub-link){text-align:left;transition:color var(--cgf-t)}
html body :is(.footer-nl-trigger,.footer-nl-unsub-link):hover{color:var(--cgf-green)}
html body .footer-nl-unsub-link{font-size:.74rem;opacity:.7}
@media (max-width:380px){html body .topbar-newsletter span{display:none}}

/* "Trabaja con nosotros" (antes en careers.css del tema). */
:root body .cr-apply-lede{margin:.6rem auto 0;color:var(--cgf-gray-700);font-size:.98rem;max-width:640px}
:root body .cr-apply-prompt{max-width:640px;margin:0 auto 2rem;padding:1.5rem;background:#f7f7f5;border:1px solid var(--cgf-gray-100);border-radius:var(--cgf-r-lg);text-align:center}
:root body .cr-apply-prompt p{margin:0 0 1rem;color:var(--cgf-gray-700)}
:root body .cr-success-folio{margin-top:.75rem;font-family:monospace;font-weight:600;color:var(--cgf-black)}

/* "Regístrate y recibe ayuda" (antes en probono.css del tema). */
:root body .pb-notice{max-width:720px;margin:0 auto 1.25rem;padding:1rem 1.25rem;border-radius:var(--cgf-r-md);font-size:.92rem;line-height:1.55}
:root body .pb-notice-confidential{background:var(--cgf-green-soft);color:var(--cgf-green-dark);font-weight:600}
:root body .pb-notice-honesty{background:var(--cgf-gray-100);color:var(--cgf-gray-700)}
