.opo-options{margin-block:1rem;clear:both;max-width:100%}
.opo-options .opo-fields{display:flex;flex-wrap:wrap;gap:1rem;min-width:0}
.opo-options .opo-field{box-sizing:border-box;flex:0 1 calc(var(--opo-field-width,100%) - var(--opo-field-gap,0rem));min-width:0;border:0;padding:0;margin:0 0 .5rem}
.opo-options legend{font-weight:600;padding:0;margin-bottom:.5rem;max-width:100%}
.opo-options abbr[title]{border:0;text-decoration:none;color:inherit}
.opo-options .opo-choice,.opo-options .opo-boolean{display:flex;gap:.75rem;align-items:center;cursor:pointer;margin:0}
.opo-options .opo-choices{display:flex;flex-wrap:wrap;gap:.5rem}
.opo-options .opo-choice{box-sizing:border-box;border:1px solid #767676;padding:.75rem;min-height:44px;flex:1 1 12rem}
.opo-options:not([data-legacy="1"]) .opo-choice{border-radius:2px}
.opo-options .opo-choice:has(input:checked){outline:2px solid currentColor;outline-offset:-2px}
.opo-options .opo-choice.is-disabled{opacity:.55;cursor:not-allowed}
.opo-options .opo-choice small{display:block}
.opo-options .opo-choice img{width:5rem;height:5rem;object-fit:contain}
.opo-options input[type=checkbox],.opo-options input[type=radio]{flex:none;margin:0;width:1.1rem;height:1.1rem}
.opo-options .opo-color-swatch{display:inline-block;border:1px solid #767676;border-radius:2px;flex:none;width:2rem;height:2rem}
.opo-options input:not([type=radio]):not([type=checkbox]),.opo-options select,.opo-options textarea{width:100%;max-width:100%;box-sizing:border-box;min-height:44px}
.opo-options input[type=color]{max-width:6rem}
.opo-options :is(input,select,textarea,button):focus-visible{outline:3px solid currentColor;outline-offset:3px}
.opo-options [hidden]{display:none!important}
.opo-options .opo-description{font-size:.9em;margin-top:.5rem}
.opo-options .opo-static-image{max-width:100%;height:auto}
.opo-options .opo-section{width:100%;display:flex;flex-wrap:wrap;gap:1rem;min-width:0}
.opo-options .opo-section-title{width:100%;font-weight:600;margin:0}
.opo-options .opo-summary{border-top:1px solid #767676;margin-top:1rem;padding-top:1rem}
.opo-options .opo-estimate{font-weight:600;margin:0 0 .5rem}
.opo-options .opo-quote-error{margin:0 0 .5rem}
.opo-options .opo-row{border:1px solid #767676;padding:clamp(.375rem,4%,1rem);margin-bottom:1rem}
.opo-options .opo-row-title{font-weight:600;margin:0 0 .75rem}
.opo-options .opo-row .opo-remove-row{margin-top:.5rem}
.opo-options .opo-repeater>.opo-add-row{margin-top:.25rem}
.opo-options output{display:block;min-height:2rem;padding:.5rem;border:1px solid #767676}
@media(max-width:600px){.opo-options .opo-field{flex-basis:100%}.opo-options .opo-choice{flex-basis:100%}.opo-options .opo-choice img{width:4rem;height:4rem}}

.opo-options :is(.opo-type-image,.opo-type-multi_image) .opo-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:.75rem}
.opo-options :is(.opo-type-image,.opo-type-multi_image) .opo-choice{display:grid;grid-template-columns:1.1rem minmax(0,1fr);align-content:start;align-items:start;gap:.75rem;padding:.75rem;min-width:0}
.opo-options :is(.opo-type-image,.opo-type-multi_image) .opo-choice img{grid-column:1 / -1;grid-row:1;width:100%;height:7rem;object-fit:contain}
.opo-options :is(.opo-type-image,.opo-type-multi_image) .opo-choice input{grid-column:1;grid-row:2;margin-top:.15em}
.opo-options :is(.opo-type-image,.opo-type-multi_image) .opo-choice>span{grid-column:2;grid-row:2;min-width:0;overflow-wrap:break-word}

.opo-options .opo-upload-files{list-style:none;margin:1rem 0;padding:0}
.opo-options .opo-upload-files li{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;padding:.75rem 0;border-bottom:1px solid #ddd}
.opo-options .opo-upload-files li>a,.opo-options .opo-upload-files li>span{flex:1;min-width:0;overflow-wrap:anywhere}
.opo-options .opo-upload-files small{white-space:nowrap}
.opo-options .opo-upload-files button{min-height:44px}
.opo-options .opo-upload-progress{display:block;width:100%;height:1rem;margin-block:.75rem}
.opo-options .opo-upload-status{margin:.75rem 0}
.opo-file-confirm{box-sizing:border-box;width:420px;max-width:calc(100vw - 32px);border:1px solid #767676;padding:1.5rem;background:#fff;color:#1d2327}
.opo-file-confirm::backdrop{background:#0006}
.opo-file-confirm h2{font-size:1.25rem;margin:0 0 .75rem}
.opo-file-confirm-actions{display:flex;justify-content:flex-end;gap:.75rem;margin-top:1.5rem}
.opo-file-confirm-actions button{min-height:44px;padding:.5rem 1rem}

.opo-options :is(.opo-add-row,.opo-remove-row,.opo-sync-rows,.opo-upload-remove,.opo-upload-dismiss){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-height:44px;min-width:44px;padding:.5rem .75rem;font:inherit;line-height:1.25;text-align:center;white-space:normal;overflow-wrap:anywhere}
.opo-options input[type=file]{min-width:0;font:inherit;line-height:1.4}
.opo-options input[type=file]::file-selector-button{box-sizing:border-box;min-height:44px;max-width:100%;margin-inline-end:.5rem;padding:.375rem .5rem;font:inherit}

/* Keep option row controls in normal flow when WooCommerce floats cart buttons. */
form.cart .opo-options .opo-repeater button.button:is(.opo-add-row,.opo-remove-row,.opo-sync-rows){float:none;display:inline-flex}
form.cart .opo-options .opo-repeater>button.button:is(.opo-add-row,.opo-sync-rows){display:flex;width:fit-content;max-width:100%}
.opo-options .opo-row{display:flow-root}

/* Native product-form cart editing actions. */
.opo-cart-edit-actions{clear:both;margin-block:1rem;max-width:100%}
.opo-cart-edit-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;clear:both;max-width:100%}
form.cart .opo-cart-edit-row>:is(.quantity,.single_add_to_cart_button,.opo-cart-edit-cancel){float:none;margin:0;max-width:100%;min-height:44px}
form.cart .opo-cart-edit-row>.single_add_to_cart_button{white-space:normal}
form.cart .opo-cart-edit-row>.opo-cart-edit-cancel{display:inline-flex;align-items:center;justify-content:center;padding:.65em 1em;font:inherit;line-height:1.25}

/* Fit the edit form inside the theme's available product column. */
.woocommerce div.product form.cart:has(input[name="opo_cart_edit"]){min-width:0;max-width:100%;grid-template-columns:minmax(0,1fr);container:opo-cart-edit / inline-size}
.woocommerce div.product form.cart:has(input[name="opo_cart_edit"])>*{grid-column:1 / -1;min-width:0;max-width:100%}
.woocommerce div.product form.cart:has(input[name="opo_cart_edit"]) table.variations{width:100%;min-width:0;max-width:100%}
@container opo-cart-edit (max-width:300px){
 .woocommerce div.product form.cart:has(input[name="opo_cart_edit"]) table.variations :is(tbody,tr,th.label,td.value){display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding-inline:0}
 .woocommerce div.product form.cart:has(input[name="opo_cart_edit"]) table.variations th.label{padding-bottom:.5rem}
 .woocommerce div.product form.cart:has(input[name="opo_cart_edit"]) table.variations select{box-sizing:border-box;width:100%;min-width:0;max-width:100%}
}
