/* digt:modal.feedback — модальное окно заявки (запрос цены / онлайн консультация) */

.mf-modal[hidden],
.mf-modal [hidden] {
    display: none !important;
}

html.mf-modal-open {
    overflow: hidden;
}

.mf-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* ниже z-index: 9000 попапа согласий main.userconsent.request,
       чтобы текст соглашения открывался поверх модалки */
    z-index: 8000;
    overflow-y: auto;
    -webkit-animation: mf-fade-in 0.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
    animation: mf-fade-in 0.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

.mf-modal__overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(40, 40, 42, 0.6);
}

.mf-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 80px auto;
    padding: 56px 48px 48px;
    background: #fff;
    border-radius: 8px;
    box-sizing: border-box;
}

.mf-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mf-modal__close::before,
.mf-modal__close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: #7E828B;
    transition: background 0.2s ease;
}

.mf-modal__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mf-modal__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mf-modal__close:hover::before,
.mf-modal__close:hover::after {
    background: #CC4533;
}

.mf-modal__title {
    font-weight: bold;
    font-size: 26px;
    line-height: 1.3;
    margin: 0;
    color: #28282A;
    text-align: center;
}

.mf-modal__text {
    margin: 8px 0 32px;
    font-weight: normal;
    font-size: 16px;
    line-height: 1.3;
    color: #424242;
    text-align: center;
}

.mf-modal__product {
    margin: 8px 0 32px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    color: #28282A;
    text-align: center;
}

.mf-modal__form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mf-modal__input-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 468px;
}

.mf-modal__input-block {
    display: block;
    position: relative;
    margin-bottom: 32px;
    vertical-align: top;
}

.mf-modal__input {
    border: 0;
    border-bottom: 1px solid #CFD1D6;
    display: block;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    box-sizing: border-box;
    color: #28282A;
    width: 100%;
    padding: 9px 0;
    height: 40px;
    background: transparent;
    transition: 1s ease;
}

.mf-modal__input:focus-visible {
    outline: 0;
}

.mf-modal__input:focus-visible,
.mf-modal__input:valid {
    border-bottom: 1px solid #424242;
    color: #424242;
}

.mf-modal__label {
    position: absolute;
    pointer-events: none;
    top: 0;
    white-space: nowrap;
    overflow: hidden;
    line-height: 40px;
    font-weight: 400;
    font-size: 16px;
    color: #7E828B;
    transition: 0.3s;
}

.mf-modal__input:focus-visible ~ .mf-modal__label,
.mf-modal__input:valid ~ .mf-modal__label {
    top: -17px;
    font-size: 14px;
    line-height: 14px;
}

.mf-modal__input-block.mf-error-empty .mf-modal__input,
.mf-modal__input-block.mf-error-text .mf-modal__input {
    border-bottom: 1px solid #CC4533;
}

.mf-modal__input-block.mf-error-empty::after {
    content: "Поле не может быть пустым";
    font-weight: 500;
    font-size: 12px;
    line-height: 12px;
    color: #DB1F29;
    margin-top: 4px;
    position: absolute;
    display: block;
}

.mf-modal__error-text {
    font-weight: 500;
    font-size: 12px;
    line-height: 12px;
    color: #DB1F29;
    margin-top: 4px;
    position: absolute;
    display: block;
}

/* Контейнер согласий как в исходной вёрстке (.checkbox из стилей сайта):
   label согласия НЕ должен быть flex-элементом с display:flex,
   иначе галочка ::after съезжает относительно чекбокса */
.mf-modal .checkbox {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 468px;
}

.mf-modal__button {
    font-style: normal;
    font-weight: 500;
    display: block;
    text-align: center;
    margin-top: 48px;
    text-decoration: none;
    padding: 13px 31px 15px 31px;
    font-size: 18px;
    font-family: inherit;
    background: #CC4533;
    color: #fff;
    border-radius: 6px;
    border: 1px solid #CC4533;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mf-modal__button:hover {
    color: #CC4533;
    background: #fff;
}

.mf-modal__button:disabled {
    opacity: 0.6;
    cursor: default;
}

.mf-modal__message {
    margin-top: 16px;
    max-width: 468px;
    font-weight: 500;
    font-size: 13px;
    line-height: 16px;
    color: #DB1F29;
    text-align: center;
}

.mf-modal__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 40px 0;
    text-align: center;
}

.mf-modal__link {
    color: #CC4533;
    text-decoration: none;
    cursor: pointer;
}

.mf-modal__link:hover {
    color: #A33729;
    transition: color 0.1s ease;
}

@-webkit-keyframes mf-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes mf-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .mf-modal__dialog {
        margin: 16px;
        padding: 48px 24px 32px;
    }

    .mf-modal__title {
        font-size: 22px;
    }
}
