/* CAPTCHA Container */
.cf7-lan-captcha-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
    flex-wrap: wrap;
    margin-bottom: 40px;
    position: relative;
}

/* CAPTCHA Code Display */
.cf7-captcha-code {
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #333;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
    user-select: none;
}

/* Refresh Button */
.cf7-captcha-refresh {
    background: #a8a8a8;
    border: 1px solid #a8a8a8;
    border-radius: 54px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    color: #fff;
}

.cf7-captcha-refresh:hover {
    background: #a8a8a8;
    border-color: #a8a8a8;
}

.cf7-captcha-refresh:active {
    transform: scale(0.95);
}

.cf7-captcha-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* CAPTCHA Input Field */
.cf7-captcha-input {
    flex: 1;
    max-width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    margin-bottom: 0px !important;
}

.cf7-captcha-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.cf7-captcha-input.wpcf7-not-valid {
    border-color: #dc3232;
}

/* Success Messgae */
span.cf7-captcha-tick {
    font-size: 15px;
    background: #1d9400;
    padding: 10px;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Captcha Verify Error Messgae */
span.cf7-captcha-verify-error {
    font-size: 15px;
    background: #dc3232;
    padding: 10px;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Error Messages */
.cf7-captcha-error {
    color: #dc3232;
    font-size: 13px !important;
    margin-top: 5px;
    display: block;
    clear: both;
    flex: 1 0 100%;
    position: absolute;
    bottom: -25px
}

.wpcf7-form-control-wrap .cf7-captcha-error {
    margin-top: 0;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .cf7-lan-captcha-wrap {
        align-items: center;
    }

    .cf7-captcha-input {
        width: 100%;
    }

    .cf7-captcha-refresh {
        margin-left: 0;
    }
}

/* RTL Support */
.rtl .cf7-lan-captcha-wrap {
    direction: rtl;
}

.rtl .cf7-captcha-refresh {
    margin-left: 0;
    margin-right: 10px;
}