/* Сброс UA-стилей нативных <button> (крестик / строка предложения / «назад»).
   Строки/крестик/«назад» стали <button type="button"> ради доступности с
   клавиатуры (issue #60) — гасим фон/рамку/шрифт/выравнивание кнопки, чтобы
   визуал совпал со старой div/li-разметкой. Каждый селектор ниже
   доопределяет свою геометрию. */
.installment__close,
.installment__item,
.installment__back{
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

/* Строка предложения — на всю ширину списка, li-обёртка без своих стилей. */
.installment__row{
    list-style: none;
    margin: 0;
    padding: 0;
}
.installment__row:before{
    display: none!important;
}

/* Focus-ring для новых кнопок. aspro_next глобального :focus-visible не имеет —
   поэтому правило живёт тут. NB: в xcore_front ЭТО правило (0,2,0) побеждает
   глобальное из ui.css (0,1,0) — потому цвет через var(--accent) с fallback
   для aspro, где переменной нет (Fable-ревью #60 Б2: хардкод в тёмной теме
   давал низкоконтрастное кольцо). */
.installment__close:focus-visible,
.installment__item:focus-visible,
.installment__back:focus-visible{
    outline: 2px solid var(--accent, #6c5cc6);
    outline-offset: 2px;
}

@keyframes installment__spin {
    0%{
        transform: rotate(0);
    }

    100%{
        transform: rotate(360deg);
    }
}

.installment__loader{
    background: rgba(255, 255, 255, .8);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: all ease-in .2s;
    z-index: 1;
}

.installment__loader_active:after{
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100px;
    height: 100px;
    border: 8px solid #6c5cc6;
    margin: -50px 0 0 -50px;
    border-radius: 100%;
    border-bottom-color: transparent;
    animation: ease-in installment__spin .6s infinite;
    content: "";
}

.installment__loader:not(.installment__loader_active){
    pointer-events: none;
    opacity: 0;
}

.installment:not(.active) .installment__popup{
    display: none;
}

.installment_show .wrapper1 .header_wrap, .installment_show .display_list .list_item td.description_wrapp, .installment_show #headerfixed{
    z-index: 0!important;
}

.installment_show #footer, .installment_show .left_block{
    z-index: -1;
}

.installment__link{
    position: relative;
    padding-left: 22px;
    margin: 10px 0;
    font-size: 12px;
    line-height: 18px;
    color: #26885a;
    cursor: pointer;
}

.installment__link:before, .installment__link:after{
    position: absolute;
    left: 0;
    top: 1px;
    content: ""
}

.installment__link:before{
    background: #26885a;
    width: 16px;
    height: 16px;
    border-radius: 100%;
}

.installment__link:after{
    width: 8px;
    height: 5px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: rotate(-45deg);
    margin: 4px 0 0 4px;
}

.installment__link_bold{
    font-size: 14px;
    font-weight: bold;
}

.installment__link_under{
    text-decoration: underline;
}

.installment__popup{
    background: rgba(0, 0, 0, .2);
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99999999;
    backdrop-filter: blur(2px);
}

.installment__content{
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 90%;
    height: auto;
    border-radius: 8px;
    margin: 2%;
    overflow: scroll;
}

.installment__top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    margin-bottom: 30px;
}

.installment__title{
    font-size: 17px;
    font-weight: 700;
}

.installment__close{
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.installment__close:before, .installment__close:after{
    background: #b0b0b0;
    position: absolute;
    display: block;
    left: 0;
    top: 10px;
    width: 100%;
    height: 2px;
    pointer-events: none;
    content: "";
}

.installment__close:before{
    transform: rotate(45deg);
}

.installment__close:after{
    transform: rotate(-45deg);
}

.installment__middle{
    display: flex;
    padding: 0 0 18px;
    margin: 0 0 11px;
    border-bottom: 1px solid #f5f5f5;
}

.installment__picture{
    max-width: 90px;
    object-fit: cover;
    margin: 0 40px 0 0!important;
}

.installment__product{
    font-size: 15px;
}

.installment__name{
    display: inline-block;
    font-weight: 600;
    color: #555;
    margin: 10px 0 5px;
}

.installment__from{
    color: #059304;
}

.installment__column + .installment__column{
    text-align: center;
}

.installment__heading{
    margin: 0 0 12px;
}

.installment__table{
    list-style: none;
    margin: 15px 0 0;
}

.installment__item:not(.installment__item_hide), .installment__heading{
    display: flex;
}

.installment__item_hide{
    display: none;
}

.installment__table .installment__item .installment__column:first-child span{
    text-decoration: underline;
}

.installment__item{
    width: 100%;
    align-items: center;
    border: 1px solid #f5f5f5;
    padding: 10px;
    margin: 0 0 10px;
    transition: background-color ease-in .2s, border-color ease-in .2s;
    cursor: pointer;
}

.installment__item:hover{
    background: rgba(108, 92, 198, .15);
    border-color: rgba(108, 92, 198, .15);
}

.installment__item:before{
    display: none!important;
}

.installment__column:first-child{
    width: 50%;
}

.installment__column:first-child + .installment__column{
    width: 20%;
}

.installment__column img{
    max-width: 40px;
    object-fit: cover;
    margin-right: 18px!important;
}

.installment__calc span, .installment__column:first-child + .installment__column span{
    font-weight: 600;
}

.installment__calc, .installment__total{
    display: block;
}

.installment__total{
    font-size: 12px;
}

.installment__form{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 25px;
}

.installment__form_hide{
    display: none;
}

.installment__form form{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.installment__form fieldset{
    width: 100%;
}

.installment__form fieldset + fieldset{
    margin-top: 12px;
}

.installment__form fieldset + button{
    margin-top: 20px;
}

.installment__form label{
    width: 100%;
    text-align: left;
    margin-bottom: 6px;
}

/* Кнопка сабмита формы. Скоуп `[type="submit"]` — с #60 в .installment__form
   лежит ещё и <button.installment__back> (type="button"); без него правило
   красило бы «назад» как сабмит. */
.installment__form button[type="submit"]{
    display: inline-block;
    height: auto!important;
    line-height: 15px!important;
    padding: 15px 35px!important;
}

.installment__back{
    position: relative;
    display: inline-block;
    margin-top: 25px;
    font-size: 15px;
    padding-bottom: 1px;
    border-bottom: 1px solid;
    padding-left: 16px;
    cursor: pointer;
    transition: border-color ease-in .2s;
}

.installment__back:before, .installment__back:after{
    position: absolute;
    left: 0;
    top: 50%;
    display: block;
    transition: margin-left ease-in .2s;
    content: "";
}

.installment__back:before{
    width: 7px;
    height: 7px;
    border-left: 1px solid #555;
    border-bottom: 1px solid #555;
    margin-top: -4px;
    transform: rotate(45deg);
}

.installment__back:after{
    background: #555;
    width: 8px;
    height: 1px;
    margin-top: -1px;
}

.installment__back:hover{
    border-color: transparent;
}

.installment__back:hover:before, .installment__back:hover:after{
    margin-left: -2px;
}

.installment__success{
    font-size: 18px;
    color: #059304;
    text-align: center;
    padding: 20px 10px 35px;
}

.installment__success ~ [class^="installment"]{
    display: none;
}

.installment__quote{
    font-size: 11px;
    line-height: 20px;
    color: #999;
    padding: 16px 0 25px;
    border-top: 1px solid #f5f5f5;
}

@media (min-width: 768px){
    .installment__content{
        padding: 30px 40px 0;
    }

    .installment__column:last-child{
        width: 30%;
    }
}

@media (max-width: 768px){
    .installment__content{
        padding: 20px 20px 0;
    }

    .installment__column:first-child + .installment__column, .installment__column img{
        display: none;
    }

    .installment__column:last-child{
        width: 50%;
    }

    .installment__heading{
        padding: 0 10px;
    }

    .installment__heading .installment__column:first-child, .installment__table .installment__column:first-child{
        text-align: left;
    }

    .installment__heading .installment__column:last-child{
        text-align: right;
    }
}