/* Empire Factory Store — V24 Checkout Polish (staging-only overlay)
 * Requires V23. Loaded AFTER empire-v23-cart-checkout.css.
 * Deliberately NO JavaScript, form hiding, rate/tax calculations, or gateway changes.
 * All selectors are limited to checkout-checkout; cart and payment APIs untouched.
 */

/* Match the guide labels to the six actual accordion steps, not a competing 3-step process. */
body.checkout-checkout .em24-checkout-steps{gap:8px!important;margin-top:17px!important}
body.checkout-checkout .em24-checkout-steps span{
  background:#273B48!important;border:1px solid #55788A!important;
  color:#E0F3FC!important;padding:10px 13px!important;
  font-size:10px!important;letter-spacing:.055em!important;
  line-height:1.4!important;font-weight:800!important;
}

/* Clickable radio choice cards: native radio buttons and labels still work normally. */
body.checkout-checkout #collapse-shipping-method .radio,
body.checkout-checkout #collapse-payment-method .radio{
  display:block!important;max-width:100%!important;min-height:52px!important;
  margin:9px 0!important;padding:0!important;background:#F8FBFD!important;
  border:1px solid #C9D8E2!important;border-radius:5px!important;
  box-shadow:0 1px 2px rgba(16,39,51,.025)!important;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;
}
body.checkout-checkout #collapse-shipping-method .radio label,
body.checkout-checkout #collapse-payment-method .radio label{
  display:flex!important;align-items:flex-start!important;gap:12px!important;
  width:100%!important;min-height:50px!important;margin:0!important;
  padding:14px 16px!important;cursor:pointer!important;
  font-size:13px!important;line-height:1.5!important;font-weight:600!important;
  color:#203541!important;white-space:normal!important;
}
body.checkout-checkout #collapse-shipping-method .radio input[type="radio"],
body.checkout-checkout #collapse-payment-method .radio input[type="radio"]{
  flex:0 0 17px!important;width:17px!important;height:17px!important;
  margin:1px 0 0!important;position:static!important;
  accent-color:#008CC7!important;cursor:pointer!important;
}
body.checkout-checkout #collapse-shipping-method .radio:hover,
body.checkout-checkout #collapse-payment-method .radio:hover{
  background:#EFF9FE!important;border-color:#7FC5E3!important;
}
body.checkout-checkout #collapse-shipping-method .radio:focus-within,
body.checkout-checkout #collapse-payment-method .radio:focus-within{
  outline:2px solid #008CC7!important;outline-offset:2px!important;
}
@supports selector(:has(input:checked)){
  body.checkout-checkout #collapse-shipping-method .radio:has(input[type="radio"]:checked),
  body.checkout-checkout #collapse-payment-method .radio:has(input[type="radio"]:checked){
    background:#E8F8FF!important;border-color:#008CC7!important;
    box-shadow:inset 4px 0 0 #00AEEF,0 2px 8px rgba(0,140,199,.09)!important;
  }
}
/* Preserve and emphasize the shipping-rate group heading (including actual box weights). */
body.checkout-checkout #collapse-shipping-method .panel-body>p>strong,
body.checkout-checkout #collapse-payment-method .panel-body>p>strong{
  color:#1B252D!important;font-size:14px!important;font-weight:800!important;
}

/* Order instructions: compact existing field in BOTH AJAX steps.
 * Do not hide/remove one: both are serialized by original OpenCart checkout JS. */
body.checkout-checkout #collapse-shipping-method textarea[name="comment"],
body.checkout-checkout #collapse-payment-method textarea[name="comment"]{
  display:block!important;height:82px!important;min-height:82px!important;
  max-height:180px!important;resize:vertical!important;
  padding:11px 13px!important;line-height:1.5!important;
  border:1px solid #BACBD6!important;background:#FCFDFE!important;
}
body.checkout-checkout #collapse-shipping-method .panel-body>p:has(>textarea[name="comment"]),
body.checkout-checkout #collapse-payment-method .panel-body>p:has(>textarea[name="comment"]){margin-bottom:16px!important}

/* Improve consent readability without rearranging payment DOM or checkbox order. */
body.checkout-checkout #collapse-payment-method .buttons{
  border-top:1px solid #E2EBF0!important;padding-top:19px!important;margin-top:18px!important;
}
body.checkout-checkout #collapse-payment-method input[type="checkbox"]{
  width:17px!important;height:17px!important;vertical-align:middle!important;
  accent-color:#008CC7!important;cursor:pointer!important;margin:0 7px!important;
}
body.checkout-checkout #collapse-payment-method .buttons .pull-right{
  line-height:2!important;color:#273D4B!important;font-size:13px!important;
}
body.checkout-checkout #collapse-payment-method .buttons #button-payment-method{
  min-width:142px!important;margin-left:12px!important;
}

/* Final review: strong table legibility and clear dynamic total, no fabricated taxes. */
body.checkout-checkout .em24-review-notice{
  display:flex!important;gap:10px!important;align-items:flex-start!important;
  margin:0!important;padding:15px 25px!important;
  border-bottom:1px solid #DFE9EF!important;background:#E9F7FC!important;
  color:#294657!important;font-size:12px!important;line-height:1.6!important;
}
body.checkout-checkout .em24-review-notice i{color:#008CC7!important;margin-top:3px!important}
body.checkout-checkout #collapse-checkout-confirm .table-responsive{
  overflow-x:auto!important;border:0!important;margin-bottom:18px!important;
}
body.checkout-checkout #collapse-checkout-confirm .table{
  width:100%!important;background:#fff!important;border-collapse:collapse!important;
}
body.checkout-checkout #collapse-checkout-confirm .table thead th,
body.checkout-checkout #collapse-checkout-confirm .table thead td{
  color:#324D5D!important;background:#F0F6F9!important;
  font-size:11px!important;letter-spacing:.04em!important;font-weight:900!important;
  border-bottom:1px solid #D7E3EA!important;padding:13px 12px!important;
}
body.checkout-checkout #collapse-checkout-confirm .table tbody td,
body.checkout-checkout #collapse-checkout-confirm .table tfoot td{
  color:#233945!important;padding:13px 12px!important;
  font-size:13px!important;border-color:#E0E9EF!important;
}
body.checkout-checkout #collapse-checkout-confirm .table tfoot tr:last-child td{
  color:#152C3B!important;font-weight:900!important;font-size:19px!important;
  background:#E9F8FF!important;border-top:2px solid #00AEEF!important;
}
body.checkout-checkout #collapse-checkout-confirm .table tfoot tr:last-child td:first-child{
  font-size:12px!important;letter-spacing:.05em!important;text-transform:uppercase!important;
}
body.checkout-checkout #collapse-checkout-confirm h2,
body.checkout-checkout #collapse-checkout-confirm h3,
body.checkout-checkout #collapse-checkout-confirm h4{
  color:#1B252D!important;font-weight:900!important;line-height:1.3!important;
}
body.checkout-checkout #collapse-checkout-confirm label{
  font-size:12px!important;color:#263E4A!important;font-weight:700!important;
}
body.checkout-checkout #collapse-checkout-confirm input.form-control{
  background:#FFFFFF!important;color:#152F3C!important;border:1px solid #B8CBD6!important;
  font-size:14px!important;min-height:44px!important;
}
body.checkout-checkout #collapse-checkout-confirm input.form-control:focus{
  border-color:#008CC7!important;box-shadow:0 0 0 3px rgba(0,174,239,.14)!important;
}

/* Mobile layout: touchable choices, no oversized comments or checkout steps. */
@media(max-width:700px){
  body.checkout-checkout .em24-checkout-steps{display:grid!important;grid-template-columns:1fr!important}
  body.checkout-checkout .em24-checkout-steps span{width:100%!important}
  body.checkout-checkout #collapse-shipping-method .radio label,
  body.checkout-checkout #collapse-payment-method .radio label{
    padding:15px 12px!important;gap:10px!important;font-size:13px!important;
  }
  body.checkout-checkout .em24-review-notice{padding:13px 16px!important}
  body.checkout-checkout #collapse-payment-method .buttons .pull-right{float:none!important;width:100%!important;text-align:left!important}
  body.checkout-checkout #collapse-payment-method .buttons #button-payment-method{
    display:block!important;width:100%!important;margin:12px 0 0!important;
  }
  body.checkout-checkout #collapse-checkout-confirm .table{
    min-width:590px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.checkout-checkout #collapse-shipping-method .radio,
  body.checkout-checkout #collapse-payment-method .radio{transition:none!important}
}
