/**
 * WIZ v2: Variant Switcher styles.
 *
 * BEM scope: .wiz-vs (block) → __group / __label / __options / __option / __swatch (elements)
 *            with --horizontal / --vertical / --image / --text / --color / --chip / --selected modifiers.
 *
 * No inline styles in markup — swatch colour is passed as the CSS variable
 * --wiz-vs-swatch-color so the rule lives entirely in this file.
 */

.wiz-vs {
    /* Block root — no defaults; controlled by Elementor wrapper. */
}

.elementor-widget.elementor-widget-wiz_v2_variant_switcher:not(:has(.wiz-vs)) {
    display: none !important;
}

.wiz-vs__group {
    /* margin-bottom set by widget_spacing control */
}

.wiz-vs__label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.wiz-vs__options {
    gap: 12px;
    justify-content: start;
    max-height: 440px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.wiz-vs__options--image {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.wiz-vs__options--text {
    display: flex;
    flex-wrap: wrap;
}

.wiz-vs__options--color {
    display: flex;
    flex-wrap: wrap;
}

.wiz-vs__option {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: #f7f7f7;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e1e1e1;
}

.wiz-vs__option--selected {
    border-color: var(--primary);
    background: #eaf6ff;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
}

/* Active text-only chip */
.wiz-vs__option--chip.wiz-vs__option--selected {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
}

.wiz-vs__option:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Image-label card */
.wiz-vs__option--image {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 8px;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    overflow: hidden;
    transition: all 0.2s ease;
}

.wiz-vs__option--image img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    border-radius: 10px;
    border: none;
    margin-bottom: 8px;
    margin-right: 0;
}

.wiz-vs__option--image span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    margin-top: 0;
    min-width: 0;
}

.wiz-vs__option--image.wiz-vs__option--selected {
    background: #eaf6ff;
    color: #333333;
    border-color: var(--primary);
}

.wiz-vs__option--chip {
    background: #e9e9e9;
}

/* Color hinge — square container with inner circle (mirrors React VariantHinge) */
.wiz-vs__option--color {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #D1D6DD;
    cursor: pointer;
}

.wiz-vs__option--color.wiz-vs__option--selected {
    border: 2px solid #25282D;
    box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.08);
    background: transparent;
}

.wiz-vs__option--color:hover {
    border-color: #25282D;
}

.wiz-vs__swatch {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
    background-color: var(--wiz-vs-swatch-color, #E5E7EB);
}

/* Group orientation */
.wiz-vs__group--horizontal .wiz-vs__option {
    flex-direction: row;
}

.wiz-vs__group--vertical .wiz-vs__option {
    flex-direction: column;
    align-items: flex-start;
}

.wiz-vs__group--vertical .wiz-vs__option img {
    margin-bottom: 4px;
    margin-right: 0;
}

.wiz-vs__group--vertical .wiz-vs__option--image {
    align-items: center;
    text-align: center;
}

.wiz-vs__group--vertical .wiz-vs__option--image span {
    width: 100%;
    display: block;
    text-align: center;
}
