/* NewCheckout 1.2.0: shipping choices and coupon panels only.
 * Native WooCommerce / Elementor controls and JavaScript are preserved.
 */

.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods, .woocommerce-form-coupon-toggle, form.checkout_coupon, .e-coupon-box),
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods, .woocommerce-form-coupon-toggle, form.checkout_coupon, .e-coupon-box) * { box-sizing: border-box; }

/* Keep other table rows intact; the shipping cell alone spans its original columns. */
.newcheckout-details tr.newcheckout-shipping-row > th { display: none !important; }
.newcheckout-details tr.newcheckout-shipping-row > td {
  width: 100%;
  max-width: none;
  text-align: start;
}
.newcheckout-details tr.newcheckout-shipping-row > td::before { content: none; display: none; }
.newcheckout-details .newcheckout-shipping-title { margin: 0 0 12px; font-weight: 600; text-align: start; }

/* Shipping: labels remain the full clickable surface for native radios. */
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: start;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 13px;
  box-shadow: 0 2px 5px #0f172a04;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li:hover {
  border-color: #9bb7e1;
  background: #f8fafc;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li:has(> input:checked),
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li:has(> input[type="hidden"]) {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb, 0 3px 10px #2563eb0a;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li > input[type="radio"] {
  position: absolute;
  inset-inline-start: 15px;
  inset-inline-end: auto;
  top: 22px;
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  accent-color: #2563eb;
  cursor: pointer;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li > label {
  display: block;
  min-height: 60px;
  margin: 0;
  padding: 16px;
  padding-inline-start: 44px;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li > label .amount {
  display: inline-block;
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li:has(> input[type="hidden"]) > label::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 15px;
  top: 18px;
  color: #2563eb;
  font-weight: 700;
}
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li:has(> input:disabled) { opacity: .6; }
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li:has(> input:disabled) > label { cursor: not-allowed; }
.newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li:focus-within { outline: 3px solid #93b4f5; outline-offset: 3px; }

/* Standard WooCommerce coupon prompt and Elementor Pro's coupon box. */
.newcheckout-details :is(.woocommerce-form-coupon-toggle, .e-coupon-box) {
  position: relative;
  min-width: 0;
  padding: 17px 18px;
  margin-block: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: 0 2px 6px #0f172a03;
  color: #334155;
  font-size: 14px;
  line-height: 1.8;
}
.newcheckout-details :is(.woocommerce-form-coupon-toggle, .e-coupon-box)::before { content: none; display: none; }
.newcheckout-details .woocommerce-form-coupon-toggle .woocommerce-info,
.newcheckout-details .e-coupon-box > :is(p:first-child, .e-woocommerce-coupon-nudge) {
  min-height: 25px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #334155;
  font-size: 14px;
  line-height: 1.8;
}
.newcheckout-details .woocommerce-form-coupon-toggle .woocommerce-info::before { content: none; }
.newcheckout-details :is(.woocommerce-form-coupon-toggle, .e-coupon-box) a:is(.showcoupon, .e-show-coupon-form) {
  display: inline-block;
  padding: 2px 8px;
  margin-inline-start: 3px;
  border-radius: 7px;
  background: #eaf1ff;
  color: #1d4ed8;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.8;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.newcheckout-details :is(.woocommerce-form-coupon-toggle, .e-coupon-box) a:is(.showcoupon, .e-show-coupon-form):hover {
  background: #dfeaff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.newcheckout-details form.checkout_coupon {
  min-width: 0;
  padding: 18px;
  margin: 10px 0 18px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}
.newcheckout-details form.checkout_coupon .form-row { float: none; width: 100%; padding: 0; margin: 10px 0 0; }
.newcheckout-details .e-coupon-box .e-coupon-anchor-description { color: #475569; font-size: 13px; line-height: 1.7; }
.newcheckout-details .e-coupon-box .coupon-container-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.newcheckout-details .e-coupon-box .coupon-container-grid > * { min-width: 0; }
.newcheckout-details :is(form.checkout_coupon, .e-coupon-box) input[name="coupon_code"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 16px;
  box-shadow: none;
}
.newcheckout-details :is(form.checkout_coupon, .e-coupon-box) :is(button[name="apply_coupon"], button.e-apply-coupon) {
  min-height: 45px;
  padding: 10px 18px;
  border: 1px solid #2563eb;
  border-radius: 9px;
  background: #2563eb;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  box-shadow: 0 2px 4px #2563eb15;
  cursor: pointer;
}
.newcheckout-details form.checkout_coupon button[name="apply_coupon"] { width: 100%; }
.newcheckout-details :is(form.checkout_coupon, .e-coupon-box) :is(button[name="apply_coupon"], button.e-apply-coupon):hover { background: #1d4ed8; border-color: #1d4ed8; }
.newcheckout-details :is(form.checkout_coupon, .e-coupon-box) :is(button[name="apply_coupon"], button.e-apply-coupon):disabled { opacity: .6; cursor: wait; }
.newcheckout-details :is(.woocommerce-form-coupon-toggle, form.checkout_coupon, .e-coupon-box) :is(a, input, button):focus-visible { outline: 3px solid #93b4f5; outline-offset: 3px; }
@media (max-width: 480px) {
  .newcheckout-details :is(.woocommerce-form-coupon-toggle, .e-coupon-box) { padding: 15px; }
  .newcheckout-details .e-coupon-box .coupon-container-grid { grid-template-columns: minmax(0, 1fr); }
  .newcheckout-details .e-coupon-box button.e-apply-coupon { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .newcheckout-details :is(ul#shipping_method, ul.woocommerce-shipping-methods) > li { transition: none; }
}
