/* Variant picker – follows the single product section: light grey 1px lines, black for
   the active state, uppercase labels. Fonts and sizes inherit from the theme. */

.m1881w-vp {
    --m1881w-swatch: 72px;
    --m1881w-gap: 10px;
    --m1881w-border: #dcdcdc;
    --m1881w-border-active: #000;
    --m1881w-swatch-bg: #fff;
    margin: 0 0 28px;
}

.m1881w-vp__attr + .m1881w-vp__attr {
    margin-top: 22px;
}

.m1881w-vp__label {
    margin: 0 0 10px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.875em;
}

.m1881w-vp__value {
    text-transform: none;
    letter-spacing: 0;
    color: #8a8178; /* the brand-name taupe above the product title */
}

.m1881w-vp__value:not(:empty)::before {
    content: ": ";
    color: #222;
}

/* -- squares -------------------------------------------------------------- */

.m1881w-vp .m1881w-vp__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--m1881w-gap);
}

.m1881w-vp .m1881w-vp__swatch {
    position: relative;
    box-sizing: border-box;
    width: var(--m1881w-swatch);
    height: var(--m1881w-swatch);
    margin: 0;
    padding: 4px;
    border: 1px solid var(--m1881w-border);
    border-radius: 0;
    background: var(--m1881w-swatch-bg);
    color: #222;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.m1881w-vp .m1881w-vp__swatch:hover,
.m1881w-vp .m1881w-vp__swatch:focus {
    background: var(--m1881w-swatch-bg);
    color: #222;
    border-color: #999;
}

.m1881w-vp .m1881w-vp__swatch:focus-visible {
    outline: 1px solid var(--m1881w-border-active);
    outline-offset: 2px;
}

.m1881w-vp .m1881w-vp__swatch.is-selected {
    border-color: var(--m1881w-border-active);
    box-shadow: inset 0 0 0 1px var(--m1881w-border-active);
}

.m1881w-vp__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.m1881w-vp .m1881w-vp__swatch--text {
    padding: 4px 6px;
}

.m1881w-vp__text {
    font-size: 0.75em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    word-break: break-word;
}

/* Value not available with the current choice of the other attribute: still clickable
   (it resets the other attribute), but visibly struck through. */
.m1881w-vp .m1881w-vp__swatch.is-unavailable {
    opacity: 0.4;
}

.m1881w-vp .m1881w-vp__swatch.is-unavailable::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    top: 50%;
    border-top: 1px solid #222;
    transform: rotate(-45deg);
}

/* -- dropdown: same box as the quantity field ----------------------------------- */

.m1881w-vp__select-wrap {
    position: relative;
}

.m1881w-vp__select-wrap::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -7px;
    border-right: 1px solid #222;
    border-bottom: 1px solid #222;
    transform: rotate(45deg);
    pointer-events: none;
}

.m1881w-vp .m1881w-vp__select {
    box-sizing: border-box;
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0 48px 0 18px;
    border: 1px solid #cfcfcf;
    border-radius: 0;
    background: #fff;
    color: #222;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.m1881w-vp .m1881w-vp__select:focus {
    outline: none;
    border-color: #000;
}

/* -- the WooCommerce form this widget controls ------------------------------- */

form.variations_form.m1881w-vp-bound table.variations {
    display: none;
}

/* The description is shown in the element set as "Variation description target" instead. */
form.variations_form.m1881w-vp-desc-moved .woocommerce-variation-description {
    display: none;
}

.m1881w-vp__form {
    margin-top: 28px;
}

.m1881w-notice {
    padding: 12px 16px;
    border: 1px dashed #bbb;
    color: #666;
    font-size: 13px;
}
