/* styles for forms */

.form-control {
    border: 1px solid #dddddd;
    background-color: #f8f8f8;
}
.form-control:focus {
    border-color: #999999;
    box-shadow: unset;
}
.form-group label:not(.custom-file-label) {
    font-size: 13px;
    line-height: 17px;
    color: #999999;
}
.form-group label > span {
    color: #F25353;
}

input[type="text"].form-control,
input[type="email"].form-control,
input[type="tel"].form-control {
    height: 48px;
    font-size: 15px;
    line-height: 20px;
    color: #333333;
}
select.form-control {
    height: 48px;
    font-size: 15px;
    line-height: 20px;
    color: #333333;
}
textarea.form-control {
    font-size: 15px;
    line-height: 20px;
    color: #333333;
    min-height: 100px;
}
input[type="text"].form-control:not(.empty):not(:focus),
input[type="email"].form-control:not(.empty):not(:focus),
input[type="tel"].form-control:not(.empty):not(:focus),
textarea.form-control:not(.empty):not(:focus){
    background-color: #ffffff;
}

/* form btn */
.form-btn-wrap {
    margin-top: 40px;
}
.form--service .form-btn-wrap {
    margin-top: 30px;
}
.form--service .form-btn-wrap button {
    margin-top: 10px;
    margin-right: 10px;
}
.form-btn-center .form-btn-wrap {
    display: flex;
    justify-content: center;
}

/* custom checkbox */
.custom-control {
    min-height: unset !important;
}
.custom-checkbox {
    padding-left: 24px;
    max-height: 17px;
}
.checkbox-group .custom-checkbox {
    max-height: unset;
}
.custom-checkbox label {
    color: #666666;
    padding-left: 7px;
    font-size: 13px;
    line-height: 17px;
}
.custom-checkbox label:hover {
    cursor: pointer;
}
.custom-checkbox label::before {
    top: 0;
    width: 17px;
    height: 17px;
    border: 1px solid #dddddd;
    background-color: #fcfcfc;
}
.custom-checkbox label::after {
    top: 0;
    width: 17px;
    height: 17px;
}
.custom-checkbox input:focus ~ label::before {
    box-shadow: none !important;
}
.custom-checkbox:focus:not(:checked) ~ label::before {
    border-color: #ececec !important;
}
.custom-checkbox:not(:disabled):active ~ label::before {
    border-color: #ececec !important;
    background-color: #f8f8f8 !important;
}
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 1L3 6L1 4' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

/* custom checkbox--toggle*/
.custom-checkbox.custom-checkbox--toggle {
    padding-left: 0;
}
.custom-checkbox.custom-checkbox--toggle label {
    padding-left: 44px;
    line-height: 20px;
    color: #333 !important;
}
.custom-checkbox.custom-checkbox--toggle label::before {
    width: 34px;
    height: 20px;
    left: 0;
    border-radius: 10px;
    background: #DDDDDD;
    border: none;
}
.custom-checkbox.custom-checkbox--toggle .custom-control-input:not(:checked) ~ label:hover::before {
    background: #DDDDDD !important;
}
.custom-checkbox.custom-checkbox--toggle label::after {
    position: absolute;
    top: unset;
    bottom: 3px;
    left: 3px;
    border-radius: 100%;
    background: #fff;
    width: 14px;
    height: 14px;
    box-shadow: 0 1px 3px rgba(128, 139, 172, 0.5);
    transition: left .1s ease-in;
}
.custom-checkbox.custom-checkbox--toggle .custom-control-input:checked ~ .custom-control-label::after {
    background-image: unset;
    left: 17px;
}


/* custom radio */
.custom-control.custom-radio {
    padding-left: 30px;
    margin-right: 30px;
}
.custom-radio .custom-control-label {
    font-size: 14px;
    line-height: 20px;
    color: #333;
}
.custom-control.custom-radio .custom-control-label {
    padding-top: 1px;
}
.custom-radio .custom-control-label::before, .custom-radio .custom-control-label::after {
    width: 20px !important;
    height: 20px !important;
    left: -30px !important;
    top: 0 !important;
}
.custom-radio .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: none !important;
}
.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-6 -6 12 12'%3e%3ccircle r='5' fill='%23fff'/%3e%3c/svg%3e");
}

/* form-block */
.form-block {
    /* padding: 53px 59px; */
    /* border: 1px solid #ececec;
    border-radius: 3px; */
}
.form-wrap {
    padding: 53px 59px;
    border: 1px solid #ececec;
    border-radius: 3px;
    background-color: #ffffff;
}
@media (max-width: 767px) {
    .form-wrap {
        padding: 40px;
    }
}

/* form-success */
.form-block-success,
.form-block-error {
    display: none;
    justify-content: center;
    align-items: center;
}
.form-success > .form-block, .form-error > .form-block { display: none; }
.form-success > .form-block-success { display: flex; }
.form-error > .form-block-error { display: flex; }

.form-block-success div,
.form-block-error div {
    text-align: center;
}
.form-block-success svg,
.form-block-error svg {
    height: 80px;
    width: 80px;
    margin-bottom: 25px;
}
.form-block-success .form-block-title,
.form-block-error .form-block-title {
    font-size: 24px;
    line-height: 20px;
    font-weight: bold;
    color: #333333;
}
.form-block-success .form-block-text,
.form-block-error .form-block-text {
    font-size: 15px;
    line-height: 20px;
    color: #666666;
    margin-top: 14px;
}
.form-block-success button,
.form-block-error button {
    margin-top: 36px;
}

/* captcha */
.form-captcha {
    display: flex;
}
.form-captcha img {
    cursor: pointer;
}
@media (max-width: 450px) {
    .form-captcha > input {
        width: 50%;
    }
}

/* validation */
.form-control.is-valid, .was-validated .form-control:valid,
.was-validated .form-control:valid:focus {
    border-color: #ececec !important;
    background-image: none !important;
    box-shadow: none !important;
}
.custom-control-input.is-valid~.custom-control-label, .was-validated .custom-control-input:valid~.custom-control-label {
    color: #999999 !important;
}
.form-control.is-invalid, .was-validated .form-control:invalid {
    background-image: none !important;
    border-color: #F25353 !important;
}
.invalid-feedback {
    color: #F25353 !important;
    font-size: 12px;
    line-height: 20px;
}
.custom-checkbox .invalid-feedback {
    margin-left: 7px;
    margin-top: 0;
}
.custom-control-input.is-invalid~.custom-control-label, .was-validated .custom-control-input:invalid~.custom-control-label {
    color: #999999 !important;
}
.was-validated .custom-control-input:valid ~ .custom-control-label::before {
    border-color: #ececec !important;
}

/* custom form file */
.form-custom-file-wrapper {
    position: relative;
}

.form-custom-file-wrapper .form-custom-file-label {
    background: #FCFCFC;
    border: 1px solid #DDDDDD;
    border-radius: 3px;
    height: 48px;
    margin: 0;

    font-weight: normal;
    font-size: 13px;
    line-height: 20px;

    display: flex;
    align-items: center;

    transition: background-color 0.3s;
}

.form-custom-file-wrapper.file-selected .form-custom-file-label {
    border-radius: 3px 0 0 3px;
    margin: 0 47px 0 0;
}

.form-custom-file-wrapper .form-custom-file-label:hover,
.form-custom-file-wrapper .form-custom-file-close:hover {
    cursor: pointer;
}

.form-custom-file-wrapper .form-custom-file-clip {
    display: block;
    height: 20px;
    width: 11px;
    margin-left: 18px;
    color: #BBBBBB;
}

.form-custom-file-label:hover .form-custom-file-clip,
.form-custom-file-label:hover .form-custom-file-default-text,
.form-custom-file-label:hover .form-custom-file-name {
    color: #FFFFFF;
}

.form-custom-file-wrapper .form-custom-file-clip svg {
    height: 20px;
    width: 11px;
}

.form-custom-file-wrapper .form-custom-file-input {
    opacity: 0;
    width: 0;
    height: 0;
    z-index: -1;
}

.form-custom-file-wrapper .form-custom-file-default-text,
.form-custom-file-wrapper .form-custom-file-name {
    margin: 0 17px;
    color: #333333;
}

.form-custom-file-wrapper.file-selected .form-custom-file-default-text,
.form-custom-file-wrapper:not(.file-selected) .form-custom-file-name,
.form-custom-file-wrapper:not(.file-selected) .form-custom-file-close {
    display: none;
}

.form-custom-file-wrapper .form-custom-file-close {
    position: absolute;
    background: #FCFCFC;
    border: 1px solid #DDDDDD;
    border-left: none;
    border-radius: 0 3px 3px 0;
    height: 48px;
    margin: 0;

    top: 0;
    right: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background-color 0.3s;
}

.form-custom-file-wrapper .form-custom-file-close svg {
    width: 10px;
    height: 10px;
    margin: 0 18px;
    stroke: #BBBBBB;
}

.form-custom-file-wrapper .form-custom-file-close:hover svg {
    stroke: #FFFFFF;
    margin-left: 19px;
}

.form-custom-file-wrapper.invalid ~ .invalid-feedback.active {
    display: block;
}

.form-custom-file-wrapper.invalid .form-custom-file-label,
.form-custom-file-wrapper.invalid .form-custom-file-close {
    border-color: #F25353;
}
