body {
    padding-top: 150px;
}

nav.navbar {
    z-index: 99;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 120px;
    background: white;
}

.border-radius-0 {
    border-radius: 0;
}

.text-left {
    text-align: left;
}

.card-text.text-muted {
    margin-top: 16px;
    opacity: 0.75;
}

.color-white,
[x-show="results"] .text-muted {
    color: white !important;
}

.btn {
    display: inline-flex;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    padding: 6px 12px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.btn-danger {
    color: white !important;
}

.btn-lilac {
    color: #fff;
    background-color: #6467f2;
}

.btn-lilac:hover {
    color: #fff;
    background-color: color-mix(in oklab, #6467f2 90%, transparent);
}

/* Красивые горизонтальные переключатели (Segmented Controls) */
.calc-segmented-control {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #ced4da;
    background-color: #fff;
    max-width: 420px;
    padding: 2px;
}

nav.navbar>div {
    background: #fff;
}

nav .btn-active {
    background: none !important;
    border: none;
    color: white !important;
    font-weight: 400;
    opacity: 1 !important;
}

.navbar-toggler {
    color: #fff;
    background-color: #6467f2;
}

.calc-segmented-control .btn-check+.custom-segment {
    flex: 1;
    text-align: center;
    border: none !important;
    background-color: transparent;
    color: #6c757d;
    border-radius: 0.375rem !important;
    transition: all 0.25s ease-in-out;
    cursor: pointer;
}

.calc-segmented-control {
    background: #f8f9fa;
    border: none;
    padding: 0;
}

.btn.custom-segment {
    min-height: 38px;
}

.calc-segmented-control .btn-check+.custom-segment:hover {
    background-color: #e3e3e4;
    color: #495057;
}

/* Состояние: Выбрано (Универсальное по умолчанию) */
.calc-segmented-control .btn-check:checked+.custom-segment {
    background-color: #e1ffad;
    color: #3e6008 !important;
}

.calc-segmented-control .btn-check+.custom-segment {
    font-weight: 400 !important;
}

.calc-segmented-control .btn-check:checked+.custom-segment[for*='no'] {
    background-color: #ffefe7;
    color: #6a6a6a !important;
}

.calc-segmented-control .btn-check:checked+.custom-segment[for*='yes'] {
    background-color: #e1ffad;
    color: #3e6008 !important;
}

.form-switch .form-check-input {
    cursor: pointer;
}

.form-switch .form-check-input:active,
.form-switch .form-check-input:focus {
    box-shadow: none !important;
    outline: 0 !important;
}

.form-check-input:checked {
    background-color: #aedb62;
    border-color: #aedb62;
}

/* 1. Только для ПЕРВОГО выбранного элемента */
.calc-segmented-control .btn-check:first-child+.custom-segment {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* 2. Только для ПОСЛЕДНЕГО выбранного элемента */
.calc-segmented-control .btn-check:last-child+.custom-segment {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* 3. Для выбранных элементов, которые НЕ первый и НЕ последний (между ними) */
.calc-segmented-control .btn-check:not(:first-child):not(:last-child)+.custom-segment {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.navbar-brand,
.navbar-brand:focus,
.navbar-brand:hover {
    color: #000000;
}

#navbarCalcContent a {
    position: relative;
    display: inline-flex;
    color: black;
    opacity: 0.75;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 96px;
    border: 1px solid #ffffff;
    transition: all 0.25s ease-in-out;
}

#navbarCalcContent a.with-image {
    align-items: flex-start;
}

#navbarCalcContent a:hover {
    opacity: 1 !important;
}

#navbarCalcContent .btn-calc:hover,
#navbarCalcContent .btn-calc.btn-active {
    color: black !important;
    border: 1px solid #ffffff;
}

#navbarCalcContent .btn-calc:hover {
    box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.15);
}

#navbarCalcContent .btn-calc.btn-active {
    opacity: 0.25 !important;
}

#navbarCalcContent .btn-calc:before {
    content: "";
    display: block;
    width: 60px;
    height: 52px;
    position: absolute;
    top: 34px;
    left: auto;
    right: auto;
    background-size: contain !important;
}

#navbarCalcContent .btn-calc:nth-of-type(1):before {
    background: url(https://baza-petrovich.by/calc/images/icon-product0.png) no-repeat;
}

#navbarCalcContent .btn-calc:nth-of-type(2):before {
    background: url(https://baza-petrovich.by/calc/images/icon-product1.png) no-repeat;
}

#navbarCalcContent .btn-calc:nth-of-type(3):before {
    background: url(https://baza-petrovich.by/calc/images/icon-product2.png) no-repeat;
}

#navbarCalcContent .btn-calc:nth-of-type(4):before {
    background: url(https://baza-petrovich.by/calc/images/icon-product2.png) no-repeat;
}

#navbarCalcContent .btn-calc:nth-of-type(5):before {
    background: url(https://baza-petrovich.by/calc/images/icon-product3.png) no-repeat;
}

@media (min-width: 768px) {
    button {
        min-height: 44px;
    }
}

@media (min-width: 1400px) {
    #navbarCalcContent a {
        min-width: 150px;
    }
}

@media (max-width: 991px) {
    nav.navbar .navbar-collapse {
        padding-bottom: 24px;
    }
}

@media (max-width: 767px) {
    body {
        padding: 140px 0;
    }

    .nav-tabs .nav-link.active {
        border-color: #c6c7c8;
        border-radius: 8px;
    }

    #navbarCalcContent a {
        width: 100%;
    }

    #navbarCalcContent .btn-calc {
        width: 100%;
        height: 76px;
    }

    #navbarCalcContent .btn-calc:before {
        width: 40px;
        height: 36px;
    }

    .form-check-input {
        margin-left: -24px !important;
    }
}