/* WonderBaby Size Selector — изолированные стили, в тему не выносятся. */

.wbss-native-select {
    display: none !important;
}

.wbss-attribute-group {
    margin: 0 0 16px;
}

.wbss-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wbss-attribute-group--size .wbss-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    line-height: 1.1;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    color: #191919;
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
}

.wbss-attribute-group--swatch .wbss-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #cfcfcf;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.wbss-attribute-group--swatch .wbss-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.wbss-btn:focus-visible {
    outline: 2px solid #366eff;
    outline-offset: 2px;
}

.wbss-btn--selected {
    border-color: #191919;
    background: #191919;
    color: #fff;
}

.wbss-attribute-group--swatch .wbss-btn--selected {
    border-color: #366eff;
    box-shadow: 0 0 0 2px #fff inset;
}

.wbss-btn--disabled,
.wbss-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
    color: #6c6c6c;
    background: #f2f2f2;
    text-decoration: line-through;
}

.wbss-attribute-group--swatch .wbss-btn--disabled {
    text-decoration: none;
}
.wbss-attribute-group--swatch .wbss-btn--disabled::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    height: 1px;
    background: #999;
    transform: rotate(-45deg);
}

.wbss-btn__hint {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    color: #f8604a;
}
.wbss-btn--selected .wbss-btn__hint {
    color: #ffd8d2;
}

.wbss-status {
    margin: 6px 0 0;
    font-size: 13px;
    color: #f8604a;
    min-height: 16px;
}

.wbss-size-chart-trigger {
    margin: 0 0 16px;
}
.wbss-size-chart-link {
    background: none;
    border: none;
    padding: 0;
    color: #366eff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}
.wbss-size-chart-link:focus-visible {
    outline: 2px solid #366eff;
    outline-offset: 2px;
}

/* Модальное окно таблицы размеров */
.wbss-modal[hidden] {
    display: none;
}
.wbss-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.wbss-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(25, 25, 25, 0.55);
}
.wbss-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow: auto;
    box-sizing: border-box;
}
.wbss-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #191919;
}
.wbss-modal__close:focus-visible {
    outline: 2px solid #366eff;
}
.wbss-modal__scroll {
    overflow-x: auto;
}
.wbss-chart-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 13px;
}
.wbss-chart-table th,
.wbss-chart-table td {
    border: 1px solid #e3e3e4;
    padding: 6px 8px;
    text-align: center;
}
.wbss-chart-recommendation,
.wbss-chart-shrink-warning {
    font-size: 13px;
    color: #6c6c6c;
    margin-top: 12px;
}

@media (max-width: 360px) {
    .wbss-attribute-group--size .wbss-btn {
        min-width: 40px;
        height: 40px;
        padding: 0 8px;
        font-size: 13px;
    }
}

.wbss-rows-table input[type="text"] {
    width: 100%;
}
