/* Prevent scrolling */
body.rq-popup-open {
    overflow: hidden;
}

/* Popup Container */
#rq-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

/* Dark Background */
.rq-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
}

/* Popup Box */
.rq-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 550px;
    margin: 60px auto;
    border-radius: 12px;
    padding: 35px;
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    max-height: calc(100vh - 120px);
    overflow-y: auto;

    animation: rqPopup .25s ease;
}

/* Close Button */
.rq-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: .2s;
}

.rq-close:hover {
    color: #000;
}

/* Animation */
@keyframes rqPopup {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CF7 Fields */
#rq-popup .wpcf7-form-control-wrap {
    margin: 0;
    margin-bottom: 12px;
}
#rq-popup label {
    font-weight: 600;
    color: rgb(10 37 64) !important;
    font-size: 14px;
}

#rq-popup input[type="text"], #rq-popup input[type="email"], #rq-popup input[type="tel"], #rq-popup textarea, #rq-popup select {
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.5px !important;
    padding: 13px 15px !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 11px !important;
    color: #1b2a4e !important;
    background: #FbFcFd !important;
    transition: .15s !important;
    line-height: 23px;
    font-size: 16px;
    font-weight: normal;
}

#rq-popup textarea::placeholder { line-height: 23px;
    font-size: 15px; }

#rq-popup textarea {
    min-height: 120px;
    resize: vertical;
}
#rq-popup input[type="submit"] {
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(180deg, #367350 0%, #19482d 55%, #24563a 100%);
    color: #ffffff;
    font-family: 'Red Hat Display', Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 24px -8px rgba(212, 175, 55, 0.4);
    transition: transform .15s ease, box-shadow .15s ease;
    justify-content: center;
}

#rq-popup input[type="submit"]:hover {
    opacity: .9;
}

/* Hide success box initially */
.cf7-success-box {
    display: none;
    text-align: center;
    padding: 40px 30px;
    background: #f5fff7;
    border: 2px solid #28a745;
    border-radius: 12px;
    margin-top: 20px;
}

.cf7-success-box .success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    font-size: 36px;
    line-height: 70px;
    font-weight: bold;
}

.cf7-success-box h3 {
    margin-bottom: 10px;
    font-size: 28px;
    color: #28a745;
}

.cf7-success-box p {
    margin: 5px 0;
    color: #555;
}

/* Hide form after success */
.cf7-form-wrapper.form-success .wpcf7-form {
    display: none;
}

.cf7-form-wrapper.form-success .cf7-success-box {
    display: block;
    animation: fadeIn .4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 767px) {

    .rq-content {
        width: calc(100% - 30px);
        margin: 15px auto;
        padding: 25px;
        max-height: calc(100vh - 30px);
    }

}