.p2o-configurator{clear:both;margin:24px 0;padding:20px;border:1px solid #e0e4ea;border-radius:12px;max-width:100%;box-sizing:border-box}
.p2o-configurator h3{margin:0 0 8px}.p2o-garment-group{border-top:1px solid #e6e9ed;margin-top:22px;padding-top:18px}.p2o-garment-group h4{margin:0 0 14px}
.p2o-master{padding:16px;background:#f6f8fa;border-radius:10px;margin-bottom:14px}.p2o-master-hint{font-size:13px;margin:0 0 12px!important;color:#526071}
.p2o-choice{border:0;margin:12px 0;padding:0;min-width:0}.p2o-choice legend{font-size:14px;font-weight:600;margin-bottom:8px}.p2o-choice-items{display:flex;flex-wrap:wrap;gap:8px}
.p2o-choice-label{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:5px;border:1px solid #cbd2db;border-radius:8px;font-size:13px;line-height:1.4;background:#fff;min-height:36px;min-width:36px;box-sizing:border-box}
.p2o-choice-label input{position:absolute;opacity:0;width:1px;height:1px}.p2o-choice-label:has(input:checked){border-color:#173a68;box-shadow:0 0 0 2px #173a68 inset;background:#f2f6fc}
.p2o-choice-label:has(input:focus-visible){outline:3px solid #3579b7;outline-offset:2px}.p2o-swatch{display:inline-block;width:26px;height:26px;border:1px solid #aab2be;border-radius:5px;background:var(--p2o-colour)}
.p2o-selected-colour{font-size:13px;margin:8px 0 0!important}.p2o-toggle-label{display:flex;gap:8px;align-items:center;cursor:pointer;font-size:14px;margin:14px 0}.p2o-toggle-label input{width:17px;height:17px;flex-shrink:0}
.p2o-individuals[hidden]{display:none!important}.p2o-individual{border:1px solid #e5e7eb;border-radius:8px;padding:14px;margin:10px 0}.p2o-compact .p2o-choice-label{padding:5px 8px;gap:5px}.p2o-compact .p2o-swatch{width:16px;height:16px}.p2o-compact .p2o-choice-items{gap:5px}.p2o-compact .p2o-option-text{font-size:12px}
@media(min-width:800px){.p2o-individuals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.p2o-individual{margin:0}}@media(max-width:480px){.p2o-configurator{padding:12px}.p2o-master{padding:12px}.p2o-choice-items{gap:6px}}

/* v1.0.4: The configurator must occupy its own row inside the cart form.
   Use a vertical form flow to avoid theme/Elementor flex and grid columns. */
body.single-product form.cart:has(> .p2o-configurator) {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  float: none !important;
}
body.single-product form.cart > .p2o-configurator {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  float: none !important;
  clear: both !important;
  flex: none !important;
  grid-column: 1 / -1 !important;
  margin: 0 0 18px !important;
  box-sizing: border-box !important;
}
body.single-product form.cart:has(> .p2o-configurator) > .quantity,
body.single-product form.cart:has(> .p2o-configurator) > .single_add_to_cart_button {
  float: none !important;
  position: static !important;
  vertical-align: middle !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
body.single-product form.cart:has(> .p2o-configurator) > .quantity {display:inline-flex !important;margin-right:12px !important;}
body.single-product form.cart:has(> .p2o-configurator) > .single_add_to_cart_button {display:inline-flex !important;}
/* Nested theme layouts: ensure configurator cannot share a grid column with the button. */
body.single-product form.cart .p2o-configurator {width:100% !important;max-width:100% !important;min-width:0 !important;box-sizing:border-box !important;}
.p2o-reset-note{font-size:12px;color:#586476;margin:-8px 0 14px 26px!important;line-height:1.5}
.p2o-garment-group .p2o-toggle-label{margin-top:12px}


/* v1.0.5 compact presentation, scoped to workwear bundle elements. */
.p2o-configurator{padding:16px!important;border-radius:12px;margin-top:12px!important}
.p2o-configurator h3{margin:0 0 4px!important;line-height:1.25!important}
.p2o-configurator > p{margin:0 0 12px!important;line-height:1.5!important}
.p2o-garment-group{margin-top:12px!important;padding-top:12px!important}
.p2o-garment-group h4{margin:0 0 8px!important;line-height:1.3!important}
.p2o-master{padding:12px!important;margin-bottom:8px!important}
.p2o-choice{margin:5px 0 10px!important}
.p2o-choice legend{margin:0 0 5px!important;padding:0!important;line-height:1.4!important}
.p2o-choice-items{gap:6px!important}
.p2o-selected-colour{margin:5px 0 0!important;line-height:1.4!important}
.p2o-garment-group .p2o-toggle-label{margin:9px 0 6px!important}
.p2o-reset-note{margin:0 0 10px 26px!important}
@media(max-width:480px){.p2o-configurator{padding:12px!important}.p2o-master{padding:10px!important}}
/* v1.0.8: compact quantity allocation; underlying required inputs remain for WooCommerce validation. */
.p2o-submit-fields{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;pointer-events:none!important}
.p2o-group-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.p2o-group-heading h4{margin:0!important}.p2o-progress{font-size:12px;font-weight:600;background:#edf1f5;color:#36445a;border-radius:12px;padding:4px 10px}
.p2o-progress-complete{background:#e5f5ec;color:#17613d}
.p2o-mix-help{font-size:13px;margin:5px 0 10px!important}.p2o-mix-row{border:1px solid #e0e5eb;border-radius:9px;padding:12px;margin:8px 0;background:#fafbfc}
.p2o-mix-row-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.p2o-remove-row{border:0;background:none;color:#9b3344;cursor:pointer;font-size:12px}
.p2o-mix-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 85px;gap:10px;align-items:end}
.p2o-mix-fields label{font-size:12px;display:flex;flex-direction:column;gap:4px;margin:0}.p2o-mix-fields select,.p2o-mix-fields input{width:100%;max-width:100%;min-width:0;min-height:38px;padding:6px;border:1px solid #cbd2db;border-radius:6px;background:#fff;font-size:13px}
.p2o-add-row{margin:8px 0!important}.p2o-mix-status{font-size:13px;margin:8px 0!important}
@media(max-width:480px){.p2o-mix-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.p2o-mix-fields label:last-child{grid-column:1/-1;max-width:110px}}

/* v1.0.9: submission-only inputs must never be rendered as a second configurator. */
.p2o-configurator .p2o-submit-fields,.p2o-configurator .p2o-submit-fields[hidden]{display:none!important}

/* v1.0.12: swatches and size buttons for mixed allocations, matching main choices. */
.p2o-mix-fields{display:flex;flex-direction:column;align-items:stretch;gap:6px}
.p2o-mix-fields .p2o-mix-choice{width:100%;min-width:0;margin:4px 0!important;padding:0;border:0}
.p2o-mix-fields .p2o-mix-choice legend{font-size:13px;font-weight:600;margin-bottom:6px}
.p2o-mix-fields .p2o-choice-items{display:flex;flex-wrap:wrap;gap:6px}
.p2o-mix-fields .p2o-mix-choice .p2o-choice-label{display:inline-flex;flex-direction:row;width:auto;min-width:36px;min-height:36px;padding:5px;cursor:pointer}
.p2o-mix-fields .p2o-mix-choice .p2o-swatch{width:26px;height:26px}
.p2o-mix-fields .p2o-mix-choice .p2o-option-text{font-size:13px}
.p2o-mix-fields .p2o-selected-colour{font-size:12px;margin:6px 0 0!important}
.p2o-mix-fields > label:last-child{display:flex;flex-direction:column;gap:4px;max-width:110px;font-size:12px}
.p2o-mix-fields .p2o-mix-qty{width:100%;min-height:38px;box-sizing:border-box}
@media(max-width:480px){.p2o-mix-fields{display:flex}.p2o-mix-fields > label:last-child{max-width:110px}}

/* v1.0.13: Full-width, horizontal mixed-selection rows. No behaviour changes. */
.p2o-configurator .p2o-individuals:not([hidden]){display:block!important;width:100%;min-width:0}
.p2o-configurator .p2o-mix-help{display:block;width:100%}
.p2o-configurator .p2o-mix-rows{display:block;width:100%;min-width:0}
.p2o-configurator .p2o-mix-row{display:block;width:100%;max-width:100%;box-sizing:border-box}
.p2o-configurator .p2o-mix-fields{display:grid!important;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr) 78px;align-items:start;gap:14px}
.p2o-configurator .p2o-mix-fields .p2o-mix-choice{min-width:0;width:100%;margin:0!important}
.p2o-configurator .p2o-mix-fields .p2o-mix-choice .p2o-choice-items{gap:5px!important}
.p2o-configurator .p2o-mix-fields .p2o-mix-choice .p2o-choice-label{min-width:32px;min-height:32px;padding:3px}
.p2o-configurator .p2o-mix-fields .p2o-mix-choice .p2o-swatch{width:24px;height:24px}
.p2o-configurator .p2o-mix-fields > label:last-child{width:78px;max-width:78px;min-width:0;grid-column:auto}
.p2o-configurator .p2o-mix-fields .p2o-mix-qty{width:100%;min-width:0}
@media(max-width:700px){
 .p2o-configurator .p2o-mix-fields{grid-template-columns:minmax(0,1fr)!important;gap:10px}
 .p2o-configurator .p2o-mix-fields > label:last-child{grid-column:1;max-width:100px;width:100px}
}

/* v1.0.14: Ensure the quantity field is an editable native input in the horizontal grid.
   Previous broad input selectors also affected the hidden swatch radio buttons. */
.p2o-configurator .p2o-mix-fields .p2o-choice-label input[type="radio"]{
  position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;
  padding:0!important;margin:0!important;opacity:0!important;pointer-events:none!important;
}
.p2o-configurator .p2o-mix-fields > label:has(> input.p2o-mix-qty){
  position:relative;display:flex!important;flex-direction:column!important;align-items:stretch!important;
  pointer-events:auto!important;z-index:2;
}
.p2o-configurator .p2o-mix-fields input.p2o-mix-qty[type="number"]{
  position:relative!important;display:block!important;opacity:1!important;visibility:visible!important;
  pointer-events:auto!important;cursor:text!important;user-select:text!important;
  width:100%!important;min-width:0!important;min-height:38px!important;height:38px!important;
  padding:6px!important;box-sizing:border-box!important;
}
/* Mix & Match hat mode — does not affect fixed bundle selectors. */
.p2o-hat-builder .p2o-hat-row{padding:14px;margin:12px 0;border:1px solid #ddd;border-radius:8px;box-sizing:border-box}
.p2o-hat-builder .p2o-hat-row-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.p2o-hat-builder .p2o-hat-fields{display:grid;grid-template-columns:minmax(130px,1fr) minmax(0,2.5fr) 85px;gap:14px;align-items:start}
.p2o-hat-builder .p2o-hat-style,.p2o-hat-builder .p2o-hat-quantity{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}
.p2o-hat-builder .p2o-hat-style select,.p2o-hat-builder .p2o-hat-quantity input{width:100%;min-height:38px;box-sizing:border-box}
.p2o-hat-builder .p2o-hat-colours{padding:0;margin:0;border:0;min-width:0}
.p2o-hat-builder .p2o-hat-colours legend{font-size:13px;font-weight:600;margin-bottom:7px}
.p2o-hat-builder .p2o-hat-swatches{display:flex;flex-wrap:wrap;gap:5px}
.p2o-hat-builder .p2o-hat-swatch{position:relative;display:inline-flex;padding:3px;border:1px solid #bbb;border-radius:5px;cursor:pointer}
.p2o-hat-builder .p2o-hat-swatch:has(input:checked){outline:2px solid #2271b1;outline-offset:1px}
.p2o-hat-builder .p2o-hat-swatch input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none!important}
.p2o-hat-builder .p2o-hat-swatch span{display:block;width:24px;height:24px;border:1px solid #ddd;border-radius:3px}
.p2o-hat-builder .p2o-hat-colours small{display:block;margin-top:7px}
.p2o-hat-builder .p2o-hat-summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;margin-top:16px;padding:14px;background:#f5f5f5;border-radius:8px}
.p2o-hat-builder .p2o-hat-message{font-size:13px}
@media(max-width:700px){.p2o-hat-builder .p2o-hat-fields{grid-template-columns:1fr}.p2o-hat-builder .p2o-hat-quantity{max-width:110px}}

/* Customer-facing quantity discount table */
.p2o-hat-builder .p2o-hat-tiers{margin:15px 0 20px;max-width:520px}
.p2o-hat-builder .p2o-hat-tiers h4{margin:0 0 9px;font-size:17px}
.p2o-hat-builder .p2o-hat-tiers table{width:100%;border-collapse:collapse;font-size:14px}
.p2o-hat-builder .p2o-hat-tiers th,.p2o-hat-builder .p2o-hat-tiers td{padding:8px 12px;text-align:left;border:1px solid #e1e1e1}
.p2o-hat-builder .p2o-hat-tiers thead{background:#f3f5f7}
.p2o-hat-builder .p2o-hat-tiers-note{font-size:13px;margin:9px 0 0}

/* v1.1.2: make the tier savings prominent without altering the configurator layout */
.p2o-hat-builder .p2o-hat-tiers{max-width:none;background:#fff;border:1px solid #b9ddf3;border-radius:12px;padding:17px 18px;box-shadow:0 2px 8px rgba(18,67,105,.04)}
.p2o-hat-builder .p2o-hat-tiers-heading{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.p2o-hat-builder .p2o-hat-tiers-icon{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:8px;background:#e4f4ff;color:#168fc5;font-weight:800;font-size:21px}
.p2o-hat-builder .p2o-hat-tiers-heading h4{font-size:19px;font-weight:700;margin:0 0 2px;color:#182c43}
.p2o-hat-builder .p2o-hat-tiers-heading p{margin:0;font-size:13px;color:#536478}
.p2o-hat-builder .p2o-hat-tiers table{border-collapse:separate;border-spacing:0;width:100%;font-size:14px}
.p2o-hat-builder .p2o-hat-tiers th{background:#eef7fd;color:#173d5c;font-weight:700}
.p2o-hat-builder .p2o-hat-tiers td,.p2o-hat-builder .p2o-hat-tiers th{padding:10px 12px;border:0;border-bottom:1px solid #e4edf3}
.p2o-hat-builder .p2o-hat-tiers .p2o-hat-tier-price{font-weight:700;color:#172c42;white-space:nowrap}
.p2o-hat-builder .p2o-hat-tiers .p2o-hat-tier-saving{color:#16845b;font-weight:600;white-space:nowrap}
.p2o-hat-builder .p2o-hat-tiers tr.p2o-hat-tier-active td{background:#eaf6ff}
.p2o-hat-builder .p2o-hat-tiers-note{margin:13px 0 0;color:#286b51;font-size:13px}
.p2o-hat-builder .p2o-hat-next-tier{margin:10px 0 0;font-size:13px;font-weight:600;color:#176a9b}
.p2o-hat-builder .p2o-hat-next-tier:empty{display:none}
@media(max-width:480px){.p2o-hat-builder .p2o-hat-tiers{padding:13px 11px}.p2o-hat-builder .p2o-hat-tiers td,.p2o-hat-builder .p2o-hat-tiers th{padding:8px 6px;font-size:12px}}

.p2o-logo-setup{margin:18px 0;padding:16px 18px;background:#fff;border:1px solid #b9ddf3;border-radius:10px}.p2o-logo-setup h4{margin:0 0 9px}.p2o-logo-setup label{display:flex;align-items:center;gap:9px;font-weight:600}.p2o-logo-setup-note{margin:9px 0 0;color:#555;font-size:.9em}.p2o-logo-setup-live{margin:8px 0 0;color:#16774d;font-weight:600}.p2o-logo-setup-live:empty{display:none}
