/* Prevent horizontal page overflow caused by popup/theme scrollbar width changes. */
html.cpnp-overflow-guard,
body.cpnp-overflow-guard {
    max-width: 100%;
    overflow-x: hidden !important;
}

@supports (overflow: clip) {
    html.cpnp-overflow-guard,
    body.cpnp-overflow-guard {
        overflow-x: clip !important;
    }
}

html.cpnp-popup-open,
body.cpnp-lock-scroll {
    overflow: hidden !important;
}

.cpnp-overlay {
    position: fixed;
    inset: 0;
    left: 0;
    right: 0;
    width: auto;
    max-width: 100vw;
    overflow: hidden;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    transition: opacity 220ms ease;
    box-sizing: border-box;
}

.cpnp-overlay.cpnp-active {
    display: flex;
}

.cpnp-overlay.cpnp-visible {
    opacity: 1;
}

.cpnp-popup {
    position: relative;
    width: min(100%, 500px);
    max-width: calc(100vw - 28px);
    padding: 42px 34px 30px;
    border: 1px solid color-mix(in srgb, var(--cpnp-accent) 65%, transparent);
    border-radius: 22px;
    background:
        radial-gradient(circle at top center, rgba(212, 175, 55, 0.14), transparent 42%),
        var(--cpnp-bg);
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 175, 55, 0.12) inset;
    color: var(--cpnp-text, #ffffff);
    text-align: center;
    transform: translateY(18px) scale(0.96);
    transition: transform 260ms ease;
    font-family: inherit;
    box-sizing: border-box;
}

.cpnp-visible .cpnp-popup {
    transform: translateY(0) scale(1);
}

.cpnp-close {
    position: absolute;
    top: 13px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    background: transparent;
    color: var(--cpnp-text, #ffffff);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: all 180ms ease;
    padding: 0;
}

.cpnp-close:hover,
.cpnp-close:focus {
    background: var(--cpnp-accent);
    color: #000000;
    outline: none;
}

.cpnp-gold-line {
    width: 74px;
    height: 3px;
    margin: 0 auto 18px;
    border-radius: 99px;
    background: var(--cpnp-accent);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.6);
}

.cpnp-title {
    margin: 0 0 13px;
    color: var(--cpnp-text, #ffffff);
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.cpnp-description {
    max-width: 400px;
    margin: 0 auto 24px;
    color: color-mix(in srgb, var(--cpnp-text, #ffffff) 84%, transparent);
    font-size: 16px;
    line-height: 1.6;
}

.cpnp-form {
    display: grid;
    gap: 13px;
    margin: 0;
}

.cpnp-input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
    font-family: inherit;
}

.cpnp-input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.cpnp-input:focus {
    border-color: var(--cpnp-accent);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.14);
}

.cpnp-submit {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--cpnp-accent);
    border-radius: 999px;
    background: var(--cpnp-accent);
    color: #000000;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    font-family: inherit;
}

.cpnp-submit:hover,
.cpnp-submit:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(212, 175, 55, 0.24);
    outline: none;
}

.cpnp-submit:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.cpnp-small {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.5;
}

.cpnp-message {
    min-height: 20px;
    margin-top: 12px;
    color: var(--cpnp-accent);
    font-size: 14px;
    font-weight: 600;
}

.cpnp-message.cpnp-error {
    color: #ff8a8a;
}


@media (max-width: 640px) {
    .cpnp-overlay {
        padding: 14px;
        align-items: center;
    }

    .cpnp-popup {
        width: 100%;
        padding: 38px 20px 24px;
        border-radius: 18px;
    }

    .cpnp-title {
        font-size: 28px;
    }

    .cpnp-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .cpnp-input,
    .cpnp-submit {
        min-height: 50px;
        font-size: 14px;
    }
}

@supports not (color: color-mix(in srgb, white, black)) {
    .cpnp-popup {
        border-color: rgba(212, 175, 55, 0.65);
    }

    .cpnp-description {
        color: #d7d7d7;
    }
}
