/*
 * Swatches structure: the layout every picker needs. It loads even when the
 * Swatches stylesheet setting is off (spec 7.4).
 */
/* Contains the floated swatches without clipping the focus ring (spec 7.3). */
.swatch-control {
    display: flow-root;
}

.swatch-control select {
	display: none !important;
}

.swatch-control .select2-container {
    display:none !important;
}

.swatch-control.radio-select ul {
	padding:1px !important;
	margin:0 !important;
	list-style: none !important;
}

.swatch-control.radio-select li {
	list-style: none !important;
}

.swatch-control.radio-select li label {
	display:inline;
	margin-left:10px;
}

.swatch-wrapper {
    float:left;
    margin:0 5px 5px 0;
}

.swatch-wrapper a {
    display:block;
}

/* A swatch's anchor is not a link (spec 7.3); it keeps the link cursor. */
.swatch-wrapper .swatch-anchor {
    cursor: pointer;
}

/* Hide unavailable options (spec 8.2). A selected one and one that stays clickable stay. */
.swatch-control[data-unavailable="hide"] .swatch-wrapper.disabled:not(.selected):not(.out-of-stock),
.swatch-control.radio-select[data-unavailable="hide"] li.disabled:not(.out-of-stock) {
    display: none;
}

/*
 * Remaining stock (spec 8.3): the count sits under its swatch, in space the
 * picker keeps below its swatches while one of them shows a count.
 */
.swatch-has-stock-left .swatch-wrapper {
    margin-bottom: 22px;
}

.swatch-wrapper.swatch-low-stock {
    position: relative;
}

.swatch-wrapper .swatch-stock-left {
    position: absolute;
    left: 50%;
    top: calc(100% + 4px);
    transform: translateX(-50%);
    z-index: 1;
    white-space: nowrap;
    pointer-events: none;
}

.radio-select .swatch-stock-left {
    margin-left: 0.5em;
}

/* The keyboard focus ring (spec 7.3): dark outside, light inside, so it shows on any background. */
.swatch-wrapper:focus-visible {
    outline: 2px solid #1e1e1e;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #fff;
}

/* Grouped terms: each group's label above its swatches. */
.swatch-groups-horizontal {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 16px;
}

.swatch-group-label {
    margin-bottom: 4px;
}

.swatch-group-items {
    display: flow-root;
}

div.swatch-label {
	margin-bottom: 8px;
    clear:left;
}

/* Display limit (spec 9). Themes give swatches a display that would beat [hidden]. */
.swatch-control .swatch-over-limit[hidden] {
    display: none !important;
}

/*
 * The "+N" control sits on the swatch row, after the last visible swatch, and
 * wraps with the swatches (#153): the picker and its swatches join the line
 * the control is on. Grouped pickers keep their group layout.
 */
.swatch-control:has(> .swatch-wrapper):has(+ .swatch-more) {
    display: inline;
}

.swatch-control:has(> .swatch-wrapper):has(+ .swatch-more) > .swatch-wrapper {
    float: none;
    display: inline-block;
    vertical-align: middle;
}

.swatch-control + .swatch-more {
    vertical-align: middle;
}
