/* bs-configurator: стили конфигуратора стола. Обычный CSS вне @layer — перебивает утилиты темы. */

/* Нативные контролы услуг остаются в DOM (источник истины), но не показываются */
.bs-native-hidden {
    display: none !important;
}

/* Значения характеристик, недопустимые для выбранной пары «дисциплина + размер» */
.bs-is-hidden {
    display: none !important;
}

/* Зависимая пара дисциплина/размер: зачёркнуто (.btn-cross из темы), не кликабельно.
   pointer-events: none гасит и hover-эффекты темы (рамка, фон, scale), курсор остаётся стрелкой */
.bs-is-unavailable {
    pointer-events: none !important;
    opacity: 0.85;
}

/* Не мигаем нативной разметкой услуг до готовности модуля; failsafe снимает bs-js через 3 с */
.bs-js .js-product-services:not(.bs-ready) {
    visibility: hidden;
}

.bs-option[disabled] {
    cursor: not-allowed;
}

.bs-service__value {
    opacity: 0.75;
}

/* ------------------------------------------------------------------ *
 * Образцы вариантов услуг (цвет / картинка). Стили заданы блоком админки
 * «service-swatches»; размер — переменная --bs-sw (px) на кнопке.
 * ------------------------------------------------------------------ */
.bs-swatch {
    --bs-sw: 36px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1.2;
    color: inherit;
}

.bs-swatch__chip {
    display: block;
    width: var(--bs-sw);
    height: var(--bs-sw);
    overflow: hidden;
    border-radius: var(--theme-radius, 6px);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.18);
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: outline-color .15s ease, transform .15s ease;
}

.bs-swatch--round .bs-swatch__chip {
    border-radius: 50%;
}

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

.bs-swatch:hover .bs-swatch__chip {
    transform: scale(1.06);
}

/* Выбранный образец — рамка цвета темы */
.bs-swatch.bs-is-selected .bs-swatch__chip {
    outline-color: var(--color-theme-500, #2563eb);
}

.bs-swatch__cap {
    max-width: calc(var(--bs-sw) + 24px);
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
    color: var(--color-neutral-600, #525252);
}

/* Подсказка с названием — для label=tooltip */
.bs-swatch--label-tooltip[data-bs-tip]::after {
    content: attr(data-bs-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 6px;
    background: rgb(23 23 23 / 0.92);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 30;
    transition: opacity .12s ease;
}

.bs-swatch--label-tooltip[data-bs-tip]:hover::after,
.bs-swatch--label-tooltip[data-bs-tip]:focus-visible::after {
    opacity: 1;
}

.bs-swatch[disabled] {
    cursor: not-allowed;
}

/* ------------------------------------------------------------------ *
 * Смена снимка галереи по услуге: dissolve вместо штатной прокрутки
 * Swiper (в бандле темы нет модулей эффектов). Наложение — картинка
 * поверх слайдера; появляется/исчезает изменением opacity, сама
 * перестановка слайдера в этот момент мгновенна и скрыта под ней.
 * Длительность перехода — держать равной CONFIG.galleryFadeMs в JS.
 * ------------------------------------------------------------------ */
.product-images__main {
    position: relative;
}

.bs-gallery-fade {
    position: absolute;
    inset: 0;
    z-index: 20;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
