/* Калькулятор /leasing/: ползунок цены на нативном <input type="range">.
   «Таблетка», торцы и подписи 150 000 / 1 000 000 — прежние правила
   .leasing-price-wrap из leasing.css; правила .slider* (template_styles.css) и .ui-slider-* (leasing.css)
   нужны HTML, закешированному браузерами со старой разметкой, — удалять не раньше чем через 31 день.
   Переменные на .leasing-range: --p — положение ручки 0…1 (ставит js/leasing-calc.js, в разметке — для 500 000),
   --a — сдвиг стрелки плашки, когда плашку прижимает к краю. */
.leasing__calc-field_price .leasing-range {
    height: 28px;
}
/* тонкая полоса посередине дорожки */
.leasing-range__line {
    position: absolute;
    top: 9px;
    left: 14px;
    right: 14px;
    height: 5px;
    background-image: linear-gradient(#f5f5f5, #f9f9f9);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
}
/* заливка от левого торца до ручки */
.leasing-range__fill {
    position: absolute;
    top: 1px;
    left: 14px;
    width: calc(var(--p, .4118) * (100% - 28px));
    height: 28px;
    background-color: #3198a7;
}
/* Само поле прозрачное и выше дорожки: ручка 80×76 накрывает и плашку — за плашку можно тянуть,
   а пальцу есть за что взяться (зона касания больше 44 px). Центр ручки ходит от 14 px до ширины − 14 px. */
.leasing-range__input {
    position: absolute;
    z-index: 3;
    top: -40px;
    left: -26px;
    width: calc(100% + 52px);
    height: 76px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
}
.leasing-range__input:focus {
    outline: none;
}
.leasing-range__input::-webkit-slider-runnable-track {
    height: 76px;
    border: 0;
    background: transparent;
}
.leasing-range__input::-webkit-slider-thumb {
    width: 80px;
    height: 76px;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.leasing-range__input::-moz-range-track {
    height: 76px;
    border: 0;
    background: transparent;
}
.leasing-range__input::-moz-range-progress {
    background: transparent;
}
.leasing-range__input::-moz-range-thumb {
    width: 80px;
    height: 76px;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}
.leasing-range__input::-moz-focus-outer {
    border: 0;
}
/* Плашка с суммой: внешний вид — .leasing-fix из leasing.css; здесь положение над центром ручки. */
.leasing__calc-field_price .leasing-range .leasing-range__fix {
    z-index: 2;
    top: -37px;
    left: calc(14px + var(--p, .4118) * (100% - 28px));
    pointer-events: none;
}
.leasing__calc .leasing-range .leasing-range__fix::after {
    left: var(--a, 50%);
}
/* Фокус с клавиатуры — рамка у плашки. Отдельным правилом: где :focus-visible нет, пропадает только оно. */
.leasing-range__input:focus-visible + .leasing-range__fix {
    outline: 2px solid #ffd800;
    outline-offset: 2px;
}
