/*------------------------------------*\
    
    WebFX CF7 Customizations - Global styling for all CF7 Forms

    Add custom CF7 form styling to this file if it should be applied to all CF7 forms on the site
    Otherwise, put your block-specific styles in individual block stylesheets so that various block-specific styles aren't loaded on every CF7 form

\*------------------------------------*/

/* Animations */
@-webkit-keyframes simpleSpin {
    0% {
        -webkit-transform: translate(-50%, -50%) rotateZ(0deg);
        transform: translate(-50%, -50%) rotateZ(0deg);
    }

    100% {
        -webkit-transform: translate(-50%, -50%) rotateZ(360deg);
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}

@keyframes simpleSpin {
    0% {
        -webkit-transform: translate(-50%, -50%) rotateZ(0deg);
        transform: translate(-50%, -50%) rotateZ(0deg);
    }

    100% {
        -webkit-transform: translate(-50%, -50%) rotateZ(360deg);
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}


/* WP CF7 Form */
.wpcf7-form {
    position: relative;
    z-index: 11;
}

/* .wpcf7-form.submitting {} */

    /* Loader */
    .wpcf7-form__ajax-loader {
        position: absolute;
        top: 0;
        left: 0;
        z-index: -11;

        width: 100%;
        height: 100%;

        background-color: #fff;
        opacity: 0;

        transition: opacity 0.3;

        cursor: not-allowed;
    }

    .wpcf7-form__ajax-loader::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        display: block;
        width: 50px;
        height: 50px;
        border: 5px solid;
        border-color: #044c84 #044c84 transparent;
        border-radius: 50%;
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
        -webkit-animation: simpleSpin 1.5s linear infinite;
        animation: simpleSpin 1.5s linear infinite;
    }

    .wpcf7-form.submitting .wpcf7-form__ajax-loader {
        z-index: 11;
        opacity: 0.5;
        
        transition: opacity 0.3s;
    }


/* Default Radio/Checkbox Style (if using CF7) */
.wpcf7-form .wpcf7-radio .wpcf7-list-item,
.wpcf7-form .wpcf7-checkbox .wpcf7-list-item {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    /* incase items go to 2 lines */
}

.wpcf7-form .wpcf7-radio .wpcf7-list-item-label,
.wpcf7-form .wpcf7-checkbox .wpcf7-list-item-label {
    margin-left: 5px;
}

/* Form control wrapper */
.wpcf7-form-control-wrap {
    display: block;
    position: relative;
}

    .wpcf7-form-control-wrap.has-error .wpcf7-form-control {
        padding-right: 48px;
    }

/* Individual field error messages */
.wpcf7-form .wpcf7-not-valid-tip {
    display: none;

    margin-top: 10px;

    position: absolute;
    top: -35px;
    right: 0;

    text-align: right;
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 600;
    color: #0188e8;
}

    /* User triggered focus event */
    .wpcf7-form-control-wrap.has-error .wpcf7-not-valid-tip {
        display: block;
    }

/* Entire form error message */
.wpcf7-form .wpcf7-response-output {
    margin: 40px 0 0 !important;
    padding: 20px !important;

    border-color: #23508E !important;
}

.wpcf7-form.invalid .wpcf7-response-output {
    color: #0188e8 !important;
    border-color: #0188e8 !important;
}

/* Styling for fields that have errors */
select.wpcf7-not-valid,
textarea.wpcf7-not-valid,
input.wpcf7-not-valid,
.wpcf7-not-valid .choices {
    border-left: 5px solid #0188e8;
}