/* Checkout payment cards: deliberately scoped to beat legacy storefront form styles. */
#cw-order-form .cw-payment-chooser{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;border:0!important;margin:22px 0 24px!important;padding:0!important;background:transparent!important;box-shadow:none!important;color:#101828!important}
#cw-order-form .cw-payment-chooser legend{display:block!important;width:100%!important;padding:0!important;margin:0 0 17px!important;font-size:23px!important;line-height:1.3!important;font-weight:750!important;color:#101828!important}
#cw-order-form .cw-payment-cards{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;width:100%!important;align-items:stretch!important;margin:0!important;padding:0!important}
#cw-order-form label.cw-payment-card{position:relative!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;align-items:stretch!important;float:none!important;width:auto!important;max-width:none!important;min-width:0!important;min-height:205px!important;height:auto!important;box-sizing:border-box!important;padding:23px 18px 24px!important;margin:0!important;background:#eef2f8!important;border:2px solid transparent!important;border-radius:17px!important;box-shadow:none!important;cursor:pointer!important;text-align:left!important;overflow:hidden!important;white-space:normal!important;gap:0!important;transition:border-color .15s ease!important}
#cw-order-form label.cw-payment-card:has(input:checked){border-color:#f39200!important}
#cw-order-form label.cw-payment-card:focus-within{outline:2px solid #f39200;outline-offset:2px}
#cw-order-form label.cw-payment-card input[type=radio]{position:absolute!important;top:0!important;left:0!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;opacity:0!important;appearance:none!important;-webkit-appearance:none!important;pointer-events:none!important;margin:0!important;padding:0!important;border:0!important}
#cw-order-form .cw-payment-icon{position:absolute!important;top:26px!important;left:22px!important;display:block!important;width:auto!important;height:45px!important;line-height:1!important;margin:0!important;padding:0!important}
#cw-order-form .cw-payment-icon svg{display:block!important;max-width:none!important}
#cw-order-form .cw-payment-label{display:block!important;width:auto!important;margin:0 0 5px!important;padding:0!important;font-size:19px!important;line-height:1.25!important;font-weight:750!important;color:#101828!important;white-space:normal!important}
#cw-order-form .cw-payment-desc{display:block!important;margin:0!important;padding:0!important;color:#697899!important;font-size:15px!important;line-height:1.3!important;font-weight:400!important;white-space:normal!important}
@media(max-width:550px){#cw-order-form .cw-payment-cards{gap:6px!important}#cw-order-form label.cw-payment-card{min-height:165px!important;padding:12px 9px 14px!important;border-radius:13px!important}#cw-order-form .cw-payment-icon{top:14px!important;left:10px!important;transform:scale(.78)!important;transform-origin:top left!important}#cw-order-form .cw-payment-label{font-size:13px!important;line-height:1.2!important}#cw-order-form .cw-payment-desc{font-size:11px!important}#cw-order-form .cw-payment-chooser legend{font-size:20px!important}}

/* Two-step checkout: do not let global form styles override the hidden state. */
#cw-order-form .cw-checkout-details[hidden],#cw-order-form .cw-checkout-payment[hidden]{display:none!important}
#cw-order-form .cw-checkout-details,#cw-order-form .cw-checkout-payment{width:100%;min-width:0}
#cw-order-form .cw-checkout-payment .cw-payment-edit{display:block;border:0;background:none;color:#ef8800;font-size:15px;cursor:pointer;padding:4px 0 12px;text-align:left}
#cw-order-form .cw-payment-summary{font-size:15px;color:#697899;margin:0 0 16px;overflow-wrap:anywhere}
#cw-order-form .cw-checkout-payment .cw-order__submit{background:#f39200;color:#fff}

/* Buyer approvals belong to step one, before displaying the payment choices. */
#cw-order-form .cw-checkout-details .cw-consent {display:flex!important;align-items:flex-start!important;margin-top:13px!important;}
#cw-order-form .cw-checkout-details .cw-consent a{color:#e98700!important;}
#cw-order-form .cw-checkout-details .cw-order__submit{margin-top:18px!important;}
#cw-order-form .cw-checkout-payment .cw-order__error:not(:empty){display:block!important;margin:10px 0!important;color:#c0392b!important;}

/* Final cashier screen: visible selection, no legacy radio controls. */
#cw-order-form .cw-checkout-payment:not([hidden]) {display:block!important;}
#cw-order-form .cw-checkout-payment .cw-payment-chooser {margin-top:16px!important;}
#cw-order-form .cw-payment-card:has(input:checked) {border-color:#f39200!important;}
#cw-order-form .cw-checkout-payment .cw-order__submit {width:100%!important;background:#f39200!important;border-radius:16px!important;}
#cw-order-form .cw-checkout-payment .cw-payment-summary {margin-bottom:8px!important;}

/* Independent second dialog for payment selection. */
#cw-payment-dialog {width:min(41rem,calc(100% - 1.25rem));max-height:calc(100dvh - 1.25rem);overflow-y:auto;padding:1.5rem;border:0;border-radius:1.4rem;box-sizing:border-box;background:#fff;color:#101828;}
#cw-payment-dialog::backdrop {background:rgba(15,17,23,.62);}
#cw-payment-dialog .cw-order__heading {display:flex;align-items:center;gap:1rem;background:#fff;padding:1rem .75rem;margin-bottom:2rem;}
#cw-payment-dialog .cw-order__heading img {width:52px;height:52px;object-fit:cover;border-radius:.7rem;}
#cw-payment-dialog .cw-order__heading h2 {margin:0;font-size:1.3rem;color:#101828;}
#cw-payment-dialog .cw-order__category {font-size:.9rem;color:#77809c;margin:0;}
#cw-payment-dialog .cw-payment-close {position:absolute;top:1.5rem;right:1.4rem;background:none;border:0;font-size:1.6rem;cursor:pointer;color:#667085;}
#cw-payment-dialog .cw-payment-edit {border:0;background:none;color:#ea8500;font-size:.95rem;cursor:pointer;padding:0 0 .8rem;}
#cw-payment-dialog .cw-payment-summary {color:#697899;font-size:.9rem;margin:.15rem 0 1rem;overflow-wrap:anywhere;}
#cw-payment-dialog .cw-payment-chooser {display:block!important;border:0!important;padding:0!important;margin:0 0 1.5rem!important;width:100%!important;min-width:0!important;}
#cw-payment-dialog .cw-payment-chooser legend {display:block;width:100%;font-size:1.5rem;font-weight:750;color:#101828;margin:0 0 1rem;padding:0;}
#cw-payment-dialog .cw-payment-cards {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;}
#cw-payment-dialog label.cw-payment-card {position:relative!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;min-width:0!important;min-height:205px!important;padding:23px 18px 24px!important;box-sizing:border-box!important;border:2px solid transparent!important;border-radius:17px!important;background:#eef2f8!important;cursor:pointer!important;text-align:left!important;margin:0!important;float:none!important;gap:0!important;}
#cw-payment-dialog label.cw-payment-card:has(input:checked) {border-color:#f39200!important;}
#cw-payment-dialog label.cw-payment-card:focus-within {outline:2px solid #f39200;outline-offset:2px;}
#cw-payment-dialog .cw-payment-card input[type=radio] {position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;appearance:none!important;pointer-events:none!important;}
#cw-payment-dialog .cw-payment-icon {position:absolute!important;top:26px!important;left:22px!important;height:45px!important;}
#cw-payment-dialog .cw-payment-label {display:block!important;font-weight:750!important;font-size:18px!important;line-height:1.25!important;margin:0 0 5px!important;color:#101828!important;white-space:normal!important;}
#cw-payment-dialog .cw-payment-desc {display:block!important;color:#697899!important;font-size:15px!important;line-height:1.3!important;white-space:normal!important;}
#cw-payment-dialog .cw-order__submit {display:block!important;width:100%!important;background:#f39200!important;color:#fff!important;border:0!important;border-radius:16px!important;min-height:50px!important;cursor:pointer!important;}
#cw-payment-dialog .cw-order__submit:disabled {opacity:.6;cursor:wait;}
#cw-payment-dialog .cw-order__error:not(:empty) {display:block!important;color:#b42318!important;margin:10px 0!important;}
@media(max-width:550px){#cw-payment-dialog{padding:1rem!important}#cw-payment-dialog .cw-payment-cards{gap:6px!important}#cw-payment-dialog label.cw-payment-card{min-height:165px!important;padding:12px 9px 14px!important;border-radius:13px!important}#cw-payment-dialog .cw-payment-icon{top:14px!important;left:10px!important;transform:scale(.78)!important;transform-origin:top left!important}#cw-payment-dialog .cw-payment-label{font-size:13px!important}#cw-payment-dialog .cw-payment-desc{font-size:11px!important}}

/* ReallyWorld-inspired checkout presentation, adapted to CarrotWorld's own dialogs. */
#cw-payment-dialog{width:min(650px,calc(100vw - 20px))!important;padding:24px!important;border-radius:24px!important;max-height:calc(100dvh - 20px)!important;font-family:var(--cw-font-body),Arial,sans-serif!important}
#cw-payment-dialog .cw-order__heading{padding:19px 24px 22px!important;margin:0 0 34px!important;border-radius:20px!important;min-height:104px;box-sizing:border-box;box-shadow:0 12px 36px rgba(30,40,70,.018)!important;gap:15px!important}
#cw-payment-dialog .cw-order__heading img{width:52px!important;height:52px!important;border-radius:9px!important}
#cw-payment-dialog .cw-order__category{color:#687593!important;font-size:15px!important;margin:0 0 4px!important}
#cw-payment-dialog .cw-order__heading h2{font-size:22px!important;font-weight:800!important;line-height:1.1!important}
#cw-payment-dialog .cw-payment-close{top:45px!important;right:40px!important;color:#6c7390!important;font-size:23px!important}
#cw-payment-dialog .cw-cashier-title{margin:10px 0 12px!important;font-size:24px!important;font-weight:800!important;line-height:1.3!important;color:#121c2c!important}
#cw-payment-dialog .cw-payment-summary-row{display:flex!important;align-items:baseline!important;justify-content:flex-start!important;gap:12px!important;flex-wrap:wrap!important;margin:0 0 16px!important}
#cw-payment-dialog .cw-payment-summary{font-size:15px!important;line-height:1.35!important;margin:0!important;color:#677493!important;max-width:100%;word-break:break-word}
#cw-payment-dialog .cw-payment-edit{display:inline!important;flex:0 0 auto!important;margin:0!important;padding:0!important;color:#ef8b00!important;font-size:15px!important;line-height:1.35!important}
#cw-payment-dialog .cw-payment-chooser{margin:0 0 24px!important;padding:0!important;min-width:0!important;display:block!important}
#cw-payment-dialog .cw-payment-chooser legend{display:none!important}
#cw-payment-dialog .cw-payment-cards{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
#cw-payment-dialog label.cw-payment-card{min-height:205px!important;height:205px!important;padding:23px 22px 25px!important;border-radius:17px!important;background:#eff3f9!important;border:2px solid transparent!important;transition:background-color .15s,border-color .15s!important}
#cw-payment-dialog label.cw-payment-card:has(input:checked){border-color:#f39513!important}
#cw-payment-dialog label.cw-payment-card:hover{background:#e9eff8!important}
#cw-payment-dialog .cw-payment-icon{position:absolute!important;top:26px!important;left:22px!important;width:48px!important;height:48px!important;transform:none!important}
#cw-payment-dialog .cw-payment-icon svg{width:48px!important;height:48px!important;display:block!important}
#cw-payment-dialog .cw-payment-label{font-size:19px!important;line-height:1.24!important;font-weight:750!important;color:#142034!important;margin-bottom:6px!important}
#cw-payment-dialog .cw-payment-desc{font-size:16px!important;line-height:1.2!important;color:#697799!important}
#cw-payment-dialog .cw-order__submit{height:48px!important;min-height:48px!important;border-radius:16px!important;margin:0!important;background:#f39513!important;font-size:16px!important;font-weight:700!important;color:#fff!important}
#cw-payment-dialog .cw-order__error:not(:empty){margin:0 0 12px!important}
@media(max-width:560px){
  #cw-payment-dialog{padding:14px!important;border-radius:20px!important}
  #cw-payment-dialog .cw-order__heading{padding:13px 24px 16px 8px!important;margin-bottom:22px!important;min-height:80px!important}
  #cw-payment-dialog .cw-payment-close{top:32px!important;right:24px!important}
  #cw-payment-dialog .cw-cashier-title{font-size:20px!important}
  #cw-payment-dialog .cw-payment-cards{gap:6px!important}
  #cw-payment-dialog label.cw-payment-card{min-height:167px!important;height:167px!important;padding:12px 9px 13px!important;border-radius:14px!important}
  #cw-payment-dialog .cw-payment-icon{top:14px!important;left:10px!important;width:36px!important;height:36px!important;transform:none!important}
  #cw-payment-dialog .cw-payment-icon svg{width:36px!important;height:36px!important}
  #cw-payment-dialog .cw-payment-label{font-size:13px!important;margin-bottom:6px!important;overflow-wrap:anywhere}
  #cw-payment-dialog .cw-payment-desc{font-size:11px!important}
}


/* Payment-method cards: dedicated evenly sized BLOCKS, overriding legacy storefront rules. */
#cw-payment-dialog .cw-payment-cards {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
  align-items: stretch !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
#cw-payment-dialog .cw-payment-cards > label.cw-payment-card {
  position: relative !important;
  display: flex !important;
  flex-flow: column nowrap !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 205px !important;
  min-height: 205px !important;
  padding: 23px 20px 23px !important;
  margin: 0 !important;
  background: #eef2f8 !important;
  border: 2px solid transparent !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  cursor: pointer !important;
  text-align: left !important;
  white-space: normal !important;
  user-select: none;
}
#cw-payment-dialog .cw-payment-cards > label.cw-payment-card:has(input:checked) {
  border-color: #ff9200 !important;
}
#cw-payment-dialog .cw-payment-cards > label.cw-payment-card:hover {
  background: #e7edf6 !important;
}
#cw-payment-dialog .cw-payment-card .cw-payment-icon {
  position: absolute !important;
  left: 20px !important;
  top: 22px !important;
  width: 48px !important;
  height: 48px !important;
}
#cw-payment-dialog .cw-payment-card .cw-payment-label {
  display: block !important;
  font-size: 19px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  margin: 0 0 6px !important;
}
#cw-payment-dialog .cw-payment-card .cw-payment-desc {
  display: block !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}
@media (max-width: 560px) {
  #cw-payment-dialog .cw-payment-cards { gap: 6px !important; }
  #cw-payment-dialog .cw-payment-cards > label.cw-payment-card {
    height: 165px !important; min-height: 165px !important;
    padding: 12px 9px 13px !important; border-radius: 12px !important;
  }
  #cw-payment-dialog .cw-payment-card .cw-payment-icon {
    left: 9px !important; top: 12px !important;
    width: 36px !important; height: 36px !important;
  }
  #cw-payment-dialog .cw-payment-card .cw-payment-icon svg {width:36px!important;height:36px!important;}
  #cw-payment-dialog .cw-payment-card .cw-payment-label {font-size:13px!important;line-height:1.18!important;margin-bottom:5px!important;}
  #cw-payment-dialog .cw-payment-card .cw-payment-desc {font-size:11px!important;}
}

/* Match the checkout consent design in both windows. */
#cw-payment-dialog .cw-payment-consents { display:grid!important; gap:0!important; margin:6px 0 18px!important; }
#cw-payment-dialog .cw-payment-consents label.cw-consent { display:flex!important; align-items:flex-start!important; gap:.8rem!important; margin:1rem 0 0!important; padding:0!important; color:#6c6c87!important; font-size:.9rem!important; line-height:1.6!important; font-weight:400!important; cursor:pointer!important; }
#cw-payment-dialog .cw-payment-consents label.cw-consent span { display:inline!important; font:inherit!important; color:inherit!important; }
#cw-payment-dialog .cw-payment-consents input[type=checkbox] { appearance:none!important; -webkit-appearance:none!important; display:block!important; position:static!important; box-sizing:border-box!important; flex:0 0 1.4rem!important; width:1.4rem!important; height:1.4rem!important; min-width:1.4rem!important; min-height:1.4rem!important; margin:.1rem 0 0!important; padding:0!important; border:2px solid #b3b6c5!important; border-radius:50%!important; background:#fff!important; box-shadow:none!important; cursor:pointer!important; }
#cw-payment-dialog .cw-payment-consents input[type=checkbox]:checked { border-color:#f39513!important; background:#f39513!important; box-shadow:inset 0 0 0 3px #fff!important; }
#cw-payment-dialog .cw-payment-consents input[type=checkbox]:focus-visible { outline:2px solid #e98700!important; outline-offset:3px!important; }
#cw-payment-dialog .cw-payment-consents a { color:#e98700!important; text-decoration:underline!important; text-underline-offset:2px!important; }
@media(max-width:480px) { #cw-payment-dialog .cw-payment-consents label.cw-consent {font-size:.8rem!important;} }

/* Payment brand logos */
#cw-payment-dialog .cw-payment-card .cw-payment-icon img {display:block!important;width:48px!important;height:48px!important;object-fit:contain!important}
#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards {display:flex!important;align-items:center!important;gap:5px!important;width:auto!important;max-width:calc(100% - 25px)!important}
#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards img {width:47px!important;height:31px!important;object-fit:contain!important}
@media(max-width:560px){#cw-payment-dialog .cw-payment-card .cw-payment-icon img{width:36px!important;height:36px!important}#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards{gap:3px!important}#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards img{width:34px!important;height:23px!important}}

/* Fixed-size payment brands; no global IMG rules can stretch these logos. */
#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards { display:flex!important; flex-direction:row!important; align-items:center!important; justify-content:flex-start!important; gap:6px!important; width:calc(100% - 24px)!important; max-width:calc(100% - 24px)!important; height:42px!important; overflow:hidden!important; }
#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards .cw-card-brand { display:block!important; flex:0 1 48px!important; min-width:0!important; width:48px!important; height:34px!important; max-width:48px!important; max-height:34px!important; background-position:center!important; background-repeat:no-repeat!important; background-size:contain!important; overflow:hidden!important; }
@media(max-width:560px) { #cw-payment-dialog .cw-payment-card .cw-payment-icon--cards {gap:3px!important;width:calc(100% - 10px)!important;max-width:calc(100% - 10px)!important;height:28px!important;} #cw-payment-dialog .cw-payment-card .cw-payment-icon--cards .cw-card-brand {flex-basis:35px!important;width:35px!important;max-width:35px!important;height:25px!important;max-height:25px!important;} }

/* Fixed-size payment brands; no global IMG rules can stretch these logos. */
#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards { display:flex!important; flex-direction:row!important; align-items:center!important; justify-content:flex-start!important; gap:6px!important; width:calc(100% - 24px)!important; max-width:calc(100% - 24px)!important; height:42px!important; overflow:hidden!important; }
#cw-payment-dialog .cw-payment-card .cw-payment-icon--cards .cw-card-brand { display:block!important; flex:0 1 48px!important; min-width:0!important; width:48px!important; height:34px!important; max-width:48px!important; max-height:34px!important; background-position:center!important; background-repeat:no-repeat!important; background-size:contain!important; overflow:hidden!important; }
@media(max-width:560px) { #cw-payment-dialog .cw-payment-card .cw-payment-icon--cards {gap:3px!important;width:calc(100% - 10px)!important;max-width:calc(100% - 10px)!important;height:28px!important;} #cw-payment-dialog .cw-payment-card .cw-payment-icon--cards .cw-card-brand {flex-basis:35px!important;width:35px!important;max-width:35px!important;height:25px!important;max-height:25px!important;} }
