/* Keep the native selects in the DOM (WooCommerce JS binds to them) but hide
   them visually. Accessibility lives on the radios, not the select. */
.variations_form .variations .value select {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
}

/* Radio input: visually hidden but focusable + announced. The visible control
   is the <label>; style it in the design pass. */
.lid-variation-radio input[type="radio"] {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
}

/* Hooks only — intentionally unstyled until the design pass. */
.lid-variation-radio { cursor: pointer; }
.lid-variation-radio.disabled { pointer-events: none; }

.woocommerce.product-template-default div.product form.cart .variations  label {
    color: var(--contrast);
    font-size: 18px;
    font-weight: 500;
    text-align: left;

}

.lid-variation-radios {
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    overflow: hidden;
    position: relative;
    transition: .2s;
    margin-bottom:5px;
}

.woocommerce.product-template-default div.product form.cart .variations .lid-variation-radios label {
    color: var(--contrast);
    font-size: 14px;
    font-weight: 400;
}

.woocommerce div.product form.cart .variations tr{
    display: flex;
    flex-direction: column;
}

.woocommerce.product-template-default div.product form.cart .variations td, .woocommerce.product-template-default div.product form.cart .variations th {
    border: 0;
    line-height: 1em;
    text-align: left;
    padding: 0;
    margin-bottom: .5em;
}

.woocommerce.product-template-default div.product form.cart .variations .lid-variation-radios label {
    background-color: var(--base);
    color: var(--contrast);
    font-size: 14px;
    font-weight: 400;
    border: 1px solid #ccc;
    cursor: pointer;
    display: inline-block;
    overflow: hidden;
    padding: 5px 15px;
    position: relative;
    transition: .2s;
}

.woocommerce.product-template-default div.product form.cart .variations .lid-variation-radios label.selected{
    border: 1px solid var(--accent);
}

.woocommerce.product-template-default div.product form.cart .variations .lid-variation-radios label.selected:before {
    border: 16px solid transparent;
    border-bottom: 16px solid var(--accent);
    bottom: -1px;
    content: "";
    inset-inline-end: -16px;
    position: absolute;
}

.woocommerce.product-template-default div.product form.cart .variations .lid-variation-radios label.selected:after {
    content: '';
    position: absolute;
    bottom: -3px;
    inset-inline-end: -4px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 9.5L3 7l-1.5 1.5L5.5 12 14 3.5 12.5 2l-7 7.5z'/%3E%3C/svg%3E");
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
}