/* ============================================================================
   CB POP-UP 10% OFF — captura de leads (e-mail + WhatsApp OBRIGATORIO)
   Paridade visual com o modal do WordPress (plugin rastreio, F-70 class-leads).
   Paleta A: royal #1E5FD8 / ambar #F59E0B / tinta #0E1726.
   Namespace proprio (.cb-popup*) pra nao colidir com nada do tema.
   Par: static/js/cb-popup.js — ligado/desligado em Personalizar tema.
   ============================================================================ */

.cb-popup[hidden] { display: none !important; }
body.cb-popup-open { overflow: hidden; }

.cb-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    transition: opacity .22s ease;
    font-family: inherit;
}
.cb-popup.is-open { opacity: 1; }

.cb-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 23, 38, .62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.cb-popup__panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 42, 102, .28);
    padding: 32px 28px 24px;
    transform: translateY(14px) scale(.98);
    transition: transform .26s cubic-bezier(.22, 1, .36, 1);
    text-align: left;
    box-sizing: border-box;
}
.cb-popup.is-open .cb-popup__panel { transform: none; }

.cb-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #3C4A60;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s;
    padding: 0;
    line-height: 0;
}
.cb-popup__close:hover { background: #E2E8F0; }
.cb-popup__close:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }

.cb-popup__badge {
    display: inline-block;
    background: #F59E0B;
    color: #0E1726;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.cb-popup__title {
    font-size: clamp(21px, 3.4vw, 27px);
    font-weight: 800;
    line-height: 1.18;
    color: #0E1726;
    margin: 0 0 10px;
}

.cb-popup__lead {
    font-size: 15px;
    line-height: 1.55;
    color: #3C4A60;
    margin: 0 0 18px;
}

.cb-popup__form { display: flex; flex-direction: column; gap: 10px; }

.cb-popup__input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    color: #0E1726;
    background: #fff;
    transition: border-color .16s, box-shadow .16s;
}
.cb-popup__input::placeholder { color: #94A3B8; }
.cb-popup__input:focus {
    outline: none;
    border-color: #1E5FD8;
    box-shadow: 0 0 0 3px rgba(30, 95, 216, .16);
}
.cb-popup__input.is-invalid {
    border-color: #D92D20;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, .12);
}

.cb-popup__field { position: relative; }
.cb-popup__hint {
    display: block;
    font-size: 12px;
    color: #64748B;
    margin: 2px 2px 0;
}
.cb-popup__error {
    display: block;
    font-size: 12.5px;
    color: #D92D20;
    margin: 3px 2px 0;
    min-height: 0;
}

.cb-popup__consent {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.45;
    color: #3C4A60;
    text-align: left;
    cursor: pointer;
    margin: 2px 0;
}
.cb-popup__consent input {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #1E5FD8;
}
.cb-popup__consent a { color: #1D4ED8; text-decoration: underline; }

.cb-popup__submit {
    margin-top: 4px;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: #1E5FD8;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s, transform .12s;
}
.cb-popup__submit:hover { background: #0F2A66; }
.cb-popup__submit:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
.cb-popup__submit:disabled { opacity: .7; cursor: default; }

.cb-popup__feedback { font-size: 13px; margin: 6px 0 0; min-height: 16px; }
.cb-popup__feedback.is-err { color: #D92D20; }
.cb-popup__feedback.is-ok { color: #0D5F0D; }

.cb-popup__decline {
    display: block;
    margin: 14px auto 0;
    background: none;
    border: 0;
    color: #3C4A60;
    font-size: 13px;
    font-family: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.cb-popup__decline:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }

/* ---- sucesso ---- */
.cb-popup__success { text-align: center; }
.cb-popup__check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(13, 95, 13, .12);
    color: #0D5F0D;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.cb-popup__coupon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.cb-popup__coupon-code {
    border: 2px dashed #F59E0B;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #0E1726;
    user-select: all;
}
.cb-popup__coupon-copy {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #1E5FD8;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}
.cb-popup__coupon-copy:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
.cb-popup__btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: #1E5FD8;
    background: rgba(30, 95, 216, .09);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 6px;
}
.cb-popup__btn:hover { background: #1E5FD8; color: #fff; }

.cb-popup__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 480px) {
    .cb-popup__panel { padding: 26px 20px 20px; }
    .cb-popup__title { font-size: 20px; }
    .cb-popup__lead { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .cb-popup, .cb-popup__panel { transition: none; }
}
