/* Ludorum 2.8.2 — opt-in page scope; no blanket centering or payment iframe edits. */
body.lsg-ui-polish { --lsg-ui-ink:#09213c; --lsg-ui-blue:#1458bd; --lsg-ui-line:#d8e3ef; }

/* The value and placeholder share the same baseline inside the field. */
html body.lsg-ui-polish .woocommerce form :is(input.input-text, input[type="email"], input[type="password"], input[type="tel"], input[type="text"], input[type="url"]):not(.qty):not(.lsg-quick-cart__value),
html body.lsg-ui-polish form.ludorum-suggestion-form :is(input[type="text"], input[type="email"], input[type="url"]) {
  box-sizing:border-box!important;
  width:100%; max-width:100%; min-width:0;
  height:48px!important; min-height:48px!important;
  padding:10px 14px!important;
  line-height:1.35!important; text-align:left!important; vertical-align:middle!important;
}
html body.lsg-ui-polish .woocommerce form :is(input.input-text, input[type="email"], input[type="password"], input[type="tel"], input[type="text"], input[type="url"])::placeholder,
html body.lsg-ui-polish form.ludorum-suggestion-form input::placeholder {
  line-height:normal!important; text-align:left!important; opacity:1;
}
html body.lsg-ui-polish .woocommerce form select,
html body.lsg-ui-polish form.ludorum-suggestion-form select {
  box-sizing:border-box!important; width:100%; max-width:100%; min-width:0;
  height:48px!important; min-height:48px!important;
  padding:8px 34px 8px 14px!important;
  line-height:normal!important; text-align:left!important; vertical-align:middle!important;
}
html body.lsg-ui-polish .woocommerce form textarea,
html body.lsg-ui-polish form.ludorum-suggestion-form textarea {
  box-sizing:border-box!important; width:100%; max-width:100%; min-width:0;
  height:auto!important; min-height:112px!important;
  padding:12px 14px!important; line-height:1.5!important; text-align:left!important;
}
html body.lsg-ui-polish .woocommerce .form-row { min-width:0; }
html body.lsg-ui-polish .woocommerce .form-row > :is(label,.woocommerce-input-wrapper) { max-width:100%; }

/* Existing password visibility controls keep their own click handling. */
html body.lsg-ui-polish .woocommerce form :is(.password-input,.ludorum-form-eye-wrap) { position:relative; }
html body.lsg-ui-polish .woocommerce form :is(.password-input,.ludorum-form-eye-wrap) > input:is([type="text"],[type="password"]) { padding-right:52px!important; }
html body.lsg-ui-polish .woocommerce form :is(.password-input,.ludorum-form-eye-wrap) > :is(.show-password-input,.ludorum-form-eye) {
  top:50%!important; right:2px!important; bottom:auto!important;
  transform:translateY(-50%)!important;
  width:44px!important; min-width:44px!important; height:44px!important;
  margin:0!important; padding:0!important; align-items:center; justify-content:center;
  line-height:1!important;
}

/* SelectWoo / Select2 is not a normal input: remove its default 28px baseline. */
html body.lsg-ui-polish .woocommerce .select2-container { max-width:100%; min-width:0; }
html body.lsg-ui-polish .woocommerce .select2-container .select2-selection--single {
  box-sizing:border-box!important; display:flex!important; align-items:center!important;
  min-height:48px!important; height:48px!important; padding:0 38px 0 14px!important;
  text-align:left!important;
}
html body.lsg-ui-polish .woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
  display:block!important; width:100%!important; min-width:0; padding:0!important; margin:0!important;
  line-height:24px!important; text-align:left!important;
}
html body.lsg-ui-polish .woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
  top:50%!important; right:9px!important; height:24px!important; margin:0!important;
  transform:translateY(-50%)!important;
}

/* Checkbox and copy are two stable columns, including after a checkout refresh. */
html body.lsg-ui-polish .woocommerce form label.lsg-ui-choice,
html body.lsg-ui-polish form.ludorum-suggestion-form label.lsg-ui-choice {
  display:flex; position:static!important; float:none!important;
  align-items:flex-start!important; justify-content:flex-start!important; gap:9px!important;
  min-height:44px!important; max-width:100%; width:auto!important;
  margin:6px 0!important; padding:0!important;
  text-align:left!important; white-space:normal!important; line-height:1.5!important;
}
html body.lsg-ui-polish .woocommerce form label.lsg-ui-choice > input:is([type="checkbox"],[type="radio"]),
html body.lsg-ui-polish form.ludorum-suggestion-form label.lsg-ui-choice > input:is([type="checkbox"],[type="radio"]) {
  position:static!important; float:none!important; flex:0 0 20px!important;
  width:20px!important; min-width:20px!important; max-width:20px!important;
  height:20px!important; min-height:20px!important; max-height:20px!important;
  margin:2px 0 0!important; padding:0!important; transform:none!important;
}
html body.lsg-ui-polish form .lsg-ui-choice-copy {
  display:block!important; flex:1 1 auto; min-width:0;
  margin:0!important; padding:0!important;
  line-height:1.5!important; white-space:normal!important;
  overflow-wrap:break-word; text-align:left!important;
}
html body.lsg-ui-polish .woocommerce form label.lsg-ui-choice--single {
  align-items:center!important; margin:0!important;
}
html body.lsg-ui-polish .woocommerce form label.lsg-ui-choice--single > input:is([type="checkbox"],[type="radio"]) { margin:0!important; }
html body.lsg-ui-polish .woocommerce form.login .form-row:has(.woocommerce-form-login__rememberme) {
  display:flex!important; flex-wrap:wrap!important; align-items:center!important; gap:10px 12px!important;
}
html body.lsg-ui-polish .woocommerce form.login .woocommerce-form-login__rememberme {
  display:inline-flex!important; align-items:center!important;
  min-height:44px!important; width:auto!important; margin:0!important; padding:0!important;
  float:none!important; gap:8px!important; line-height:1.4!important;
}
html body.lsg-ui-polish .woocommerce form.login .woocommerce-form-login__rememberme input[type="checkbox"] {
  position:static!important; width:20px!important; height:20px!important;
  flex:0 0 20px!important; margin:0!important; transform:none!important;
}

/* Text-bearing submit buttons grow instead of cropping a second line. */
html body.lsg-ui-polish .woocommerce form :is(.woocommerce-form-login__submit, .woocommerce-form-register__submit, button[name="apply_coupon"], button[name="update_cart"], #place_order),
html body.lsg-ui-polish form.ludorum-suggestion-form button[type="submit"],
html body.lsg-ui-polish .woocommerce a.checkout-button {
  display:inline-flex; align-items:center!important; justify-content:center!important;
  box-sizing:border-box!important; max-width:100%; min-width:0; min-height:46px!important; height:auto!important;
  padding:11px 16px!important; margin-block:0!important;
  line-height:1.4!important; text-align:center!important; white-space:normal!important;
  overflow-wrap:break-word; float:none!important;
}
html body.lsg-ui-polish .woocommerce form.login .woocommerce-form-login__submit { align-self:center; }
html body.lsg-ui-polish .woocommerce form.checkout_coupon :is(.form-row-first,.form-row-last) { min-width:0; }
html body.lsg-ui-polish .woocommerce form.checkout_coupon button[name="apply_coupon"] { width:100%; }

/* Delivery choices keep the label beside the radio, even when it wraps. */
html body.lsg-ui-polish .woocommerce #shipping_method li {
  display:grid; grid-template-columns:22px minmax(0,1fr)!important;
  align-items:start!important; gap:8px!important; text-align:left!important;
}
html body.lsg-ui-polish .woocommerce #shipping_method li > input {
  grid-column:1; grid-row:1;
  position:static!important; float:none!important; width:20px!important; height:20px!important;
  min-height:20px!important; margin:2px 0 0!important; transform:none!important;
}
html body.lsg-ui-polish .woocommerce #shipping_method li > label {
  grid-column:2; grid-row:1;
  display:block; min-width:0; width:auto!important; margin:0!important;
  line-height:1.5!important; text-align:left!important; white-space:normal!important;
}
html body.lsg-ui-polish .woocommerce #shipping_method li:not(:has(> input)) > label { grid-column:1/-1; }

/* Align method labels only. Provider iframe contents and their visibility stay intact. */
html body.lsg-ui-polish .woocommerce #payment .payment_methods > .wc_payment_method {
  display:grid; grid-template-columns:22px minmax(0,1fr)!important;
  align-items:start!important; gap:8px!important; min-width:0;
}
html body.lsg-ui-polish .woocommerce #payment .wc_payment_method > input.input-radio {
  grid-column:1; grid-row:1;
  position:static!important; float:none!important; width:20px!important; height:20px!important;
  min-height:20px!important; margin:2px 0 0!important;
}
html body.lsg-ui-polish .woocommerce #payment .wc_payment_method > label {
  grid-column:2; grid-row:1;
  display:flex; flex-wrap:wrap; align-items:center!important; gap:7px;
  min-width:0; width:auto!important; margin:0!important; padding:0!important;
  line-height:1.5!important; text-align:left!important; white-space:normal!important; float:none!important;
}
html body.lsg-ui-polish .woocommerce #payment .wc_payment_method > .payment_box {
  grid-column:1/-1!important; grid-row:2; width:100%!important; min-width:0; box-sizing:border-box!important;
}
html body.lsg-ui-polish .woocommerce #payment .wc_payment_method:not(:has(> input.input-radio)) > label { grid-column:1/-1; }
html body.lsg-ui-web .woocommerce #payment .wc_payment_method > label img {
  float:none!important; width:auto!important; height:24px!important;
  max-width:64px!important; max-height:24px!important; object-fit:contain!important;
  margin:0!important; vertical-align:middle!important;
}

/* Preserve actual product image proportions in the cart and order summary. */
html body.lsg-ui-polish .woocommerce :is(.woocommerce-cart-form,.woocommerce-checkout-review-order-table) .product-thumbnail img,
html body.lsg-ui-polish .woocommerce .woocommerce-checkout-review-order-table .product-name img {
  object-fit:contain!important; max-width:100%; height:auto!important;
}
html body.lsg-ui-polish .woocommerce .woocommerce-checkout-review-order-table .product-name {
  min-width:0; white-space:normal!important; line-height:1.5!important; overflow-wrap:break-word;
}
html body.lsg-ui-polish .woocommerce :is(.woocommerce-checkout-review-order-table,.cart_totals) :is(.amount,.product-quantity) { white-space:nowrap; }
html body.lsg-ui-polish .woocommerce .woocommerce-error { overflow-wrap:break-word; line-height:1.5; }
html body.lsg-ui-polish .woocommerce :is(label.lsg-ui-choice,button#place_order,li.wc_payment_method)[hidden] { display:none!important; }

@media(max-width:600px) {
  html body.lsg-ui-polish .woocommerce form :is(input.input-text,input[type="email"],input[type="password"],input[type="tel"],input[type="text"],select):not(.qty):not(.lsg-quick-cart__value),
  html body.lsg-ui-polish form.ludorum-suggestion-form :is(input,select,textarea) { font-size:16px!important; }
  html body.lsg-ui-polish .woocommerce form.checkout_coupon :is(.form-row-first,.form-row-last) { float:none!important; width:100%!important; margin:0 0 10px!important; }
  html body.lsg-ui-polish .woocommerce form.login .woocommerce-form-login__rememberme { min-height:44px!important; }
  html body.lsg-ui-polish .woocommerce :is(.woocommerce-form-login,.woocommerce-form-register,.woocommerce-checkout,.woocommerce-cart-form) { min-width:0; }
  body.lsg-ui-web #ludorum-global-footer .lsg-footer__brand-card,
  body.lsg-ui-web #ludorum-global-footer .lsg-footer__column { text-align:center; }
  body.lsg-ui-web #ludorum-global-footer .lsg-footer__brand-card > a { display:flex; justify-content:center; }
  body.lsg-ui-web #ludorum-global-footer .lsg-footer__description { margin-inline:auto; }
  body.lsg-ui-web #ludorum-global-footer .lsg-footer__list { gap:3px; }
  body.lsg-ui-web #ludorum-global-footer .lsg-footer__list a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; }
}
