/* Стили секции, в которой выводится капча */
.form-captcha {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.form-captcha__image {
    border-radius: 4px;
    margin-right: 0.5rem;
    width: 25%;
    height: auto;
}

.form-captcha__refresh {
    padding: 0.5rem 0.75rem;
    line-height: 1;
    border: 1px solid #ced4da;
    margin-right: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.form-captcha__refresh:hover {
    background-color: #eee;
}

.form-captcha__input {
    flex-grow: 1;
    position: relative;
    margin-bottom: 0;
}

@media (max-width: 400px) {
    .form-captcha {
        flex-wrap: wrap;
    }

    .form-captcha__input {
        min-width: 200px;
        margin-top: 0.5rem;
    }
}

.form-captcha__input .invalid-feedback {
    position: absolute;
    bottom: -1.5rem;
}


/* CSS для секции "Пользовтельское соглашение" */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
}

.custom-checkbox .custom-control-label::before {
    border-radius: .25rem;
}

.custom-control-label::before {
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.custom-control-label::before {
    position: absolute;
    top: .25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: #adb5bd solid 1px;
}

.custom-control-label::after {
    position: absolute;
    top: .25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50%/50% 50%;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.custom-control-label::after {
    position: absolute;
    top: .25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50%/50% 50%;
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: #007bff;
    background-color: #007bff;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
    border-color: #80bdff;
}

.custom-control-input:active ~ .custom-control-label::before {
    color: #fff;
    background-color: #b3d7ff;
    border-color: #b3d7ff;
}

.form-agreement label {
    font-size: 0.875rem;
}

/* Стили для сообщения об успешной отправки */
.form-result-success {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .6);
    font-size: 1.25rem;
    border-radius: 4px;
}

.form-result-success > div {
    position: relative;
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #eff4f1;
    z-index: 1001;
    border-radius: 0;
    color: #797979;
    background-color: #eff4f1;
}

/*    color: #28a745;
    background-color: transparent;
    font-weight: 700;
}*/

/* CSS для индикации полей форме при их не валидности */
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + .75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");
    background-repeat: no-repeat;
    background-position: center right calc(.375em + .1875rem);
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

textarea.form-control.is-invalid {
    padding-right: calc(1.5em + .75rem);
    background-position: top calc(.375em + .1875rem) right calc(.375em + .1875rem);
}


.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, .25);
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

* Стили для сообщения об ошибках */
.form-error {
    position: relative;
    padding: .5rem 1rem 0.6rem;
    margin-bottom: 1rem;
    border-radius: .25rem;
    color: #dc3545;
    background-color: #dc35450d;
    border: 1px solid #dc3545;
}

