/* ══ Subscribe Popup ══ */

/* ── Overlay ── */
.nml-sp__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 31, 0.56);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nml-sp__overlay--visible {
    opacity: 1;
}

/* ── Dialog ── */
/* This element owns the popup's scroll, so it must stay hit-testable: with
   pointer-events:none a touch that lands on its padding falls through to the
   page behind, which then scrolls instead of the popup. Clicking the empty area
   still closes the popup — handled in script.js (e.target === dialog), not by
   letting the click through to the overlay underneath. */
.nml-sp__dialog {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 40px 24px;
}

.nml-sp__dialog:not([hidden]) {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ── Inner ── */
.nml-sp__inner {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: auto;
    border-radius: 16px;
    padding: 40px;
    overflow: hidden;
    color: #fff;
    background-image: var(--nml-sp-bg-image, radial-gradient(140% 120% at 80% 0%, #1f3aa6 0%, #16267d 38%, #0d1858 100%));
    background-size: 130%;
    background-position: top center;
    background-repeat: no-repeat;
    box-shadow: 0px 6px 12px 0px #0D0D0D33;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease, max-width 0.3s ease;
}

.nml-sp__dialog--open .nml-sp__inner {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* once the success screen is shown, shrink to a compact card */
.nml-sp__inner:has(.nml-sp__success:not([hidden])) {
    max-width: 500px;
}

.nml-sp__inner:has(.nml-sp__success:not([hidden])) .nml-sp__starburst.nml-sp__starburst--success{
    display: none;
}

/* star overlay — shown only on the success ("thank you") screen */
.nml-sp__inner:has(.nml-sp__success:not([hidden]))::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url(/wp-content/uploads/2026/06/Star-1.svg);
    background-repeat: no-repeat;
    background-position: top left;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

/* subtle noise/vignette to match the textured mockup */
.nml-sp__inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% 120%, rgba(120, 150, 255, 0.18) 0%, transparent 55%);
    pointer-events: none;
}

/* ── Close ── */
.nml-sp__close {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    opacity: 0.85;
    transition: opacity 0.2s, background 0.2s;
    z-index: 2;
}

.nml-sp__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

/* Gate mode: while [data-gate] is present the popup cannot be dismissed, so the
   close button must not be offered. Enforced here as well as in script.js — a
   stale, blocked or half-executed script can then never leave a live close
   affordance on a locked popup. script.js removes the attribute once the form
   has been submitted, which brings the button back. */
.nml-sp__dialog[data-gate] .nml-sp__close {
    display: none;
}

/* ── Grid: content | aside ── */
.nml-sp__grid {
position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 311px;
    gap: 32px;
    align-items: stretch;
    border-bottom: 1px solid #FFFFFF;
}

/* the [hidden] attribute must win over display:grid above */
.nml-sp__grid[hidden] {
    display: none;
}

/* vertical divider between the two columns */
.nml-sp__main {
    position: relative;
}

.nml-sp__main::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: var(--color-bg);
}

/* ── Heading & intro ── */
.nml-sp__heading {
    margin: 0 0 16px;
    font-size: 40px;
    line-height: 48px;
    font-weight: 700;
    color: var(--color-text-white);
}

.nml-sp__intro {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--color-text-white);
    max-width: 620px;
}

/* ── Horizontal rules ── */
.nml-sp__rule {
    border: none;
    border-top: 1px solid #FFFFFF;
    margin: 40px 0;
}

/* ── Benefits list (2 columns) ── */
.nml-sp__items {
    list-style: none;
    margin: 0;
    padding: 0 25px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

.nml-sp__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.nml-sp__item-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.nml-sp__item-icon svg,
.nml-sp__item-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.nml-sp__item-text {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--color-text-white);
}

/* WYSIWYG wraps text in <p>; strip default margins so the row stays aligned */
.nml-sp__item-text > :first-child {
    margin-top: 0;
}

.nml-sp__item-text > :last-child {
    margin-bottom: 0;
}

.nml-sp__item-text strong,
.nml-sp__item-text b {
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Aside: starburst + form ── */
.nml-sp__aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 48px;
}

.nml-sp__starburst {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.nml-sp__starburst svg {
    width: 220px;
    height: 220px;
}

/* ── Form ── */
.nml-sp__form-title {
    margin: 0 0 24px;
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
}

.nml-sp__field {
    margin: 0 0 12px;
}

.nml-sp__input {
    width: 100%;
    height: 40px;
    background: var(--color-text-white);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    border: 1px solid var(--color-line);
}

.nml-sp__input::placeholder {
    color: #9AA3BF;
}

.nml-sp__submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 28px;
    border: none;
    border-radius: 10px;
    background: #0B101F;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.nml-sp__submit-btn:hover {
    background: #1a2138;
}

.nml-sp__submit-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

/* ── Spinner ── */
.nml-sp__btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nml-sp-spin 0.7s linear infinite;
}

.nml-sp__submit-btn--loading .nml-sp__btn-spinner {
    display: inline-block;
}

@keyframes nml-sp-spin {
    to { transform: rotate(360deg); }
}

/* ── Status message ── */
.nml-sp__status {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.nml-sp__status--error {
    background: rgba(255, 65, 113, 0.15);
    color: #ffd0db;
}

.nml-sp__status--success {
    background: rgba(60, 200, 130, 0.18);
    color: #d6ffe9;
}

/* Reserve no space until a message is shown (overrides .nml-alert display:flex) */
.nml-sp__status[hidden] { display: none; }
.nml-sp__status:not([hidden]) { display: flex; }

/* ── Field error state ── */
.nml-sp__field--error .nml-sp__input {
    box-shadow: 0 0 0 2px #ff4171;
}

/* ── Visually hidden label ── */
.nml-sp__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Success screen ── */
.nml-sp__success {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0 4px;
}

/* the [hidden] attribute must win over display:flex above */
.nml-sp__success[hidden] {
    display: none;
}

.nml-sp__starburst--success {
    width: 200px;
    height: 200px;
    margin-bottom: 8px;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20240%20240%22%20fill=%22none%22%3E%3Cg%20stroke=%22%23fff%22%20stroke-width=%221%22%20stroke-linecap=%22round%22%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22216.0%22%20y2=%22120.0%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22196.5%22%20y2=%22135.2%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22208.7%22%20y2=%22156.7%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22184.9%22%20y2=%22163.3%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22187.9%22%20y2=%22187.9%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22163.3%22%20y2=%22184.9%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22156.7%22%20y2=%22208.7%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22135.2%22%20y2=%22196.5%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22120.0%22%20y2=%22216.0%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22104.8%22%20y2=%22196.5%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2283.3%22%20y2=%22208.7%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2276.7%22%20y2=%22184.9%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2252.1%22%20y2=%22187.9%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2255.1%22%20y2=%22163.3%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2231.3%22%20y2=%22156.7%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2243.5%22%20y2=%22135.2%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2224.0%22%20y2=%22120.0%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2243.5%22%20y2=%22104.8%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2231.3%22%20y2=%2283.3%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2255.1%22%20y2=%2276.7%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2252.1%22%20y2=%2252.1%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2276.7%22%20y2=%2255.1%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%2283.3%22%20y2=%2231.3%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22104.8%22%20y2=%2243.5%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22120.0%22%20y2=%2224.0%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22135.2%22%20y2=%2243.5%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22156.7%22%20y2=%2231.3%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22163.3%22%20y2=%2255.1%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22187.9%22%20y2=%2252.1%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22184.9%22%20y2=%2276.7%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22208.7%22%20y2=%2283.3%22/%3E%3Cline%20x1=%22120%22%20y1=%22120%22%20x2=%22196.5%22%20y2=%22104.8%22/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.nml-sp__success-title {
    margin: 0 0 8px;
    font-size: 40px;
    line-height: 48px;
    font-weight: 700;
}

.nml-sp__success-text {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--color-text-white);
    max-width: 346px;
}

.nml-sp__return-btn {
    height: 56px;
    padding: 0 40px;
    border: none;
    border-radius: 10px;
    background: #0B101F;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.nml-sp__return-btn:hover {
    background: #1a2138;
}

.nml-sp__resend {
    margin: 24px 0 0;
    font-size: 16px;
    color: var(--color-text-white);
}

.nml-sp__resend-btn {
    background: none;
    border: none;
    padding: 0 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nml-sp__resend-btn:disabled {
    opacity: 0.7;
    cursor: default;
    text-decoration: none;
}

/* ══ Responsive ══ */
@media (max-width: 1024px) {

    .nml-sp__grid {
        grid-template-columns: 1fr 320px;
        gap: 40px;
    }

    .nml-sp__main {
        padding-right: 40px;
    }

}

@media (max-width: 820px) {
    .nml-sp__dialog {
        padding: 24px 16px;
        align-items: flex-start;
    }

    .nml-sp__inner {
        padding: 48px 16px 24px;
        background-size: cover;
        background-position: center;
    }

    .nml-sp__grid {
        grid-template-columns: 1fr;
        gap: 0px;
        border-bottom: none;
    }

    .nml-sp__main {
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
        border-bottom: 1px solid #FFF;
    }

    .nml-sp__main::after {
        display: none;
    }

    .nml-sp__heading,
    .nml-sp__success-title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 8px;
    }

    .nml-sp__intro {
        font-size: 14px;
        line-height: 20px;
    }

    .nml-sp__rule {
        margin: 20px 0;
    }

    .nml-sp__item {
        gap: 12px;
    }

    .nml-sp__item-text {
        font-size: 14px;
        line-height: 20px;
    }

    .nml-sp__items {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .nml-sp__starburst {
        display: none;
    }

    .nml-sp__starburst svg {
        width: 160px;
        height: 160px;
    }

    .nml-sp__starburst--success {
        width: 160px;
        height: 160px;
    }

    .nml-sp__form-title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 16px;
    }

    .nml-sp__aside{
        padding-bottom: 0;
    }

    .nml-sp__submit-btn{
        width: 100%;
    }
}

