#fbp-popup-overlay,
#fbp-thankyou-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.68);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}

#fbp-popup-overlay.fbp-show,
#fbp-thankyou-overlay.fbp-show{
    opacity: 1;
    visibility: visible;
}

.fbp-popup{
    direction: rtl;
    text-align: right;
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 22px;
    padding: 28px 24px 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,.25);
    transform: translateY(24px) scale(.96);
    transition: transform .35s ease;
}

.fbp-thankyou-popup{
    direction: rtl;
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 22px;
    padding: 34px 24px 28px;
    box-shadow: 0 25px 80px rgba(0,0,0,.25);
    transform: translateY(24px) scale(.96);
    transition: transform .35s ease;
}

#fbp-popup-overlay.fbp-show .fbp-popup,
#fbp-thankyou-overlay.fbp-show .fbp-thankyou-popup{
    transform: translateY(0) scale(1);
}

.fbp-head{
    text-align: center;
    margin-bottom: 18px;
}

.fbp-badge{
    display: inline-block;
    background: #ffe38a;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 7px 12px;
    margin-bottom: 10px;
}

.fbp-head h3{
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.3;
    color: #111;
}

.fbp-subtitle{
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.8;
}

.fbp-preview{
    margin: 20px 0 24px;
}

.fbp-pdf-wrap,
.fbp-image-wrap,
.fbp-file-wrap{
    border: 1px solid #e9e9e9;
    border-radius: 16px;
    overflow: hidden;
    background: #fafafa;
}

.fbp-pdf{
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    background: #fff;
}

.fbp-image{
    display: block;
    width: 100%;
    height: auto;
}

.fbp-file-wrap{
    padding: 30px 20px;
    text-align: center;
}

.fbp-file-text{
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
}

.fbp-file-link{
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--fbp-primary-color, #111);
    color: #fff;
    text-decoration: none;
}

.fbp-form .wpcf7{
    margin: 0;
}

.fbp-form input,
.fbp-form textarea,
.fbp-form select{
    width: 100%;
    border-radius: 12px;
    border: 1px solid #ddd;
    padding: 12px 14px;
    min-height: 48px;
    box-sizing: border-box;
}

.fbp-form textarea{
    min-height: 120px;
}

.fbp-form input[type="submit"],
.fbp-form button,
.fbp-form .wpcf7-submit{
    border: 0;
    border-radius: 14px;
    background: var(--fbp-primary-color, #111) !important;
    color: #fff;
    padding: 14px 22px;
    font-size: 16px;
    cursor: pointer;
    min-height: 50px;
}

.fbp-thankyou-icon{
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--fbp-primary-color, #16a34a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
}

.fbp-thankyou-popup h3{
    margin: 0 0 10px;
    font-size: 28px;
    color: #111;
}

.fbp-thankyou-text{
    margin: 0 0 20px;
    color: #666;
    font-size: 16px;
    line-height: 1.9;
}

.fbp-thankyou-button{
    border: 0;
    border-radius: 14px;
    background: var(--fbp-primary-color, #111);
    color: #fff;
    padding: 14px 24px;
    font-size: 16px;
    cursor: pointer;
    min-width: 130px;
}

.fbp-confetti-wrap{
    pointer-events: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 22px;
}

.fbp-confetti{
    position: absolute;
    top: -20px;
    width: 10px;
    height: 18px;
    opacity: .95;
    animation: fbp-confetti-fall 4.5s linear infinite;
}

.fbp-confetti-1{left:4%; background:#ff4d6d; animation-delay:0s;}
.fbp-confetti-2{left:10%; background:#ffd166; animation-delay:.2s;}
.fbp-confetti-3{left:16%; background:#06d6a0; animation-delay:.5s;}
.fbp-confetti-4{left:22%; background:#118ab2; animation-delay:.8s;}
.fbp-confetti-5{left:28%; background:#8338ec; animation-delay:1s;}
.fbp-confetti-6{left:35%; background:#ff006e; animation-delay:1.2s;}
.fbp-confetti-7{left:42%; background:#3a86ff; animation-delay:1.4s;}
.fbp-confetti-8{left:49%; background:#fb5607; animation-delay:1.6s;}
.fbp-confetti-9{left:56%; background:#ffbe0b; animation-delay:1.8s;}
.fbp-confetti-10{left:63%; background:#00b894; animation-delay:2s;}
.fbp-confetti-11{left:69%; background:#e76f51; animation-delay:2.2s;}
.fbp-confetti-12{left:74%; background:#f4a261; animation-delay:2.4s;}
.fbp-confetti-13{left:79%; background:#2a9d8f; animation-delay:2.6s;}
.fbp-confetti-14{left:84%; background:#e63946; animation-delay:2.8s;}
.fbp-confetti-15{left:88%; background:#8ecae6; animation-delay:3s;}
.fbp-confetti-16{left:92%; background:#ffafcc; animation-delay:3.2s;}
.fbp-confetti-17{left:96%; background:#c77dff; animation-delay:3.4s;}
.fbp-confetti-18{left:52%; background:#80ed99; animation-delay:3.6s;}

@keyframes fbp-confetti-fall{
    0%{ transform: translateY(-20px) rotate(0deg); }
    100%{ transform: translateY(700px) rotate(540deg); }
}

body.fbp-popup-open{
    overflow: hidden;
}

@media (max-width: 767px){
    .fbp-popup{
        max-width: 95%;
        padding: 22px 16px 18px;
        border-radius: 16px;
    }

    .fbp-thankyou-popup{
        max-width: 95%;
        border-radius: 16px;
        padding: 28px 18px 24px;
    }

    .fbp-head h3{
        font-size: 22px;
    }

    .fbp-pdf{
        height: 280px;
    }

    .fbp-thankyou-popup h3{
        font-size: 22px;
    }
}