.popsubscribe-overlay,
.popsubscribe-overlay * {
    box-sizing: border-box;
}

.popsubscribe-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.78);
    font-family: "Montserrat", Arial, sans-serif;
}

.popsubscribe-overlay[hidden] {
    display: none;
}

.popsubscribe-overlay .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.popsubscribe-dialog {
    position: relative;
    width: min(450px, 100%);
    min-height: 360px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b4bb3 0%, #48c7e8 27%, #5ccf66 52%, #f1db34 76%, #f47331 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

.popsubscribe-dialog::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 3px;
    background: #fff;
}

.popsubscribe-panel {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 344px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 44px 44px 34px;
    text-align: center;
    color: #111;
}

.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close {
    position: absolute !important;
    top: 22px !important;
    right: 22px !important;
    z-index: 3 !important;
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    appearance: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    cursor: pointer;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden;
    text-align: center;
    text-decoration: none !important;
    transform: none !important;
}

.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close::before,
.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 4px;
    border-radius: 999px;
    background: #aaa;
    transform-origin: center;
}

.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close:hover::before,
.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close:hover::after,
.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close:focus-visible::before,
.popsubscribe-overlay .popsubscribe-dialog > button.popsubscribe-close:focus-visible::after {
    background: #777;
}

.popsubscribe-eyebrow {
    margin: 8px 0 4px;
    color: #aaa;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 8px;
    line-height: 1.2;
    text-transform: uppercase;
}

.popsubscribe-title {
    margin: 0 0 24px;
    color: #000;
    font-size: 39px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
}

.popsubscribe-copy {
    max-width: 330px;
    margin: 0 0 28px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.48;
}

.popsubscribe-copy strong,
.popsubscribe-success-copy strong {
    font-weight: 800;
}

.popsubscribe-form {
    width: 100%;
    max-width: 348px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.popsubscribe-input {
    display: block;
    width: 100%;
    height: 49px;
    margin: 0 0 16px;
    border: 0;
    border-radius: 7px;
    background: #f3f3f3;
    color: #111;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 49px;
    outline: none;
    padding: 0 18px;
    text-align: center;
}

.popsubscribe-dialog[data-popsubscribe-type="whatsapp"] .popsubscribe-input {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 2.5px;
}

.popsubscribe-dialog[data-popsubscribe-type="newsletter"] .popsubscribe-input {
    font-size: 19px;
    letter-spacing: 0;
}

.popsubscribe-input::placeholder {
    color: #111;
    opacity: 1;
}

.popsubscribe-input:focus {
    box-shadow: 0 0 0 2px rgba(72, 199, 232, 0.55);
}

.popsubscribe-error {
    min-height: 0;
    margin: -8px 0 12px;
    color: #c62828;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.popsubscribe-error:empty {
    display: none;
}

.popsubscribe-submit,
.popsubscribe-secondary {
    display: block;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 48px;
    text-align: center;
    text-transform: uppercase;
}

.popsubscribe-submit {
    background: linear-gradient(90deg, #e63b73 0%, #f58325 100%);
    color: #fff;
}

.popsubscribe-submit:hover,
.popsubscribe-submit:focus-visible {
    filter: brightness(1.04);
}

.popsubscribe-submit:disabled {
    cursor: wait;
    opacity: 0.68;
}

.popsubscribe-success {
    justify-content: flex-start;
    padding-top: 44px;
}

.popsubscribe-success .popsubscribe-title {
    margin-bottom: 62px;
}

.popsubscribe-success-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 67px;
    font-size: 18px;
    line-height: 1.35;
}

.popsubscribe-secondary {
    max-width: 348px;
    background: #f3f3f3;
    color: #111;
    font-weight: 400;
}

.popsubscribe-secondary:hover,
.popsubscribe-secondary:focus-visible {
    background: #e9e9e9;
}

.popsubscribe-trigger {
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.popsubscribe-trigger img {
    display: block;
    max-width: 100%;
    height: auto;
}

body.popsubscribe-is-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .popsubscribe-overlay {
        padding: 16px;
    }

    .popsubscribe-dialog {
        min-height: 336px;
    }

    .popsubscribe-panel {
        min-height: 320px;
        padding: 42px 24px 28px;
    }

    .popsubscribe-close {
        top: 18px;
        right: 18px;
    }

    .popsubscribe-eyebrow {
        font-size: 14px;
        letter-spacing: 5px;
    }

    .popsubscribe-title {
        font-size: 32px;
    }

    .popsubscribe-copy,
    .popsubscribe-success-copy {
        font-size: 16px;
    }

    .popsubscribe-input,
    .popsubscribe-submit,
    .popsubscribe-secondary {
        height: 46px;
        line-height: 46px;
    }

    .popsubscribe-dialog[data-popsubscribe-type="whatsapp"] .popsubscribe-input {
        font-size: 21px;
        letter-spacing: 1.8px;
    }
}
