/* Основной контейнер-сетка */
.tarif-main-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: flex-start; /* Чтобы правый блок не растягивался по высоте */
}

/* Левая контентная часть */
.tarif-content-left {
    flex: 1;
    min-width: 65%; /* Занимает основную массу экрана */
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.single-tarif-title {
    font-size: 32px;
    color: #111;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 700;
}

.single-tarif-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

/* Временный блок вывода переменных */
.debug-variables-list h3 {
    margin-top: 0;
    color: #e54242;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.debug-variables-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.debug-variables-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* Правая колонка */
.tarif-sidebar-right {
    width: 280px; /* Фиксированная ширина около 20-25% */
    position: -webkit-sticky;
    position: sticky;
    top: 20px; /* Отступ сверху при прилипании */
    z-index: 10;
}

/* Прилипающий блок заявки */
.sticky-order-box {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    text-align: center;
}

/* Стили цены */
.sticky-price-row {
    margin-bottom: 20px;
    text-align: left;
}
.sticky-price-label {
    font-size: 13px;
    color: #888;
    display: block;
    margin-bottom: 4px;
}
.sticky-old-price {
    text-decoration: line-through;
    color: #aaa;
    font-size: 15px;
    margin-right: 8px;
}
.sticky-current-price {
    font-size: 26px;
    font-weight: 700;
    color: #111;
}
.sticky-current-price.sale {
    color: #e54242;
}

/* Строки параметров "Итого" */
.sticky-info-rows {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-bottom: 25px;
    text-align: left;
}
.sticky-info-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}
.sticky-info-line.total-line {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
    color: #111;
    font-size: 15px;
}
.sticky-info-line.total-line strong {
    font-size: 18px;
    color: #e54242;
}

/* Кнопка заявки */
.sticky-btn-submit {
    width: 100%;
    background: #e54242;
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(229, 66, 66, 0.2);
}
.sticky-btn-submit:hover {
    background: #c93333;
}

/* Блок телефона */
.sticky-phone-block {
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.phone-label {
    font-size: 12px;
    color: #999;
    display: block;
    margin-bottom: 6px;
}
.phone-number {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}
.phone-number:hover {
    color: #e54242;
}

/* Контейнер блока выбора скоростей */
.single-tarif-speed-selector {
    margin: 30px 0;
    padding: 20px;
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}
.speed-selector-title {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 6px;
    color: #111;
}
.speed-selector-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Флекс сетка кнопок */
.speed-options-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Оболочка кнопки и тултипа */
.speed-option-wrapper {
    position: relative;
    display: inline-block;
}

/* Сама интерактивная кнопка */
.speed-option-btn {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 10px 18px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease-in-out;
    user-select: none;
}
.speed-option-btn:hover {
    border-color: #b5b5b5;
    background: #fbfbfb;
}
.speed-option-btn.active {
    border-color: #e54242;
    background: #fff5f5;
}
.speed-btn-value {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}
.speed-option-btn.active .speed-btn-value {
    color: #e54242;
}
.speed-btn-unit {
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

/* Стили всплывающей подсказки (Tooltip) */
.speed-option-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #222;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    width: 220px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
}
/* Стрелочка тултипа */
.speed-option-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #222 transparent transparent transparent;
}
/* Показ при наведении */
.speed-option-wrapper:hover .speed-option-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.tooltip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tooltip-list li {
    margin-bottom: 4px;
    line-height: 1.4;
}
.tooltip-list li:last-child {
    margin-bottom: 0;
    color: #ff7373;
}


/* Контейнер для всего конструктора доп. опций */
.tarif-addons-constructor {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Карточка опции */
.addon-card-box {
    background: #ffffff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s ease;
}
.addon-card-box:hover {
    border-color: #dbe0e6;
}

/* Верхняя часть карточки (Заголовок + Свитч) */
.addon-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.addon-card-info {
    flex: 1;
}
.addon-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #111;
}
.addon-card-desc {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* Красивый Свитч (Toggle Switch) */
.addon-switch-label {
    display: inline-block;
    position: relative;
    width: 50px;  /* Подставь ширину своего свитча */
    height: 26px; /* Подставь высоту своего свитча */
    flex-shrink: 0;
}
/* Скрываем дефолтный чекбокс, который теперь лежит отдельно */
.addon-switch-label input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
/* А сам слайдер делаем кликабельной зоной */
.addon-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.addon-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
input:checked + .addon-switch-slider {
    background-color: #28a745; /* Зеленый цвет при включении */
}
input:checked + .addon-switch-slider:before {
    transform: translateX(22px);
}

/* Контейнер выбора типа покупки (радиокнопки) */
.addon-card-options {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed #eef0f2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Стилизация радиокнопок */
.addon-radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}
.addon-radio-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.radio-custom {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ced4da;
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}
.addon-radio-option:hover input ~ .radio-custom {
    border-color: #adb5bd;
}
.addon-radio-option input:checked ~ .radio-custom {
    border-color: #e54242;
    background-color: #fff;
}
.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
    top: 4px; left: 4px; width: 6px; height: 6px;
    border-radius: 50%;
    background: #e54242;
}
.addon-radio-option input:checked ~ .radio-custom:after {
    display: block;
}
.radio-text strong {
    color: #111;
}

/* Блок счетчика сим-карт */
.sim-counter-flex {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 4px;
    flex-shrink: 0;
}
.sim-counter-btn {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #e4e8ec;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: all 0.2s;
}
.sim-counter-btn:hover:not(:disabled) {
    background: #e54242;
    color: #fff;
    border-color: #e54242;
}
.sim-counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.sim-counter-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    outline: none;
}


/* Контейнер строки для двух карточек */
.addon-cards-row {
    display: flex;
    gap: 20px; /* Отступ между карточками в ряду */
    width: 100%;
}

/* Модификатор для карточек, чтобы они делили пространство поровну */
.addon-card-box.grid-column {
    flex: 1;
    min-width: 0; /* Защита флекс-элементов от переполнения */
    align-self: flex-start; /* Чтобы при раскрытии одной карточки, вторая не растягивалась по высоте принудительно */
}


/* Общий контейнер для заголовка и технологии в один ряд */
.single-tarif-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Выравнивание по центру по вертикали */
    gap: 20px;
    margin-bottom: 6px; /* Небольшой отступ до подзаголовка с городом */
    width: 100%;
}

/* Очищаем маргины у h1, чтобы они не ломали флекс-ряд */
.single-tarif-header-row .single-tarif-title {
    margin: 0;
    font-size: 32px; /* Подправь размер под свой дизайн, если нужно */
    font-weight: 800;
    color: #111;
}

/* Контейнер для плашки (прижат к правому краю) */
.tarif-tech-badges-inline {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Запрещаем плашке сжиматься, если заголовок длинный */
}

/* Новая аккуратная зеленая плашка */
.tech-static-badge.active {
    background: #28a745;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px; /* Делаем углы чуть мягче */
    text-transform: uppercase; /* Все буквы заглавные (FTTB, GPON) */
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.15);
}

/* Адаптивность для мобилок: если экран совсем маленький, плашка аккуратно прыгнет под заголовок */
@media (max-width: 575px) {
    .single-tarif-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Общий контейнер блока характеристик */
.tarif-package-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 25px;
    width: 100%;
}

/* Первый ряд (Интернет + ТВ) */
.features-main-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.features-main-row .feature-card-mini {
    flex: 1; /* Делит строку поровну 50/50 */
}

/* Общий стиль мини-карточек */
.feature-card-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Иконки */
.feature-mini-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Текстовый контейнер */
.feature-mini-info {
    display: flex;
    flex-direction: column;
}

.feature-mini-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 2px;
}

.feature-mini-value {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
}

/* Второй ряд (Мобильная связь) */
.features-mobile-row {
    width: 100%;
}

.feature-card-mini.full-width {
    width: 100%;
}

/* Флекс для мобильной строки, чтобы распределить текст */
.feature-mini-info.mobile-info-flex {
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.mobile-values-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-val-item {
    font-size: 15px;
    color: #212529;
}

.mobile-val-divider {
    color: #dee2e6;
    font-weight: bold;
}

/* Адаптивность под мобильные телефоны */
@media (max-width: 575px) {
    .features-main-row {
        flex-direction: column;
        gap: 12px;
    }
    .feature-mini-info.mobile-info-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .mobile-values-group {
        margin-top: 2px;
    }
}

/* Адаптивность: на экранах планшетов и мобилок (меньше 768px) выстраиваем их обратно друг под друга */
@media (max-width: 767px) {
    .addon-cards-row {
        flex-direction: column;
        gap: 20px;
    }
}

/* Адаптивность для мобилок */
@media (max-width: 991px) {
    .tarif-main-layout {
        flex-direction: column;
    }
    .tarif-content-left {
        width: 100%;
        min-width: 100%;
    }
    .tarif-sidebar-right {
        width: 100%;
        position: static; /* Отключаем прилипание на мобильных */
    }
}