/* =================================================================
   WAITLIST (pre-lanzamiento): formulario del hero y del CTA final,
   estado de éxito, gancho de precios. Misma paleta, mismas fuentes,
   mismos radios que el resto: el formulario es un botón primario con
   un campo delante, nada más.
   ================================================================= */

.opogc-wl {
    width: 100%;
    max-width: 520px;
    text-align: left;
}

.opogc-hero__cta--wl {
    margin-bottom: 0;
}

.opogc-wl__form {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--opogc-space-8);
    padding: 6px 6px 6px 8px;
    background: var(--opogc-white);
    border: 1.5px solid var(--opogc-green-border);
    border-radius: var(--opogc-radius-pill);
    box-shadow: var(--opogc-shadow-sm);
    transition: border-color var(--opogc-transition), box-shadow var(--opogc-transition);
}

.opogc-wl__form:focus-within {
    border-color: var(--opogc-green-pastel);
    box-shadow: var(--opogc-shadow-sm), 0 0 0 4px rgba(76, 175, 125, 0.14);
}

.opogc-wl__form.is-invalid {
    border-color: #c2575c;
    box-shadow: var(--opogc-shadow-sm), 0 0 0 4px rgba(194, 87, 92, 0.12);
}

/* Etiqueta solo para lectores de pantalla y honeypot fuera de la vista. */
.opogc-wl__label,
.opogc-wl__hp {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    left: -10000px;
}

.opogc-wl__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-family: var(--opogc-font-body);
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--opogc-text);
    padding: 0.55rem 0.8rem;
    outline: none;
}

.opogc-wl__input::placeholder {
    color: var(--opogc-text-muted);
    font-weight: 500;
}

.opogc-wl__btn {
    flex-shrink: 0;
    position: relative;
}

.opogc-wl__btn:hover,
.opogc-wl__btn:focus {
    transform: none;
}

.opogc-wl__spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: opogcWlSpin 0.7s linear infinite;
}

.opogc-wl.is-loading .opogc-wl__spinner { display: inline-block; }
.opogc-wl.is-loading .opogc-wl__btn { pointer-events: none; opacity: 0.92; }
.opogc-wl.is-loading .opogc-wl__input { pointer-events: none; }

@keyframes opogcWlSpin {
    to { transform: rotate(360deg); }
}

.opogc-wl__error {
    margin: var(--opogc-space-8) 0 0 var(--opogc-space-16);
    font-size: 0.83rem;
    font-weight: 600;
    color: #a23a40;
}

.opogc-wl__nota {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: var(--opogc-space-12) 0 0 var(--opogc-space-16);
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--opogc-text-muted);
}

.opogc-wl__nota svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--opogc-green-pastel);
}

.opogc-wl__nota a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.opogc-wl__nota a:hover {
    color: var(--opogc-green-deep);
}

/* Prueba social: solo sale cuando hay leads de verdad (umbral en PHP). */
.opogc-wl__social {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: var(--opogc-space-8) 0 0 var(--opogc-space-16);
    font-size: 0.82rem;
    color: var(--opogc-text-soft);
}

.opogc-wl__social::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--opogc-green-pastel);
    box-shadow: 0 0 0 0 rgba(76, 175, 125, 0.5);
    animation: opogcWlPulse 2s ease-out infinite;
}

.opogc-wl__social strong {
    color: var(--opogc-green-deep);
}

@keyframes opogcWlPulse {
    0%   { box-shadow: 0 0 0 0 rgba(76, 175, 125, 0.45); }
    70%  { box-shadow: 0 0 0 7px rgba(76, 175, 125, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 125, 0); }
}

/* ---------- Éxito ---------- */

.opogc-wl__ok {
    display: flex;
    gap: var(--opogc-space-16);
    align-items: flex-start;
    background: var(--opogc-white);
    border: 1.5px solid var(--opogc-green-border);
    border-radius: var(--opogc-radius);
    padding: var(--opogc-space-24);
    box-shadow: var(--opogc-shadow-md);
    animation: opogcWlIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.opogc-wl__ok-ic {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--opogc-green-pastel);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(76, 175, 125, 0.35);
    animation: opogcWlPop 0.55s cubic-bezier(0.22, 1.4, 0.4, 1) 0.1s both;
}

.opogc-wl__ok-ic svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.opogc-wl__ok-body { flex: 1; min-width: 0; }

.opogc-wl__ok-title {
    font-family: var(--opogc-font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--opogc-text);
    margin: 0 0 4px;
    line-height: 1.2;
}

.opogc-wl__ok-pos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 var(--opogc-space-8);
    padding: 0.2rem 0.7rem;
    background: var(--opogc-gold-soft);
    border: 1px solid var(--opogc-gold-border);
    border-radius: var(--opogc-radius-pill);
    color: var(--opogc-gold-deep);
    font-size: 0.8rem;
    font-weight: 700;
}

.opogc-wl__ok-text {
    font-size: 0.92rem;
    color: var(--opogc-text-soft);
    line-height: 1.55;
    margin: 0 0 var(--opogc-space-16);
}

.opogc-wl__share {
    display: flex;
    flex-wrap: wrap;
    gap: var(--opogc-space-8);
}

.opogc-wl__share .opogc-btn {
    font-size: 0.84rem;
    padding: 0.5rem 1rem;
}

.opogc-wl__share svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.opogc-wl__copy.is-copied {
    background: var(--opogc-green-soft);
    border-color: var(--opogc-green-pastel);
    color: var(--opogc-green-deep);
}

@keyframes opogcWlIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

@keyframes opogcWlPop {
    0%   { transform: scale(0.4); opacity: 0; }
    60%  { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); }
}

/* ---------- Sobre el verde oscuro del CTA final ---------- */

.opogc-inline-cta--wl {
    display: flex;
}

.opogc-wl--oscuro {
    margin-inline: auto;
}

.opogc-wl--oscuro .opogc-wl__form {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.opogc-wl--oscuro .opogc-wl__form:focus-within {
    border-color: var(--opogc-gold-pastel);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(201, 168, 76, 0.22);
}

.opogc-wl--oscuro .opogc-wl__nota,
.opogc-wl--oscuro .opogc-wl__social {
    justify-content: center;
    color: rgba(255, 255, 255, 0.78);
}

.opogc-wl--oscuro .opogc-wl__nota svg,
.opogc-wl--oscuro .opogc-wl__social strong {
    color: var(--opogc-gold-pastel);
}

.opogc-wl--oscuro .opogc-wl__nota a:hover {
    color: #fff;
}

.opogc-wl--oscuro .opogc-wl__error {
    color: #ffd1d4;
    text-align: center;
    margin-left: 0;
}

/* El CTA final pinta todos sus <p> en blanco, centrados y con margen: dentro
   del formulario y de la tarjeta de éxito mandan los estilos de la waitlist. */
.opogc-wl--oscuro .opogc-wl__nota,
.opogc-wl--oscuro .opogc-wl__social,
.opogc-wl--oscuro .opogc-wl__error {
    max-width: none;
    margin-bottom: 0;
}

.opogc-wl--oscuro .opogc-wl__nota { font-size: 0.8125rem; margin-top: var(--opogc-space-12); }
.opogc-wl--oscuro .opogc-wl__social { font-size: 0.82rem; margin-top: var(--opogc-space-8); }
.opogc-wl--oscuro .opogc-wl__error { font-size: 0.83rem; margin-top: var(--opogc-space-8); }

.opogc-cta-final .opogc-wl__ok p {
    max-width: none;
    margin-inline: 0;
    text-align: inherit;
}

.opogc-cta-final .opogc-wl__ok-title { color: var(--opogc-text); font-size: 1.25rem; margin: 0 0 4px; }
.opogc-cta-final .opogc-wl__ok-pos { color: var(--opogc-gold-deep); font-size: 0.8rem; margin: 0 0 var(--opogc-space-8); }
.opogc-cta-final .opogc-wl__ok-text { color: var(--opogc-text-soft); font-size: 0.92rem; margin: 0 0 var(--opogc-space-16); }

/* La tarjeta de éxito es blanca también sobre el verde: los botones fantasma
   del CTA final (blancos) vuelven a ser verdes dentro de ella. */
.opogc-cta-final .opogc-wl__ok .opogc-btn--ghost {
    color: var(--opogc-green-pastel);
    border-color: var(--opogc-green-border);
}

.opogc-cta-final .opogc-wl__ok .opogc-btn--ghost:hover,
.opogc-cta-final .opogc-wl__ok .opogc-btn--ghost:focus {
    background: var(--opogc-green-soft);
    border-color: var(--opogc-green-pastel);
    color: var(--opogc-green-deep);
}

.opogc-cta-final .opogc-wl__ok .opogc-wl__copy.is-copied {
    background: var(--opogc-green-soft);
    color: var(--opogc-green-deep);
}

/* ---------- Precios: «Próximamente» ---------- */

.opogc-btn--soon {
    background: var(--opogc-surface-alt);
    color: var(--opogc-text-muted);
    border-color: var(--opogc-border);
    cursor: default;
    box-shadow: none;
}

.opogc-btn--soon:hover,
.opogc-btn--soon:focus {
    transform: none;
}

.opogc-btn--soon svg {
    width: 16px;
    height: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .opogc-wl--claro {
        margin-inline: auto;
    }

    .opogc-wl--claro .opogc-wl__nota,
    .opogc-wl--claro .opogc-wl__social {
        justify-content: center;
    }

    .opogc-wl--claro .opogc-wl__error {
        text-align: center;
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .opogc-wl__form {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        border-radius: 22px;
    }

    .opogc-wl__input {
        text-align: center;
        padding: 0.65rem 0.8rem;
    }

    .opogc-wl__btn {
        width: 100%;
    }

    .opogc-wl__nota,
    .opogc-wl__social,
    .opogc-wl__error {
        margin-left: 0;
        justify-content: center;
        text-align: center;
    }

    .opogc-wl__ok {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--opogc-space-24) var(--opogc-space-16);
    }

    .opogc-wl__share {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opogc-wl__ok,
    .opogc-wl__ok-ic,
    .opogc-wl__social::before,
    .opogc-wl__spinner {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }
}
