/*
 * Лаборатория Кошмарского — podbor.css
 * Секция «Подберите вирус за 60 секунд» (#podbor): встроенное окно мастера в духе Windows 7.
 * Окно повторяет «Службу безопасности» из karantin.css. Работает в паре с js/podbor.js.
 */

.podbor__window {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 6px 6px;
    background: linear-gradient(#C9DAEE, #AFC6E0);
    border: 1px solid #4B6585;
    border-radius: 6px 6px 4px 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7);
    color: #000000;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 13px;
    text-align: left;
}

.podbor__window *,
.podbor__window *::before,
.podbor__window *::after {
    box-sizing: border-box;
}

/* Тема 2010 ставит заголовкам Trebuchet — внутри окна все пишется системным шрифтом */
.podbor__window h3 {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Окно вздрагивает после «ОК» в окне «Отмена невозможна» */
.podbor__window--shake {
    animation: podbor-shake .35s ease-in-out;
}

@keyframes podbor-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(5px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(2px); }
}

/* ===== ЗАГОЛОВОК ОКНА ===== */
.podbor__title {
    display: flex;
    align-items: center;
    height: 30px;
    color: #1E1E1E;
    /* «Стеклянная» подпись Windows 7: белое свечение вокруг букв */
    text-shadow: 0 0 8px #ffffff, 0 0 3px #ffffff;
    white-space: nowrap;
    overflow: hidden;
}

.podbor__title span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.podbor__title img {
    flex: 0 0 auto;
    margin: 0 8px 0 4px;
}

.podbor__title--small {
    height: 26px;
}

.podbor__controls {
    display: flex;
    margin-left: auto;
    align-self: flex-start;
}

.podbor__ctrl {
    width: 28px;
    height: 19px;
    padding: 0;
    border: 1px solid #5C7698;
    border-top: 0;
    background: linear-gradient(#DCE7F4, #B3C8E2);
    color: #2B3F5C;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.podbor__ctrl + .podbor__ctrl {
    border-left: 0;
}

.podbor__ctrl:disabled {
    color: #8EA2BB;
    cursor: default;
}

.podbor__ctrl--close {
    width: 44px;
    border-radius: 0 0 4px 0;
    background: linear-gradient(#E3A08F, #C7442B 50%, #B32E14);
    border-color: #7A2210;
    color: #ffffff;
}

.podbor__ctrl--close:hover {
    background: linear-gradient(#F0B4A3, #DA563B 50%, #C73A1E);
}

/* ===== БЕЛОЕ ТЕЛО ОКНА ===== */
.podbor__frame {
    position: relative;
    display: flex;
    min-height: 430px;
    background: #ffffff;
    border: 1px solid #8DA2BD;
    border-bottom: 0;
}

/* ===== БОКОВАЯ ПОЛОСА УСТАНОВЩИКА ===== */
.podbor__side {
    flex: 0 0 170px;
    display: flex;
    flex-direction: column;
    padding: 22px 14px 14px;
    /* Два фона: сверху узор из SVG, под ним — бордовый градиент */
    background: url(../img/podbor/side.svg) center bottom / 100% auto no-repeat,
                linear-gradient(#6B1A1E, #2A0A0C);
    color: #F1DADB;
    text-align: center;
}

.podbor__logo {
    display: block;
    margin: 0 auto 10px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6));
}

.podbor__brand {
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.25;
    text-shadow: 0 1px 2px #000000;
}

.podbor__ver {
    margin-top: 4px;
    color: #C9A3A6;
    font-size: 11px;
}

.podbor__checklist {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.podbor__check {
    position: relative;
    padding: 4px 0 4px 20px;
    color: #A88084;
    font-size: 12px;
}

/* Значок перед пунктом: кружок — впереди, стрелка — сейчас, галочка — пройдено */
.podbor__check::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 9px;
    width: 7px;
    height: 7px;
    border: 1px solid #8A5A5E;
    border-radius: 50%;
}

.podbor__check--active {
    color: #ffffff;
    font-weight: bold;
}

.podbor__check--active::before {
    content: "\25B6";
    top: 4px;
    left: 2px;
    width: auto;
    height: auto;
    border: 0;
    color: #ffffff;
    font-size: 10px;
}

.podbor__check--done {
    color: #E8CFD1;
}

.podbor__check--done::before {
    content: "\2713";
    top: 3px;
    left: 1px;
    width: auto;
    height: auto;
    border: 0;
    color: #8FE07F;
    font-size: 13px;
}

.podbor__side-foot {
    margin-top: auto;
    padding-top: 18px;
    color: #8A6266;
    font-size: 10px;
    line-height: 1.4;
}

/* ===== ПРАВАЯ ЧАСТЬ ===== */
.podbor__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.podbor__top {
    padding: 14px 20px 12px;
    background: linear-gradient(#FFFFFF, #F1F5FA);
    border-bottom: 1px solid #DDE2E8;
}

/* Шаги «1 2 3 4 5»: кружки на общей линии */
.podbor__steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    max-width: 360px;
    margin: 0 auto 12px;
    padding: 0;
    list-style: none;
}

.podbor__steps::before {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    top: 12px;
    height: 2px;
    background: #D5DBE3;
}

.podbor__step {
    position: relative;
    width: 26px;
    height: 26px;
    border: 1px solid #A9B6C6;
    border-radius: 50%;
    background: linear-gradient(#FFFFFF, #E4E9EF);
    color: #7A8696;
    font-weight: bold;
    line-height: 24px;
    text-align: center;
    transition: background .3s, color .3s;
}

.podbor__step--active {
    border-color: #3C7FB1;
    background: linear-gradient(#EAF6FD, #BEE6FD 50%, #A7D9F5);
    color: #1E395B;
    box-shadow: 0 0 6px #6CB7EA;
}

.podbor__step--done {
    border-color: #2A8F1F;
    background: linear-gradient(#9CE68E, #37B52A 50%, #20A013 51%, #4CC63D);
    color: #ffffff;
    text-shadow: 0 1px 0 #1A6E12;
}

/* Полоса прогресса Windows 7: зеленая заливка и бегущий блик */
.podbor__progress {
    position: relative;
    height: 14px;
    overflow: hidden;
    background: linear-gradient(#E6E6E6, #F6F6F6);
    border: 1px solid #A7A7A7;
    border-radius: 3px;
}

.podbor__progress--big {
    height: 20px;
    margin: 4px 0 16px;
}

.podbor__progress--thin {
    height: 8px;
    margin-top: 3px;
}

.podbor__bar {
    position: relative;
    width: 0;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(#9CE68E, #37B52A 50%, #20A013 51%, #4CC63D);
    transition: width .45s ease-out;
}

.podbor__bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 50%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
    animation: podbor-glint 2.2s linear infinite;
}

@keyframes podbor-glint {
    from { left: -60%; }
    to   { left: 110%; }
}

/* На экране анализа ширина растет равномерно; длительность ставит js/podbor.js */
.podbor__bar--run {
    transition-property: width;
    transition-timing-function: linear;
}

/* ===== ОБЛАСТЬ ШАГА ===== */
.podbor__stage {
    flex: 1;
    padding: 18px 22px 16px;
}

.podbor__loading {
    color: #7A8696;
}

.podbor__question,
.podbor__analysis,
.podbor__result {
    animation: podbor-in .35s ease-out both;
}

@keyframes podbor-in {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}

.podbor__q-num {
    color: #7A8696;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.podbor__q-title {
    margin: 2px 0 4px;
    color: #1E395B;
    font-size: 19px;
    font-weight: normal;
}

.podbor__q-lead {
    margin: 0 0 14px;
    color: #5A6E86;
    line-height: 1.4;
}

/* ===== ВАРИАНТЫ ОТВЕТА ===== */
.podbor__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.podbor__option {
    display: flex;
    align-items: center;
    flex: 1 1 calc(50% - 8px);
    min-height: 62px;
    padding: 8px 12px 8px 10px;
    border: 1px solid #D5DBE3;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.podbor__option:hover {
    border-color: #A6C6E8;
    background: linear-gradient(#F2F8FE, #E5F3FB);
}

/* Выбранный вариант — как выделенная строка в проводнике Windows 7 */
.podbor__option--checked,
.podbor__option--checked:hover {
    border-color: #7DA2CE;
    background: linear-gradient(#DCEBFC, #C1DBFC);
}

.podbor__option--auto,
.podbor__option--auto:hover {
    border-color: #B5868A;
    background: linear-gradient(#FBEDEE, #F1D6D8);
}

.podbor__radio {
    flex: 0 0 auto;
    margin: 0 10px 0 2px;
}

.podbor__icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border: 1px solid #B8C6D8;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFFFFF, #DCE6F2 70%, #C3D3E7);
    color: #4A6C94;
    font-size: 18px;
    line-height: 38px;
    text-align: center;
}

.podbor__option--checked .podbor__icon {
    border-color: #6B1A1E;
    background: radial-gradient(circle at 35% 30%, #D86A72, #8E2228 70%, #6B1A1E);
    color: #ffffff;
}

.podbor__option-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.podbor__option-name {
    color: #1E1E1E;
    font-size: 14px;
    font-weight: 600;
}

.podbor__option-sub {
    color: #7A8696;
    font-size: 12px;
}

/* Реплика мастера после выбора: желтая подсказка, как всплывающая справка Windows */
.podbor__note {
    display: none;
    align-items: flex-start;
    margin-top: 14px;
    padding: 8px 12px;
    background: linear-gradient(#FFFFF0, #FFF7D4);
    border: 1px solid #E3D28A;
    border-radius: 3px;
    color: #4A4022;
    line-height: 1.4;
}

.podbor__note--show {
    display: flex;
    animation: podbor-fade .3s ease-out both;
}

.podbor__note i {
    margin: 2px 8px 0 0;
    color: #3A78B8;
}

.podbor__note--auto {
    background: linear-gradient(#FFF6F6, #FBE4E5);
    border-color: #D9A6A9;
    color: #6B1A1E;
}

.podbor__note--auto i {
    color: #6B1A1E;
}

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

/* ===== АНАЛИЗ СИСТЕМЫ ===== */
.podbor__analysis-head {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.podbor__scan {
    flex: 0 0 auto;
    width: 96px;
    height: 80px;
    margin-right: 16px;
    animation: podbor-scan 1.4s ease-in-out infinite alternate;
}

@keyframes podbor-scan {
    from { transform: translateX(-3px) rotate(-2deg); }
    to   { transform: translateX(3px) rotate(2deg); }
}

.podbor__lines {
    margin: 0;
    padding: 8px 10px;
    min-height: 118px;
    background: #F7F8FA;
    border: 1px solid #D5DBE3;
    list-style: none;
}

.podbor__line {
    padding: 3px 0;
    color: #1E395B;
    animation: podbor-fade .3s ease-out both;
}

.podbor__line i {
    width: 18px;
    margin-right: 6px;
    color: #4A6C94;
    text-align: center;
}

.podbor__line--done {
    color: #5A6E86;
}

.podbor__line--done i {
    color: #20A013;
}

.podbor__current {
    margin-top: 8px;
    color: #7A8696;
    font-size: 12px;
}

/* ===== РЕЗУЛЬТАТ ===== */
.podbor__card {
    display: flex;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #DDE2E8;
}

.podbor__pic {
    position: relative;
    flex: 0 0 220px;
    height: 165px;
    overflow: hidden;
    background: #0E1111;
    border: 1px solid #8DA2BD;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.podbor__pic img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podbor__ribbon {
    position: absolute;
    left: 0;
    top: 10px;
    padding: 3px 10px;
    background: linear-gradient(#A3323A, #6B1A1E);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.podbor__card-body {
    flex: 1;
    min-width: 0;
}

.podbor__card-name {
    margin: 0 0 6px;
    color: #1E395B;
    font-size: 21px;
    font-weight: normal;
}

.podbor__match {
    max-width: 260px;
    color: #2A6A1E;
    font-size: 12px;
}

.podbor__why {
    margin: 10px 0 6px;
    line-height: 1.45;
}

.podbor__warn {
    margin: 0 0 6px;
    color: #A3262C;
    font-size: 12px;
}

.podbor__price {
    margin: 6px 0 12px;
}

.podbor__price-new {
    color: #6B1A1E;
    font-size: 24px;
    font-weight: bold;
}

.podbor__price-period {
    color: #7A8696;
}

.podbor__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.podbor__also {
    padding-top: 12px;
}

.podbor__also-title {
    margin-bottom: 6px;
    color: #1E395B;
    font-size: 14px;
}

.podbor__minis {
    display: flex;
    gap: 8px;
}

/* Мини-карточка — это кнопка, поэтому сбрасываем ее стандартный вид */
.podbor__mini {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 6px;
    border: 1px solid #D5DBE3;
    border-radius: 3px;
    background: #ffffff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.podbor__mini:hover {
    border-color: #A6C6E8;
    background: linear-gradient(#F2F8FE, #E5F3FB);
}

.podbor__mini img {
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
    margin-right: 10px;
    object-fit: cover;
    border: 1px solid #C4CCD6;
}

.podbor__mini-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.podbor__mini-text b {
    overflow: hidden;
    color: #1E1E1E;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podbor__mini-price {
    color: #6B1A1E;
    font-size: 12px;
}

.podbor__facts {
    margin-top: 12px;
    padding: 8px 12px;
    background: #F7F8FA;
    border: 1px solid #D5DBE3;
}

.podbor__facts-list {
    margin: 0;
    padding-left: 18px;
    color: #5A6E86;
    font-size: 12px;
    line-height: 1.6;
}

.podbor__footnote {
    margin: 10px 0 0;
    color: #8A94A0;
    font-size: 11px;
}

/* ===== СЕРАЯ НИЖНЯЯ ПОЛОСА С КНОПКАМИ ===== */
.podbor__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 10px 12px;
    background: #F0F0F0;
    border: 1px solid #8DA2BD;
    border-top: 1px solid #DFDFDF;
}

.podbor__hint {
    margin-right: auto;
    color: #5A6E86;
    font-size: 12px;
}

/* Глянцевая кнопка Windows 7: верхняя половина светлее, резкий переход посередине */
.podbor__btn {
    display: inline-block;
    min-width: 86px;
    padding: 4px 14px;
    border: 1px solid #707070;
    border-radius: 3px;
    background: linear-gradient(#F2F2F2, #EBEBEB 50%, #DDDDDD 51%, #CFCFCF);
    color: #000000;
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.podbor__btn:hover {
    border-color: #3C7FB1;
    background: linear-gradient(#EAF6FD, #D9F0FC 50%, #BEE6FD 51%, #A7D9F5);
}

.podbor__btn:active {
    border-color: #2C628B;
    background: linear-gradient(#E5F4FC, #C4E5F6 50%, #98D1EF 51%, #68B3DB);
}

/* Кнопка по умолчанию (срабатывает по Enter) обведена голубым */
.podbor__btn--default {
    border-color: #3C7FB1;
    box-shadow: inset 0 0 0 1px #A7D9F5;
}

.podbor__btn:disabled,
.podbor__btn:disabled:hover {
    border-color: #ADB2B5;
    background: #F4F4F4;
    box-shadow: none;
    color: #838383;
    cursor: default;
}

.podbor__btn--buy {
    font-weight: bold;
}

.podbor__btn--buy i {
    color: #6B1A1E;
}

.podbor__btn i {
    margin-right: 2px;
}

/* ===== ВЛОЖЕННОЕ ОКНО «ОТМЕНА НЕВОЗМОЖНА» =====
   Ложится поверх белого тела мастера и закрывает его полупрозрачной пеленой */
.podbor__modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(214, 224, 236, .6);
}

.podbor__modal--open {
    display: flex;
}

.podbor__dialog {
    width: 100%;
    max-width: 340px;
    padding: 0 6px 6px;
    background: linear-gradient(#C9DAEE, #AFC6E0);
    border: 1px solid #4B6585;
    border-radius: 6px 6px 4px 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7);
    animation: podbor-pop .18s ease-out both;
}

@keyframes podbor-pop {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

.podbor__dialog-body {
    display: flex;
    padding: 16px 16px 12px;
    background: #ffffff;
    border: 1px solid #8DA2BD;
    border-bottom: 0;
}

.podbor__dialog-icon {
    margin-right: 14px;
    color: #E0A21B;
    font-size: 30px;
}

.podbor__dialog-head {
    margin-bottom: 4px;
    color: #1E395B;
    font-size: 15px;
}

.podbor__dialog-text {
    margin: 0;
    line-height: 1.45;
}

.podbor__dialog-foot {
    padding: 9px 12px;
    background: #F0F0F0;
    border: 1px solid #8DA2BD;
    border-top: 1px solid #DFDFDF;
    text-align: right;
}

/* ===== УЗКИЙ ЭКРАН ===== */
@media (max-width: 700px) {
    .podbor__side {
        display: none;
    }

    .podbor__stage {
        padding: 14px 12px;
    }

    .podbor__top {
        padding: 12px;
    }

    .podbor__option {
        flex-basis: 100%;
    }

    .podbor__card {
        flex-direction: column;
    }

    .podbor__pic {
        flex: 0 0 auto;
        height: 180px;
    }

    .podbor__minis {
        flex-direction: column;
    }

    .podbor__hint {
        display: none;
    }

    .podbor__btn {
        min-width: 0;
        padding: 4px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .podbor__window--shake,
    .podbor__scan,
    .podbor__bar::after {
        animation: none;
    }
}
