/*
 * Старые страницы на шаблоне gardista — калькулятор (/calculator/): правила старого шаблона только этого раздела.
 * Файл собирает local/tools/legacy-css.js — руками не править, правку внести в исходник и пересобрать.
 */

.text-primary {
    color: var(--primary) !important;
}

.calculator-option {
    flex: 1 1 30%;
    min-width: 200px;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.calculator-option.selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.calculator-option__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.calculator-option__no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E4EDF9;
    z-index: 1;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
}

.calculator-option__icon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: 32px;
}

.calculator-option__button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    background-color: #032755;
    color: #fff;
    text-align: center;
    padding: 5px;
    font-size: 0.85rem;
    z-index: 2;
}

.calculator-option__label {
    position: relative;
    z-index: 3;
    padding: 5px;
    background: rgba(255, 255, 255, 0.8);
    text-align: center;
    width: 100%;
    font-weight: 600;
    font-size: 0.9rem;
}

.step-controls {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
}

.step-controls button.next-step:disabled {
    display: none;
}

.calculator-step .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on desktop */
    gap: 1rem;
}

.calculator-form .calculated__btn {
    margin-top: 8px;
    display: inline-block;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 19px;
    text-transform: uppercase;
    color: #ffffff;
    padding: 15px;
    background: #032755;
    -webkit-transition: 0.3s;
    -o-transition: 0.3s;
    transition: 0.3s;
    width: 100%;
    animation: banner__background--additionally-blink 2s infinite ease-in-out;
}

.calculator-form .calculated__btn--buy {
    margin-top: 8px;
    display: inline-block;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 19px;
    text-transform: uppercase;
    color: #ffffff;
    padding: 15px;
    background: #032755;
    -webkit-transition: 0.3s;
    -o-transition: 0.3s;
    transition: 0.3s;
    width: 100%;
}

@media (max-width: 768px) {
    .calculator-step .row {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
    .calculator-step .row#step-2-options {
        grid-template-columns: repeat(2, 1fr);
        /* 2 column on mobile */
    }
    .calculator-option {
        flex: 1 1 100%;
        min-width: 100%;
    }
    .calculator__card {
        width: 100%;
    }
}

.calculator .modal {
    z-index: 99999;
}

.calculator__modal-btn {
    cursor: pointer;
    transition: 0.5s;
}

.calculator__modal-btn:hover {
    color: rgba(3, 39, 85, 0.51);
}

.calculator__img-btn {
    color: #032755;
}

@media (max-width: 768px) {
    .calculator .table.table-bordered {
        display: none;
    }
}

@keyframes banner__background--additionally-blink {
    0% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
        box-shadow: 0 0 100px rgba(255, 255, 255, 0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    }
}
