/* ========================================================================
   ERG — Cart + Checkout (clean sheet)
   File: 70-cart-checkout.css

   Scope:
   - Loaded only on Cart + Checkout templates (recommended)
   - Uses wrapper classes when present: .erg-cart-wrap / .erg-checkout-wrap
   - Also keys off body classes: .woocommerce-cart / .woocommerce-checkout

   Notes:
   - Fixes header nav "blue link" issue on checkout by overriding CURRENT/ACTIVE states.
   - Fixes prices ($), quantity pill sizing, thumbnail pill padding.
   - Removes Woo white table blocks inside Cart Totals + Order Review.
   ======================================================================== */


/* ------------------------------------------------------------------------
   0) Page tokens (safe defaults for cart/checkout only)
------------------------------------------------------------------------- */
body.woocommerce-cart,
body.woocommerce-checkout {
  --erg-panel: rgba(0, 0, 0, 0.38);
  --erg-text: rgba(242, 243, 245, 0.94);
  --erg-muted: rgba(242, 243, 245, 0.62);
  --erg-link: #55b4cf;
  --erg-link-hover: #7ad0e6;
  --erg-border: rgba(242, 243, 245, 0.12);
  --erg-line: rgba(242, 243, 245, 0.10);

  --erg-radius: 28px;
  --erg-radius-sm: 18px;

  --erg-cta: #C8A84B;
  --erg-cta-2: #b8983f;
  --erg-cta-3: #a68835;
  --erg-cta-contrast: #11151a;

  --erg-red: #ff5b5b;

  /* If your token file sets these, it will override. These are just fallbacks. */
  --erg-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}


/* ------------------------------------------------------------------------
   1) Header nav — stop “Shop = blue” on checkout/cart
   (Usually caused by global link rules + current-menu-item styling)
------------------------------------------------------------------------- */
body.woocommerce-cart .elementor-location-header .elementor-nav-menu--main a.elementor-item,
body.woocommerce-checkout .elementor-location-header .elementor-nav-menu--main a.elementor-item {
  color: var(--erg-text) !important;
  text-decoration: none !important;
}

/* Kill "current" / "active" blue states */
body.woocommerce-cart .elementor-location-header .elementor-nav-menu--main a.elementor-item.elementor-item-active,
body.woocommerce-checkout .elementor-location-header .elementor-nav-menu--main a.elementor-item.elementor-item-active,
body.woocommerce-cart .elementor-location-header .elementor-nav-menu--main .current-menu-item > a,
body.woocommerce-checkout .elementor-location-header .elementor-nav-menu--main .current-menu-item > a,
body.woocommerce-cart .elementor-location-header .elementor-nav-menu--main .current_page_item > a,
body.woocommerce-checkout .elementor-location-header .elementor-nav-menu--main .current_page_item > a,
body.woocommerce-cart .elementor-location-header .elementor-nav-menu--main .current-menu-ancestor > a,
body.woocommerce-checkout .elementor-location-header .elementor-nav-menu--main .current-menu-ancestor > a {
  color: var(--erg-text) !important;
}

/* Hover can still pop a little (optional) */
body.woocommerce-cart .elementor-location-header .elementor-nav-menu--main a.elementor-item:hover,
body.woocommerce-checkout .elementor-location-header .elementor-nav-menu--main a.elementor-item:hover,
body.woocommerce-cart .elementor-location-header .elementor-nav-menu--main a.elementor-item:focus,
body.woocommerce-checkout .elementor-location-header .elementor-nav-menu--main a.elementor-item:focus {
  color: var(--erg-link-hover) !important;
}


/* ------------------------------------------------------------------------
   2) Shared: kill default Woo white blocks inside our wrappers
------------------------------------------------------------------------- */
.erg-cart-wrap,
.erg-checkout-wrap {
  color: var(--erg-text);
}


/* ------------------------------------------------------------------------
   3) CART (Elementor Cart widget)
------------------------------------------------------------------------- */
body.woocommerce-cart .elementor-widget-woocommerce-cart,
body.woocommerce-cart .erg-cart-wrap .elementor-widget-woocommerce-cart {
  color: var(--erg-text);
}

/* Table container */
body.woocommerce-cart .elementor-widget-woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .erg-cart-wrap .woocommerce-cart-form {
  max-width: 1200px;
  margin: 0 auto;
}

/* Shop table */
body.woocommerce-cart .elementor-widget-woocommerce-cart table.shop_table,
body.woocommerce-cart .erg-cart-wrap table.shop_table {
  border-collapse: separate;
  border-spacing: 0;  border: 1px solid var(--erg-border);
  border-radius: var(--erg-radius);
  overflow: hidden;
}

/* Header row */
body.woocommerce-cart .elementor-widget-woocommerce-cart table.shop_table thead th,
body.woocommerce-cart .erg-cart-wrap table.shop_table thead th {
  color: var(--erg-link);
  font-family: var(--erg-mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 700;
  font-size: 14px;
  padding: 18px 18px;
  border-bottom: 1px solid var(--erg-line);
}

/* Body cells */
body.woocommerce-cart .elementor-widget-woocommerce-cart table.shop_table tbody td,
body.woocommerce-cart .erg-cart-wrap table.shop_table tbody td {
  padding: 22px 18px;
  border-bottom: 1px solid var(--erg-line);
  vertical-align: middle;
}

/* Remove button */
body.woocommerce-cart .elementor-widget-woocommerce-cart a.remove,
body.woocommerce-cart .erg-cart-wrap a.remove {
  color: var(--erg-text) !important;
  opacity: 0.85;
  font-size: 22px;
  line-height: 1;
}
body.woocommerce-cart .elementor-widget-woocommerce-cart a.remove:hover,
body.woocommerce-cart .erg-cart-wrap a.remove:hover {
  opacity: 1;
}

/* Product name — clamp long distributor feed titles (#11) */
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-name a,
body.woocommerce-cart .erg-cart-wrap td.product-name a {
  color: var(--erg-text) !important;
  font-weight: 800;
  text-transform: uppercase;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.04em;
  text-decoration: none;
}

/* Price + Subtotal (fix “lost $ color”) */
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-price,
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-subtotal,
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-price .woocommerce-Price-amount,
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-subtotal .woocommerce-Price-amount,
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-price .woocommerce-Price-currencySymbol,
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-subtotal .woocommerce-Price-currencySymbol,
body.woocommerce-cart .erg-cart-wrap td.product-price,
body.woocommerce-cart .erg-cart-wrap td.product-subtotal,
body.woocommerce-cart .erg-cart-wrap td.product-price .woocommerce-Price-amount,
body.woocommerce-cart .erg-cart-wrap td.product-subtotal .woocommerce-Price-amount,
body.woocommerce-cart .erg-cart-wrap td.product-price .woocommerce-Price-currencySymbol,
body.woocommerce-cart .erg-cart-wrap td.product-subtotal .woocommerce-Price-currencySymbol {
  color: var(--erg-text) !important;
}

/* Thumbnail pill (tighten top/bottom) */
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-thumbnail a,
body.woocommerce-cart .erg-cart-wrap td.product-thumbnail a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 98px;
  height: 74px;
  padding: 6px 10px;      /* was too tall */
  border-radius: var(--erg-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--erg-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-thumbnail img,
body.woocommerce-cart .erg-cart-wrap td.product-thumbnail img {
  width: auto !important;
  height: auto !important;
  max-width: 84px;
  max-height: 54px;
  object-fit: contain;
  display: block;
}

/* Quantity pill (wider left/right + no goofy arrows overlay) */
body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-quantity .quantity,
body.woocommerce-cart .erg-cart-wrap td.product-quantity .quantity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.woocommerce-cart .elementor-widget-woocommerce-cart input.qty,
body.woocommerce-cart .erg-cart-wrap input.qty {
  width: 104px !important;
  min-width: 104px !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid var(--erg-border) !important;
  color: var(--erg-text) !important;
  text-align: center !important;
  font-weight: 700;
}

/* hide webkit spinners (prevents the tiny up/down box) */
body.woocommerce-cart input.qty::-webkit-outer-spin-button,
body.woocommerce-cart input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body.woocommerce-cart input.qty[type="number"] {
  -moz-appearance: textfield;
}

/* Buttons (Update cart, Apply coupon, Proceed) */
body.woocommerce-cart .elementor-widget-woocommerce-cart button,
body.woocommerce-cart .elementor-widget-woocommerce-cart a.button,
body.woocommerce-cart .erg-cart-wrap button,
body.woocommerce-cart .erg-cart-wrap a.button {
  border-radius: 999px !important;
}

/* Update Cart button — polish to match site style (#12) */
body.woocommerce-cart button[name="update_cart"]{
  background: rgba(0,0,0,.30) !important;
  color: var(--erg-text) !important;
  border: 1px solid var(--erg-border) !important;
  padding: 12px 24px !important;
  font-family: var(--erg-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
body.woocommerce-cart button[name="update_cart"]:hover{
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.22) !important;
}
body.woocommerce-cart button[name="update_cart"]:disabled{
  opacity: .4;
  cursor: not-allowed;
}

/* Coupon code input (was white by default) */
body.woocommerce-cart .coupon input.input-text,
body.woocommerce-cart .coupon input[name="coupon_code"] {
  background: rgba(0,0,0,.35) !important;
  border: 1px solid var(--erg-border) !important;
  color: var(--erg-text) !important;
  border-radius: 999px !important;
  padding: 10px 16px !important;
  min-height: 44px;
}
body.woocommerce-cart .coupon input.input-text::placeholder {
  color: var(--erg-muted) !important;
}

/* Apply coupon button (was white by default) */
body.woocommerce-cart .coupon button[name="apply_coupon"],
body.woocommerce-cart .coupon .button {
  background: linear-gradient(180deg, var(--erg-cta), var(--erg-cta-2)) !important;
  color: var(--erg-cta-contrast) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  font-weight: 900;
}

/* Cart totals panel (kills lingering white table blocks) */
body.woocommerce-cart .elementor-widget-woocommerce-cart .cart_totals,
body.woocommerce-cart .erg-cart-wrap .cart_totals {
  background: var(--erg-panel) !important;
  border: 1px solid var(--erg-border) !important;
  border-radius: var(--erg-radius) !important;
  padding: 22px 22px 28px;
  max-width: 1200px;
  margin: 26px auto 0;
}

body.woocommerce-cart .elementor-widget-woocommerce-cart .cart_totals table,
body.woocommerce-cart .elementor-widget-woocommerce-cart .cart_totals th,
body.woocommerce-cart .elementor-widget-woocommerce-cart .cart_totals td,
body.woocommerce-cart .erg-cart-wrap .cart_totals table,
body.woocommerce-cart .erg-cart-wrap .cart_totals th,
body.woocommerce-cart .erg-cart-wrap .cart_totals td {  border-color: var(--erg-line) !important;
  color: var(--erg-muted) !important;
}

/* Cart totals label + amounts */
body.woocommerce-cart .elementor-widget-woocommerce-cart .cart_totals th,
body.woocommerce-cart .erg-cart-wrap .cart_totals th {
  color: var(--erg-muted) !important;
  font-weight: 700;
}
body.woocommerce-cart .elementor-widget-woocommerce-cart .cart_totals td,
body.woocommerce-cart .erg-cart-wrap .cart_totals td {
  color: var(--erg-text) !important;
}
body.woocommerce-cart .elementor-widget-woocommerce-cart .cart_totals .order-total td,
body.woocommerce-cart .erg-cart-wrap .cart_totals .order-total td {
  color: var(--erg-text) !important;
  font-weight: 900;
}

/* Primary checkout CTA */
body.woocommerce-cart .woocommerce a.checkout-button,
body.woocommerce-cart .erg-cart-wrap .woocommerce a.checkout-button {
  background: linear-gradient(180deg, var(--erg-cta), var(--erg-cta-2)) !important;
  color: var(--erg-cta-contrast) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  padding: 18px 22px !important;
  font-family: var(--erg-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}


/* ------------------------------------------------------------------------
   3.5) Cart notices (remove white bars)
------------------------------------------------------------------------- */
body.woocommerce-cart .woocommerce-error,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-message {
  background: rgba(0, 0, 0, 0.30) !important;
  color: var(--erg-text) !important;
  border: 1px solid var(--erg-border) !important;
  border-left: 4px solid var(--erg-link) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

body.woocommerce-cart .woocommerce-error a,
body.woocommerce-cart .woocommerce-info a,
body.woocommerce-cart .woocommerce-message a {
  color: var(--erg-link-hover) !important;
}


/* ------------------------------------------------------------------------
   4) CHECKOUT (shortcode output)
------------------------------------------------------------------------- */
body.woocommerce-checkout .erg-checkout-wrap,
body.woocommerce-checkout .erg-checkout-wrap .woocommerce,
body.woocommerce-checkout .woocommerce-checkout {
  color: var(--erg-text);
}

/* Form fields */
body.woocommerce-checkout .woocommerce form .form-row label {
  color: var(--erg-muted);
  font-weight: 700;
}

body.woocommerce-checkout .woocommerce form .form-row input.input-text,
body.woocommerce-checkout .woocommerce form .form-row textarea,
body.woocommerce-checkout .woocommerce form .form-row select,
body.woocommerce-checkout .select2-container--default .select2-selection--single {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid var(--erg-border) !important;
  color: var(--erg-text) !important;
  border-radius: 999px !important;
  padding: 12px 16px !important;
  min-height: 46px;
}

body.woocommerce-checkout .woocommerce form .form-row textarea {
  border-radius: 18px !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

/* Required star */
body.woocommerce-checkout .woocommerce form .form-row .required {
  color: var(--erg-red) !important;
}

/* Panels: order review + payment */
body.woocommerce-checkout #order_review,
body.woocommerce-checkout .woocommerce-checkout-review-order {
  background: var(--erg-panel) !important;
  border: 1px solid var(--erg-border) !important;
  border-radius: var(--erg-radius) !important;
  padding: 22px;
}

body.woocommerce-checkout #order_review table,
body.woocommerce-checkout #order_review th,
body.woocommerce-checkout #order_review td {  border-color: var(--erg-line) !important;
}

body.woocommerce-checkout #order_review thead th {
  color: var(--erg-link);
  font-family: var(--erg-mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 700;
}

body.woocommerce-checkout #payment,
body.woocommerce-checkout #payment .payment_box {  border: 0 !important;
  box-shadow: none !important;
}

body.woocommerce-checkout #payment ul.payment_methods {
  border-top: 1px solid var(--erg-line) !important;
  border-bottom: 1px solid var(--erg-line) !important;
}

body.woocommerce-checkout #payment ul.payment_methods li label {
  color: var(--erg-text) !important;
  font-weight: 800;
}

/* Place order button */
body.woocommerce-checkout #place_order,
body.woocommerce-checkout .woocommerce button.button.alt {
  background: linear-gradient(180deg, var(--erg-cta), var(--erg-cta-2)) !important;
  color: var(--erg-cta-contrast) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 999px !important;
  padding: 18px 22px !important;
  font-family: var(--erg-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

/* Checkout notices (tone them down + remove white) */
body.woocommerce-checkout .woocommerce-error,
body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .woocommerce-message {
  background: rgba(0, 0, 0, 0.30) !important;
  color: var(--erg-text) !important;
  border: 1px solid var(--erg-border) !important;
  border-left: 4px solid var(--erg-link) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

body.woocommerce-checkout .woocommerce-error a,
body.woocommerce-checkout .woocommerce-info a,
body.woocommerce-checkout .woocommerce-message a {
  color: var(--erg-link-hover) !important;
}


/* ------------------------------------------------------------------------
   5) Responsive tweaks
------------------------------------------------------------------------- */
@media (max-width: 780px) {
  body.woocommerce-cart .elementor-widget-woocommerce-cart td.product-thumbnail a,
  body.woocommerce-cart .erg-cart-wrap td.product-thumbnail a {
    width: 84px;
    height: 64px;
  }

  body.woocommerce-cart .elementor-widget-woocommerce-cart input.qty,
  body.woocommerce-cart .erg-cart-wrap input.qty {
    width: 92px !important;
    min-width: 92px !important;
  }

  body.woocommerce-cart .elementor-widget-woocommerce-cart table.shop_table thead th,
  body.woocommerce-cart .erg-cart-wrap table.shop_table thead th {
    letter-spacing: 0.18em;
    font-size: 13px;
  }
}
/* ------------------------------------------------------------------------
   4.X) FFL Cockpit — Dark mode styling (checkout shortcode)
   ------------------------------------------------------------------------- */
body.woocommerce-checkout #ffl_container{
  background: rgba(0,0,0,0.55) !important;
  color: var(--erg-text) !important;
  border: 1px solid var(--erg-border) !important;
  border-radius: var(--erg-radius) !important;
  padding: 18px !important;
}

body.woocommerce-checkout .ffl-dealer-heading{
  color: var(--erg-text) !important;
}

body.woocommerce-checkout .ffl-list-div{
  background: rgba(0,0,0,0.40) !important;
  color: var(--erg-text) !important;
  border: 1px solid var(--erg-line) !important;
  border-radius: 18px !important;
}

/* Notice blocks (keep readable on dark) */
body.woocommerce-checkout .ffl_checkout_notice{
  background: rgba(255,255,255,0.06) !important;
  color: var(--erg-text) !important;
  border: 1px solid var(--erg-line) !important;
  border-left: 4px solid var(--erg-link) !important;
  border-radius: 18px !important;
  padding: 12px 14px !important;
}

body.woocommerce-checkout #ffl_container a{
  color: var(--erg-link-hover) !important;
}
/* ========================================================================
   P0 — g-FFL checkout module styling (dealer search + notices)
   Keeps compliance messaging readable, but matches ERG surfaces + buttons.
   Scope: checkout only
======================================================================== */

body.woocommerce-checkout #ffl_container,
body.woocommerce-checkout .ffl_container {
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--erg-radius);
}

/* Main dealer selector panel */
body.woocommerce-checkout #ffl_container {
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.035) 0, transparent 70%),
    var(--erg-panel);
  border: 1px solid var(--erg-line);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  padding: 18px 18px 16px;
  color: var(--erg-text);
}

body.woocommerce-checkout #ffl_container :is(h1,h2,h3,h4) {
  font-family: var(--erg-head);
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--erg-text);
}

/* Make any plugin “required” / warning strips match ERG danger styling */
body.woocommerce-checkout #ffl_container :is(.ffl_required, .ffl-required, .required, [class*="required"]) {
  background: rgba(226, 59, 59, .14);
  border: 1px solid rgba(226, 59, 59, .35);
  border-left: 6px solid var(--erg-red);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--erg-text);
}

/* Inputs/selects inside FFL module */
body.woocommerce-checkout #ffl_container :is(input[type="text"], input[type="search"], input[type="tel"], select) {
  width: 100%;
  background: color-mix(in srgb, var(--erg-panel) 65%, #000 35%);
  border: 1px solid var(--erg-line);
  color: var(--erg-text);
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
}

body.woocommerce-checkout #ffl_container :is(input[type="text"], input[type="search"], input[type="tel"], select):focus {
  border-color: color-mix(in srgb, var(--erg-cta) 55%, rgba(255,255,255,.14));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--erg-cta) 18%, transparent);
}

/* Buttons inside FFL module (Find FFL / in-store pickup, etc.) */
body.woocommerce-checkout #ffl_container :is(button, input[type="button"], input[type="submit"], a.button):not(.mapboxgl-ctrl-icon):not(.mapboxgl-ctrl-fullscreen):not(.mapboxgl-ctrl-zoom-in):not(.mapboxgl-ctrl-zoom-out):not(.mapboxgl-ctrl-compass):not(.mapboxgl-ctrl-geolocate) {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--erg-cta) 60%, rgba(255,255,255,.12));
  background: linear-gradient(180deg, var(--erg-cta), var(--erg-cta-2));
  color: var(--erg-cta-contrast);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

@media (hover:hover){
  body.woocommerce-checkout #ffl_container :is(button, input[type="button"], input[type="submit"], a.button):not(.mapboxgl-ctrl-icon):not(.mapboxgl-ctrl-fullscreen):not(.mapboxgl-ctrl-zoom-in):not(.mapboxgl-ctrl-zoom-out):not(.mapboxgl-ctrl-compass):not(.mapboxgl-ctrl-geolocate):hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 14px 34px rgba(0,0,0,.55);
  }
}

/* Dealer list rows (keep it readable + clickable) */
body.woocommerce-checkout #ffl_container :is(.ffl-list-div, .ffl_list_div, [class*="ffl-list"]) {
  background: color-mix(in srgb, var(--erg-panel-2) 88%, #000 12%);
  border: 1px solid var(--erg-line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 10px;
}

/* Map box / iframe / map container — prevent overflow + match radius */
body.woocommerce-checkout #ffl_container :is(iframe, .mapboxgl-map, [class*="map"], #map) {
  max-width: 100%;
  border-radius: 16px;
}

body.woocommerce-checkout #ffl_container :is(.mapboxgl-map, [class*="map"], #map) {
  overflow: hidden;
  border: 1px solid var(--erg-line);
}

/* The two “FFL / non-FFL items” notices on the right side */
body.woocommerce-checkout :is(.ffl_checkout_notice, [class*="ffl_checkout_notice"]) {
  background: color-mix(in srgb, var(--erg-panel) 78%, #000 22%);
  border: 1px solid var(--erg-line);
  border-left: 6px solid color-mix(in srgb, var(--erg-link) 55%, var(--erg-cta) 45%);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--erg-text);
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
}

body.woocommerce-checkout :is(.ffl_checkout_notice, [class*="ffl_checkout_notice"]) a {
  color: var(--erg-link);
  text-decoration: underline;
}
body.woocommerce-checkout :is(.ffl_checkout_notice, [class*="ffl_checkout_notice"]) a:hover {
  color: var(--erg-link-hover);
}
/* =========================================================
   ERG Checkout Layout Fixes (FFL / g-FFL friendly)
   ========================================================= */

/* 1) Force the *page* to read as a single column (Woo default is 2-col billing/shipping) */
.erg-checkout-page .woocommerce-checkout .col2-set,
.erg-checkout-page .woocommerce-checkout #customer_details{
  display: block;
  width: 100%;
}

.erg-checkout-page .woocommerce-checkout .col2-set .col-1,
.erg-checkout-page .woocommerce-checkout .col2-set .col-2,
.erg-checkout-page .woocommerce-checkout #customer_details .col-1,
.erg-checkout-page .woocommerce-checkout #customer_details .col-2{
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Keep spacing sane when shipping fields are toggled on */
.erg-checkout-page .woocommerce-checkout #customer_details .col-2{
  margin-top: 18px;
}

/* 2) g-FFL map fullscreen control: keep native icon (avoid “solid blue dot”) */
#ffl_container .mapboxgl-ctrl-group button.mapboxgl-ctrl-icon,
#ffl_container .mapboxgl-ctrl button.mapboxgl-ctrl-icon{
  /* Our CTA button styling must NEVER apply here */  background-color: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
  line-height: 1 !important;
  transform: none !important;
}

/* If the control sits inside a rounded "pill", keep it readable */
#ffl_container .mapboxgl-ctrl-group{
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--erg-line);
  background: rgba(0,0,0,0.40);
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

/* 3) Make the “REQUIRED” + “mixed cart” notices feel like a first-class step */
#ffl-required-notice,
#mixed_cart_notice,
#first_last_notice,
#ffl_checkout_notice,
#ffl_checkout_notice_ammo{
  border-radius: 18px !important;
  padding: 14px 16px !important;
  margin: 10px 0 14px !important;
  line-height: 1.35 !important;
  letter-spacing: 0.1px;
}

#ffl-required-notice{
  background: rgba(255, 62, 62, 0.14) !important;
  border: 1px solid rgba(255, 62, 62, 0.40) !important;
  border-left: 6px solid rgba(255, 62, 62, 0.95) !important;
}

#mixed_cart_notice{
  background: rgba(0, 172, 255, 0.10) !important;
  border: 1px solid rgba(0, 172, 255, 0.35) !important;
  border-left: 6px solid rgba(0, 172, 255, 0.85) !important;
}

#first_last_notice{
  background: rgba(255, 196, 0, 0.12) !important;
  border: 1px solid rgba(255, 196, 0, 0.35) !important;
  border-left: 6px solid rgba(255, 196, 0, 0.90) !important;
}

/* Make the keyword “REQUIRED” visually pop without changing copy */
#ffl-required-notice,
#ffl-required-notice *{
  font-weight: 600;
}

#ffl-required-notice::before{
  content: "FFL TRANSFER REQUIRED";
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.92);
}

/* If the map + dealer search sits in its own container, ensure it doesn’t get squeezed */
#ffl_container,
#ffl_container .ffl-search-fields,
#ffl_container #ffl_search_fields{
  width: 100%;
  max-width: 100%;
}

/* 3A) Ensure notice text is readable on dark (70 didn't set a text color) */
#ffl-required-notice,
#mixed_cart_notice,
#first_last_notice,
#ffl_checkout_notice,
#ffl_checkout_notice_ammo{
  color: var(--erg-text) !important;
}

#ffl-required-notice a,
#mixed_cart_notice a,
#first_last_notice a,
#ffl_checkout_notice a,
#ffl_checkout_notice_ammo a{
  color: var(--erg-link-hover) !important;
  text-decoration: underline;
}

#ffl-required-notice strong,
#mixed_cart_notice strong,
#first_last_notice strong,
#ffl_checkout_notice strong,
#ffl_checkout_notice_ammo strong{
  color: var(--erg-text) !important;
  font-weight: 800;
}



/* 4) Small-screen: keep the ERG checkout wrap padding from fighting Woo widths */
@media (max-width: 1024px){
  .erg-checkout-wrap{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* PAYMENT: fix Authorize.Net (and similar) credit card box */
body.woocommerce-checkout #payment div.payment_box,
body.woocommerce-checkout #payment .payment_box{
background: transparent !important;
border: 0 !important;
padding: 0 !important;
margin: 12px 0 0 !important;
}
body.woocommerce-checkout #payment div.payment_box::before,
body.woocommerce-checkout #payment .payment_box::before{
display: none !important;
}

/* Gateway fields are usually inside a fieldset and/or .wc-credit-card-form */
body.woocommerce-checkout #payment .payment_box fieldset,
body.woocommerce-checkout #payment .payment_box .wc-credit-card-form{
margin: 0 !important;
padding: 18px !important;
background: rgba(0,0,0,.32) !important;
border: 1px solid var(--erg-line) !important;
border-radius: 18px !important;
box-shadow: 0 18px 40px rgba(0,0,0,.25) !important;
}
body.woocommerce-checkout #payment .payment_box fieldset legend{
display: none !important;
}

/* Make sure plugin inputs don’t re-brighten */
body.woocommerce-checkout #payment .payment_box input.input-text,
body.woocommerce-checkout #payment .payment_box input[type="text"],
body.woocommerce-checkout #payment .payment_box input[type="tel"],
body.woocommerce-checkout #payment .payment_box input[type="email"],
body.woocommerce-checkout #payment .payment_box input[type="number"],
body.woocommerce-checkout #payment .payment_box select{
background: rgba(0,0,0,.45) !important;
color: var(--erg-text) !important;
border: 1px solid var(--erg-line) !important;
}
body.woocommerce-checkout #payment .payment_box ::placeholder{
color: rgba(255,255,255,.55) !important;
}


/* ------------------------------------------------------------------------
   6) Container width — widen to match site-wide layout (~1180 px)
   Elementor's e-con-boxed containers are set to ~900 px in the editor for
   the cart + checkout templates. We override the CSS custom property so
   Elementor's own inner-track calc also adapts — no need to fight it with
   hard pixel widths on every child.
------------------------------------------------------------------------ */
body.woocommerce-cart .erg-cart-wrap.e-con-boxed,
body.woocommerce-checkout .erg-checkout-wrap.e-con-boxed {
  --e-con-boxed-width: min(100%, 1180px) !important;
}

/* Inner track: let it fill the now-wider outer container */
body.woocommerce-cart .erg-cart-wrap > .e-con-inner,
body.woocommerce-checkout .erg-checkout-wrap > .e-con-inner {
  max-width: min(100%, 1180px) !important;
  width: 100% !important;
}

/* Elementor cart widget inner wrappers — unlock from their own fixed width */
body.woocommerce-cart .e-cart-layout-one-column,
body.woocommerce-cart .e-wc-cart {
  max-width: 100% !important;
  width: 100% !important;
}


/* ========================================================================
   7) WooCommerce Gift Cards plugin — dark theme (cart + checkout)
   Plugin: WooCommerce Gift Cards (WC_GC)
   Applies to: .add_gift_card_form on both pages
   ======================================================================== */

/* Section heading */
.add_gift_card_form h4 {
  color: var(--erg-muted);
  font-family: var(--erg-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0 0 10px;
}

/* Form row: input + button side by side */
#wc_gc_cart_redeem_form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Input — match coupon field style */
#wc_gc_cart_code {
  flex: 1 1 200px;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid var(--erg-border) !important;
  color: var(--erg-text) !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  min-height: 44px;
  font-family: var(--erg-body);
  font-size: 14px;
}

#wc_gc_cart_code::placeholder {
  color: var(--erg-muted) !important;
}

/* Apply button — match Apply coupon style */
#wc_gc_cart_redeem_send {
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--erg-cta), var(--erg-cta-2)) !important;
  color: var(--erg-cta-contrast) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 999px !important;
  padding: 10px 22px !important;
  min-height: 44px;
  font-weight: 900;
  font-family: var(--erg-body);
  white-space: nowrap;
  cursor: pointer;
}

#wc_gc_cart_redeem_send:hover {
  filter: brightness(1.08);
}

/* Notices inside gift card form */
.wc_gc_add_gift_card_form__notices {
  width: 100%;
  flex-basis: 100%;
}


/* ========================================================================
   8) Gift Cards Balance row — cart totals cleanup
   The Code / Remaining Balance metadata lines up awkwardly as bare <small>s;
   display them as clean stacked micro-lines below the amount.
   ======================================================================== */

body.woocommerce-cart .cart_totals tr.gift-card--balance td,
body.woocommerce-cart .cart_totals tr.gift-card td {
  color: var(--erg-text) !important;
  line-height: 1.5;
}

body.woocommerce-cart .cart_totals tr.gift-card--balance small,
body.woocommerce-cart .cart_totals tr.gift-card small {
  display: block;
  font-size: 11px;
  color: var(--erg-muted) !important;
  margin-top: 3px;
  line-height: 1.4;
}

body.woocommerce-cart .cart_totals tr.gift-card--balance small strong,
body.woocommerce-cart .cart_totals tr.gift-card small strong {
  color: var(--erg-muted) !important;
  font-weight: 600;
}

body.woocommerce-cart .cart_totals tr.gift-card--balance .woocommerce-Price-amount,
body.woocommerce-cart .cart_totals tr.gift-card .woocommerce-Price-amount {
  color: var(--erg-text) !important;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}


/* ========================================================================
   9) Checkout section headings — brand treatment
   WooCommerce outputs plain h3s for "Billing details", "Your order", etc.
   Override to match ERG uppercase / tracked heading style.
   ======================================================================== */

body.woocommerce-checkout .woocommerce-billing-fields > h3,
body.woocommerce-checkout h3#ship-to-different-address,
body.woocommerce-checkout .woocommerce-additional-fields > h3,
body.woocommerce-checkout h3#order_review_heading {
  font-family: var(--erg-head) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: var(--erg-link) !important;
  margin-bottom: 18px !important;
}