/* Challenge Coins USPS Shipping v1.2.0 - dark cart readability + savings panel + DISPLAY LIGHT contrast */
body.woocommerce-cart .woocommerce,
body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart .cart_totals,
body.woocommerce-cart table.shop_table,
body.woocommerce-cart table.shop_table thead,
body.woocommerce-cart table.shop_table tbody,
body.woocommerce-cart table.shop_table tfoot,
body.woocommerce-cart table.shop_table tr,
body.woocommerce-cart table.shop_table th,
body.woocommerce-cart table.shop_table td {
  color:#eef3f8 !important;
}

body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cart_totals,
body.woocommerce-cart table.shop_table {
  background:#090c11 !important;
  border-color:#303945 !important;
  box-shadow:none !important;
}

body.woocommerce-cart table.shop_table thead th {
  background:#10151d !important;
  color:#ffffff !important;
  border-color:#303945 !important;
  font-weight:800 !important;
  letter-spacing:.02em;
}

body.woocommerce-cart table.shop_table tbody tr,
body.woocommerce-cart table.shop_table tfoot tr {
  background:#0b1016 !important;
  border-color:#2a323d !important;
}

body.woocommerce-cart table.shop_table td,
body.woocommerce-cart table.shop_table th {
  border-color:#2a323d !important;
}

body.woocommerce-cart .product-name,
body.woocommerce-cart .product-name a,
body.woocommerce-cart .cart_totals h2,
body.woocommerce-cart .woocommerce-shipping-totals,
body.woocommerce-cart .woocommerce-shipping-totals label,
body.woocommerce-cart .woocommerce-shipping-methods label,
body.woocommerce-cart .cart-subtotal th,
body.woocommerce-cart .order-total th,
body.woocommerce-cart .order-total td {
  color:#f8fafc !important;
}

body.woocommerce-cart .product-price .amount,
body.woocommerce-cart .product-subtotal .amount,
body.woocommerce-cart .cart-subtotal .amount,
body.woocommerce-cart .order-total .amount,
body.woocommerce-cart .woocommerce-Price-amount,
body.woocommerce-cart .amount {
  color:#ffd36a !important;
  font-weight:800 !important;
}

body.woocommerce-cart input.qty,
body.woocommerce-cart input[type="number"],
body.woocommerce-cart input[type="text"],
body.woocommerce-cart .coupon input.input-text {
  background:#121922 !important;
  color:#ffffff !important;
  border:1px solid #566474 !important;
  box-shadow:none !important;
}
body.woocommerce-cart input::placeholder { color:#9ba8b6 !important; opacity:1; }

body.woocommerce-cart button,
body.woocommerce-cart .button,
body.woocommerce-cart a.button {
  border:1px solid #4a5664 !important;
  background:#151c25 !important;
  color:#f7f9fb !important;
  text-shadow:none !important;
}
body.woocommerce-cart button:hover,
body.woocommerce-cart .button:hover,
body.woocommerce-cart a.button:hover {
  border-color:#e3aa32 !important;
  background:#1a222d !important;
  color:#ffffff !important;
}
body.woocommerce-cart .checkout-button,
body.woocommerce-cart .wc-proceed-to-checkout .button {
  border-color:#c78d18 !important;
  background:linear-gradient(180deg,#d9a12f,#b8790c) !important;
  color:#0a0c10 !important;
  font-weight:900 !important;
}

body.woocommerce-cart .product-remove a.remove {
  color:#ff7272 !important;
  border-color:#6d3131 !important;
}
body.woocommerce-cart .product-remove a.remove:hover {
  background:#4a1717 !important;
  color:#ffffff !important;
}

body.woocommerce-cart .woocommerce-cart-form img,
body.woocommerce-cart .product-thumbnail img {
  border:1px solid #3b4654 !important;
  border-radius:10px !important;
  background:#11161d !important;
}

.ccusps-cart-savings {
  box-sizing:border-box;
  width:100%;
  margin:0 0 22px;
  padding:20px 22px;
  border:1px solid #9b721f;
  border-radius:14px;
  background:linear-gradient(145deg,#111720,#090d13 72%);
  color:#eef3f8;
  box-shadow:0 14px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.03);
}
.ccusps-cart-savings__eyebrow {
  color:#f0ba49;
  font-size:10px;
  font-weight:900;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.ccusps-cart-savings h3 {
  margin:5px 0 14px !important;
  color:#ffffff !important;
  font-size:20px !important;
  line-height:1.2 !important;
}
.ccusps-cart-savings__rows {
  display:grid;
  gap:8px;
}
.ccusps-cart-savings__row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:11px 12px;
  border:1px solid #283341;
  border-radius:10px;
  background:#0d131b;
  color:#e7edf4;
}
.ccusps-cart-savings__row span { min-width:0; font-weight:750; }
.ccusps-cart-savings__row small {
  display:block;
  margin-top:3px;
  color:#aeb9c6;
  font-size:11px;
  font-weight:500;
  line-height:1.4;
}
.ccusps-cart-savings__row strong {
  flex:0 0 auto;
  color:#ffd36a !important;
  font-size:15px;
  font-weight:900;
  white-space:nowrap;
}
.ccusps-cart-savings__row--shipping {
  border-color:#795b20;
  background:linear-gradient(90deg,#17150f,#0d131b 58%);
}
.ccusps-cart-savings__row--shipping strong { color:#7ee2ad !important; }
.ccusps-cart-savings__row--offer { border-color:#3a4d63; }

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
  background:#10161e !important;
  color:#eef3f8 !important;
  border-color:#445264 !important;
}
body.woocommerce-cart .woocommerce-message a,
body.woocommerce-cart .woocommerce-info a,
body.woocommerce-cart .woocommerce-error a { color:#ffd36a !important; }

@media (max-width: 782px) {
  .ccusps-cart-savings { padding:16px; border-radius:12px; }
  .ccusps-cart-savings__row { align-items:flex-start; flex-direction:column; gap:6px; }
  body.woocommerce-cart table.shop_table_responsive tr td::before { color:#aeb9c6 !important; }
}

/* Keep ancillary cart surfaces dark too; never introduce a white card/panel. */
body.woocommerce-cart .coupon,
body.woocommerce-cart .actions,
body.woocommerce-cart .quantity,
body.woocommerce-cart .wc-proceed-to-checkout,
body.woocommerce-cart .woocommerce-shipping-calculator,
body.woocommerce-cart .shipping-calculator-form,
body.woocommerce-cart ul#shipping_method,
body.woocommerce-cart .woocommerce-cart-form__contents,
body.woocommerce-cart .cart-collaterals > *,
body.woocommerce-cart .wc-block-cart,
body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar,
body.woocommerce-cart .wc-block-components-sidebar,
body.woocommerce-cart .wc-block-components-totals-wrapper,
body.woocommerce-cart .wc-block-components-order-summary,
body.woocommerce-cart .wc-block-components-panel,
body.woocommerce-cart .wc-block-components-totals-item {
  background-color:#090c11 !important;
  color:#eef3f8 !important;
}
body.woocommerce-cart .wc-block-cart a,
body.woocommerce-cart .wc-block-cart span,
body.woocommerce-cart .wc-block-cart p,
body.woocommerce-cart .wc-block-cart label,
body.woocommerce-cart .wc-block-cart th,
body.woocommerce-cart .wc-block-cart td,
body.woocommerce-cart .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-components-totals-item__value {
  color:#eef3f8 !important;
}
body.woocommerce-cart .wc-block-formatted-money-amount,
body.woocommerce-cart .wc-block-components-product-price,
body.woocommerce-cart .wc-block-components-totals-item__value {
  color:#ffd36a !important;
}
body.woocommerce-cart dl.variation,
body.woocommerce-cart dl.variation dt,
body.woocommerce-cart dl.variation dd,
body.woocommerce-cart .product-name small,
body.woocommerce-cart .woocommerce-shipping-destination,
body.woocommerce-cart .shipping-calculator-button {
  color:#bcc7d2 !important;
}


/* DISPLAY LIGHT
 * Keep every cart surface dark. The main cart field is lifted from near-black
 * to deep charcoal, deliberately a few shades darker than the +/- controls.
 * JS adds body.ccusps-display-light by following the site's DISPLAY control.
 */
body.woocommerce-cart.ccusps-display-light .woocommerce-cart-form,
body.woocommerce-cart.ccusps-display-light .cart_totals,
body.woocommerce-cart.ccusps-display-light table.shop_table,
body.woocommerce-cart.ccusps-display-light .woocommerce-cart-form__contents,
body.woocommerce-cart.ccusps-display-light .cart-collaterals > *,
body.woocommerce-cart.ccusps-display-light .wc-block-cart,
body.woocommerce-cart.ccusps-display-light .wc-block-cart-items,
body.woocommerce-cart.ccusps-display-light .wc-block-cart__main,
body.woocommerce-cart.ccusps-display-light .wc-block-cart__sidebar,
body.woocommerce-cart.ccusps-display-light .wc-block-components-sidebar,
body.woocommerce-cart.ccusps-display-light .wc-block-components-totals-wrapper,
body.woocommerce-cart.ccusps-display-light .wc-block-components-order-summary,
body.woocommerce-cart.ccusps-display-light .wc-block-components-panel,
body.woocommerce-cart.ccusps-display-light .wc-block-components-totals-item {
  background:#10151b !important;
}
body.woocommerce-cart.ccusps-display-light table.shop_table thead th {
  background:#141a21 !important;
}
body.woocommerce-cart.ccusps-display-light table.shop_table tbody tr,
body.woocommerce-cart.ccusps-display-light table.shop_table tfoot tr {
  background:#11171e !important;
}
body.woocommerce-cart.ccusps-display-light .coupon,
body.woocommerce-cart.ccusps-display-light .actions,
body.woocommerce-cart.ccusps-display-light .wc-proceed-to-checkout,
body.woocommerce-cart.ccusps-display-light .woocommerce-shipping-calculator,
body.woocommerce-cart.ccusps-display-light .shipping-calculator-form,
body.woocommerce-cart.ccusps-display-light ul#shipping_method {
  background-color:#10151b !important;
}
/* Quantity controls remain intentionally lighter than the main cart field. */
body.woocommerce-cart.ccusps-display-light input.qty,
body.woocommerce-cart.ccusps-display-light input[type="number"] {
  background:#151c25 !important;
}
body.woocommerce-cart.ccusps-display-light .quantity button,
body.woocommerce-cart.ccusps-display-light .quantity .button,
body.woocommerce-cart.ccusps-display-light button.minus,
body.woocommerce-cart.ccusps-display-light button.plus,
body.woocommerce-cart.ccusps-display-light .minus,
body.woocommerce-cart.ccusps-display-light .plus {
  background:#151c25 !important;
  border-color:#596675 !important;
  color:#f3f7fb !important;
}
body.woocommerce-cart.ccusps-display-light .ccusps-cart-savings {
  background:linear-gradient(145deg,#161c23,#10151b 72%);
}
body.woocommerce-cart.ccusps-display-light .ccusps-cart-savings__row {
  background:#141a21;
}

/* v1.1.6: cart-level ship-to estimator so USPS is not silently absent before checkout. */
.ccusps-cart-destination {
  margin:0 0 14px;
  padding:16px;
  border:1px solid #33404f;
  border-radius:14px;
  background:#0d1218;
  color:#eef3f8;
}
.ccusps-cart-destination.needs-destination { border-color:#806523; }
.ccusps-cart-destination.has-destination { border-color:#315d4c; }
.ccusps-cart-destination__heading {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:14px;
}
.ccusps-cart-destination__eyebrow {
  margin:0 0 4px;
  font-size:11px;
  line-height:1;
  font-weight:800;
  letter-spacing:.16em;
  color:#ffd36a;
}
.ccusps-cart-destination h3 {
  margin:0 0 5px;
  font-size:18px;
  line-height:1.2;
  color:#f5f8fb;
}
.ccusps-cart-destination p {
  margin:0;
  color:#b7c2ce;
  font-size:13px;
  line-height:1.45;
}
.ccusps-cart-destination__status {
  flex:0 0 auto;
  border:1px solid #4b5866;
  border-radius:999px;
  padding:6px 9px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  color:#ffd36a;
  background:#111922;
}
.ccusps-cart-destination.has-destination .ccusps-cart-destination__status { color:#83e2b5; border-color:#315d4c; }
.ccusps-destination-grid {
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(130px,.8fr);
  gap:10px;
  margin-bottom:10px;
}
.ccusps-field { display:flex; flex-direction:column; gap:5px; margin:0; }
.ccusps-field > span { font-size:11px; font-weight:800; letter-spacing:.04em; color:#c8d2dc; }
.ccusps-field small { font-weight:500; color:#7f8b98; }
.ccusps-field input,
.ccusps-field select {
  width:100%;
  min-height:42px;
  margin:0;
  border:1px solid #43505e !important;
  border-radius:8px !important;
  background:#151c25 !important;
  color:#f3f7fb !important;
  padding:8px 10px !important;
  box-shadow:none !important;
}
.ccusps-field input:focus,
.ccusps-field select:focus { border-color:#ffd36a !important; outline:1px solid #ffd36a; }
.ccusps-calculate-shipping {
  width:100%;
  min-height:42px;
  border-radius:8px !important;
  font-weight:900 !important;
  letter-spacing:.04em;
}
.ccusps-cart-destination__note {
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid #2b3541;
  color:#ffd36a;
  font-size:12px;
  font-weight:700;
}
@media (max-width: 680px) {
  .ccusps-cart-destination__heading { flex-direction:column; gap:9px; }
  .ccusps-destination-grid { grid-template-columns:1fr; }
  .ccusps-cart-destination__status { align-self:flex-start; }
}

/* v1.1.7: give cart and Ship To controls more internal breathing room. */
body.woocommerce-cart table.shop_table th,
body.woocommerce-cart table.shop_table td {
  padding:14px 16px !important;
}
body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
  padding:14px 16px !important;
}
.ccusps-cart-destination {
  padding:20px 22px;
}
.ccusps-destination-grid {
  gap:14px;
  margin-bottom:14px;
}
.ccusps-field {
  gap:7px;
}
.ccusps-field input,
.ccusps-field select {
  min-height:46px;
  padding:11px 14px !important;
  line-height:1.35 !important;
  box-sizing:border-box !important;
}
.ccusps-calculate-shipping {
  min-height:46px;
  padding:11px 16px !important;
}
.ccusps-cart-destination__status {
  padding:8px 12px;
}
.ccusps-cart-destination__note {
  margin-top:14px;
  padding:14px 2px 0;
  line-height:1.45;
}
.ccusps-cart-savings__row {
  padding:14px 16px;
}

@media (max-width: 680px) {
  body.woocommerce-cart table.shop_table th,
  body.woocommerce-cart table.shop_table td {
    padding:12px 14px !important;
  }
  .ccusps-cart-destination {
    padding:18px 16px;
  }
  .ccusps-field input,
  .ccusps-field select {
    padding:11px 12px !important;
  }
  .ccusps-calculate-shipping {
    padding:11px 14px !important;
  }
  .ccusps-cart-savings__row {
    padding:13px 14px;
  }
}


/* v1.1.8 rebuilt cart/checkout bridge. The staged footer copy is never visible;
 * JS clones it into the custom cart/checkout summary only when no native placement exists. */
#ccusps-cart-fallback-template { display:none !important; }
.ccusps-cart-destination[data-ccusps-injected="rebuilt-cart-checkout"] {
  width:100%;
  box-sizing:border-box;
  margin:0 0 18px;
}
body.woocommerce-checkout .ccusps-cart-destination,
body[class*="checkout"] .ccusps-cart-destination {
  width:100%;
  box-sizing:border-box;
}


/* v1.2.0 direct rebuilt-cart bridge + AJAX feedback. */
.ccusps-server-cart-bridge {
  width:100%;
  box-sizing:border-box;
  margin:0 0 18px;
}
.ccusps-destination-form {
  display:block;
}
.ccusps-destination-response {
  min-height:18px;
  margin-top:10px;
  padding:0 2px;
  font-size:12px;
  font-weight:700;
  line-height:1.45;
  color:#aab7c4;
}
.ccusps-destination-response.is-error { color:#ff9e9e; }
.ccusps-destination-response.is-success { color:#83e2b5; }
.ccusps-calculate-shipping[disabled] {
  opacity:.72;
  cursor:wait;
}

/* v1.3.2: destination belongs to the Shipping total, not a detached cart panel. */
.ccusps-cart-destination--inline{
  width:100%;
  box-sizing:border-box;
  margin:12px 0 0;
  padding:12px;
  border-radius:10px;
}
.ccusps-cart-destination--inline .ccusps-cart-destination__heading{
  margin-bottom:10px;
}
.ccusps-cart-destination--inline .ccusps-cart-destination__heading h3{
  font-size:14px;
  margin:2px 0 0;
}
.ccusps-cart-destination--inline .ccusps-cart-destination__heading p{
  font-size:12px;
  margin:4px 0 0;
}
.ccusps-cart-destination--inline .ccusps-destination-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.ccusps-cart-destination--inline .ccusps-field span{
  font-size:11px;
}
.ccusps-cart-destination--inline .ccusps-field input,
.ccusps-cart-destination--inline .ccusps-field select{
  min-height:40px;
}
.ccusps-admin-rate-diagnostic{
  width:100%;
  box-sizing:border-box;
  margin:8px 0 0;
  padding:8px 10px;
  border:1px dashed currentColor;
  border-radius:8px;
  font-size:12px;
  line-height:1.35;
  opacity:.82;
}
@media (max-width:640px){
  .ccusps-cart-destination--inline .ccusps-destination-grid{grid-template-columns:1fr;}
}


/* v1.3.3 - restore compact cart shipping presentation. */
.ccusps-cart-destination--compact,
.ccusps-cart-destination--compact.ccusps-cart-destination--inline{
  width:100%!important;max-width:100%!important;margin:8px 0 0!important;padding:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:inherit!important;
}
.ccusps-cart-destination--compact .ccusps-compact-summary{
  display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;
  min-height:34px!important;padding:7px 0!important;border-top:1px solid rgba(255,255,255,.08)!important;
}
.ccusps-cart-destination--compact .ccusps-compact-summary__label{font-size:10px!important;font-weight:900!important;letter-spacing:.12em!important;color:#d7ad46!important;white-space:nowrap!important}
.ccusps-cart-destination--compact .ccusps-compact-summary__value{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:12px!important;font-weight:700!important;color:inherit!important}
.ccusps-cart-destination--compact .ccusps-compact-summary__change{
  appearance:none!important;border:0!important;background:none!important;padding:3px 0!important;color:#d7ad46!important;
  font:inherit!important;font-size:10px!important;font-weight:900!important;letter-spacing:.08em!important;cursor:pointer!important;
}
.ccusps-cart-destination--compact .ccusps-destination-form{margin:4px 0 8px!important;padding:10px!important;border:1px solid rgba(215,173,70,.28)!important;border-radius:8px!important;background:rgba(0,0,0,.12)!important}
.ccusps-cart-destination--compact .ccusps-destination-form[hidden]{display:none!important}
.ccusps-cart-destination--compact .ccusps-destination-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:0 0 8px!important}
.ccusps-cart-destination--compact .ccusps-field{gap:4px!important;margin:0!important}
.ccusps-cart-destination--compact .ccusps-field span{font-size:10px!important;line-height:1.2!important}
.ccusps-cart-destination--compact .ccusps-field small{display:none!important}
.ccusps-cart-destination--compact .ccusps-field input,
.ccusps-cart-destination--compact .ccusps-field select{min-height:36px!important;height:36px!important;padding:7px 9px!important;font-size:12px!important}
.ccusps-cart-destination--compact .ccusps-calculate-shipping{min-height:36px!important;width:100%!important;padding:7px 10px!important;font-size:11px!important}
.ccusps-cart-destination--compact .ccusps-destination-response{min-height:0!important;margin:6px 0 0!important;font-size:10px!important}
.ccusps-admin-rate-diagnostic{margin:8px 0!important;padding:8px 9px!important;border-color:#d7ad46!important;color:#ffd36a!important;font-size:10px!important}
@media(max-width:640px){
 .ccusps-cart-destination--compact .ccusps-destination-grid{grid-template-columns:1fr!important}
 .ccusps-cart-destination--compact .ccusps-compact-summary{grid-template-columns:auto minmax(0,1fr) auto!important}
}
