/* ---- Buy Now button -----------------------------------------------------
   Sits right next to the (relabelled) Add to Cart button, inside the same
   form. Given the theme's own "organ_btn" class (in the PHP that outputs
   it) so it always inherits the exact same pill shape/size/height as the
   theme's real Add to Cart button - only colour is overridden here, so
   this can't fall out of sync if the theme's own button styling changes.
   Visually distinct (outlined, brand green) so the two read as two
   different actions, not a single confusing button. If it wraps onto its
   own line at narrower widths, the top margin keeps it from sitting flush
   against Add to Cart. */
.dg-buy-now-btn{margin-left:10px;margin-top:10px;background:#fff !important;color:#1E8A7A !important;border:2px solid #1E8A7A !important;}
.dg-buy-now-btn:hover{background:#1E8A7A !important;color:#fff !important;}

/* ---- Big, hard-to-miss cart bar ------------------------------------------
   Deliberately NOT a small icon tucked into the header - a large fixed
   pill, top-right, with item count and running subtotal always visible
   once anything is in the cart. Hidden on the Bulk Order page itself (see
   dg_store_ux_should_show_cart_bar()), which already has its own big fixed
   summary bar - and hidden here too when the cart is empty, so it never
   shows as an inviting-looking button with nothing behind it.
   Top-right (moved from bottom-left in 1.5.0) and coloured in the real
   sampled logo wordmark orange (#C06024, see dg-brand-assets/BRAND_NOTES.md)
   rather than the site's teal, specifically so it reads as a distinct,
   easy-to-spot call to action against the green/white header and doesn't
   blend into any of the site's existing teal/green buttons.
   body.admin-bar bumps the top offset down so it clears the WP admin
   toolbar (32px desktop / 46px <783px) when a logged-in admin is previewing
   the site - customers never see the admin bar, so they always get the
   plain 16px offset. */
.dg-cart-bar{position:fixed;right:16px;top:16px;left:auto;bottom:auto;z-index:99980;font-family:inherit;transition:opacity 0.2s ease,transform 0.2s ease;}
.dg-cart-bar.dg-cart-bar-hidden{opacity:0;pointer-events:none;transform:translateY(-8px);}
body.admin-bar .dg-cart-bar{top:48px;}
.dg-cart-bar-link{display:flex;align-items:center;gap:12px;background:#C06024;color:#fff;text-decoration:none;padding:12px 22px 12px 18px;border-radius:999px;box-shadow:0 8px 24px rgba(0,0,0,0.3);font-size:16px;font-weight:700;}
.dg-cart-bar-link:hover{background:#9A4D1D;color:#fff;}
.dg-cart-bar-icon{font-size:22px;line-height:1;}
.dg-cart-bar-count{background:#fff;color:#C06024;border-radius:50%;min-width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;padding:0 4px;}
.dg-cart-bar-text{display:flex;flex-direction:column;line-height:1.2;}
.dg-cart-bar-label{font-size:15px;}
.dg-cart-bar-total{font-size:13px;font-weight:600;opacity:0.9;}
@media (max-width:480px){
	.dg-cart-bar{right:10px;top:10px;}
	body.admin-bar .dg-cart-bar{top:54px;}
	.dg-cart-bar-link{padding:10px 16px 10px 14px;gap:9px;}
	.dg-cart-bar-label{font-size:14px;}
}

/* ---- Cart Totals / Checkout safety net --------------------------------
   Renders as a clean, self-contained card so it reads as an intentional
   part of the page rather than a foreign injected box, regardless of the
   surrounding theme's own styling. Uses WooCommerce's own real markup/
   classes underneath (.cart_totals, .checkout-button etc.) so shipping
   calc, coupon field, and the Proceed to Checkout link all behave exactly
   as they do anywhere else on a standard WooCommerce site. */
.dg-cart-totals-safetynet{max-width:480px;margin:24px auto 40px;}
.dg-cart-totals-safetynet[hidden]{display:none !important;}
.dg-safetynet-collaterals{background:#fff;border:1px solid #e0e0e0;border-radius:10px;padding:20px 24px 24px;box-shadow:0 2px 10px rgba(0,0,0,0.06);}
.dg-safetynet-totals h2{margin:0 0 14px;font-size:19px;color:#2b2b2b;}
.dg-safetynet-totals table.shop_table{width:100%;border-collapse:collapse;margin-bottom:14px;}
.dg-safetynet-totals table.shop_table th,
.dg-safetynet-totals table.shop_table td{padding:10px 4px;border-bottom:1px solid #eee;text-align:left;color:#262626;}
.dg-safetynet-totals table.shop_table th{font-weight:600;}
.dg-safetynet-totals table.shop_table td{text-align:right;}
.dg-safetynet-totals .order-total th,
.dg-safetynet-totals .order-total td{font-weight:800;font-size:17px;border-bottom:none;}
.dg-safetynet-totals .wc-proceed-to-checkout{margin-top:6px;}
.dg-safetynet-totals a.checkout-button{display:block;width:100%;text-align:center;padding:14px;background:#1E8A7A;color:#fff !important;border-radius:8px;font-size:16px;font-weight:700;text-decoration:none;box-sizing:border-box;}
.dg-safetynet-totals a.checkout-button:hover{background:#166b5e;}
.dg-safetynet-totals .woocommerce-shipping-calculator{margin-top:10px;font-size:13px;}
.dg-safetynet-totals .woocommerce-shipping-calculator a{color:#1E8A7A;}

/* ---- Shared guidance popup (1.4.0) ---------------------------------------
   Used both to replace WooCommerce's native, page-freezing alert() for
   "please choose a weight/option first", and to explain the new retail/
   bulk cart-separation rule - see dg-store-ux.js. Colours are sampled from
   the real DG logo/site chrome (see dg-brand-assets/BRAND_NOTES.md): the
   button green (#62A403) is the site's own live CTA green, the icon green
   (#4A7A1C) is the logo wordmark's olive green, and the body font matches
   the site's own Georgia serif stack so the popup never looks bolted-on. */
.dg-modal-overlay{position:fixed;inset:0;z-index:999990;display:flex;align-items:center;justify-content:center;background:rgba(20,20,15,0);padding:20px;box-sizing:border-box;opacity:0;transition:opacity 0.18s ease;}
.dg-modal-overlay.dg-modal-visible{background:rgba(20,20,15,0.55);opacity:1;}
body.dg-modal-open{overflow:hidden;}
/* 1.6.2: a solid logo-orange border, matching the same #C06024 border now
   used on every dg-bulk-orders popup, so every popup across the site reads
   as one consistent, on-brand family instead of a plain white box. */
.dg-modal{background:#fff;border-radius:14px;border:3px solid #C06024;max-width:420px;width:100%;padding:32px 28px 26px;box-shadow:0 20px 60px rgba(0,0,0,0.3);position:relative;font-family:Georgia,"Times New Roman",Times,serif;transform:translateY(10px) scale(0.98);opacity:0;transition:transform 0.2s ease,opacity 0.2s ease;text-align:center;}
.dg-modal-overlay.dg-modal-visible .dg-modal{transform:translateY(0) scale(1);opacity:1;}
.dg-modal-close{position:absolute;top:10px;right:12px;background:none;border:none;font-size:26px;line-height:1;color:#999;cursor:pointer;padding:6px;}
.dg-modal-close:hover{color:#333;}
.dg-modal-icon{width:56px;height:56px;margin:0 auto 16px;border-radius:50%;background:#eef2e4;color:#4A7A1C;display:flex;align-items:center;justify-content:center;}
.dg-modal-icon svg{width:28px;height:28px;}
.dg-modal-title{margin:0 0 10px;font-size:21px;color:#242118;font-weight:700;}
.dg-modal-message{margin:0 0 24px;font-size:15px;line-height:1.55;color:#4a4a42;white-space:pre-line;}
.dg-modal-actions{display:flex;flex-direction:column;gap:10px;}
.dg-modal-btn{display:inline-block;width:100%;box-sizing:border-box;padding:13px 20px;border-radius:8px;font-size:15px;font-weight:700;font-family:inherit;cursor:pointer;text-decoration:none;border:2px solid transparent;transition:background 0.15s ease,color 0.15s ease;}
.dg-modal-btn-primary{background:#62A403;color:#fff !important;}
.dg-modal-btn-primary:hover{background:#4d8102;}
.dg-modal-btn-secondary{background:#fff;color:#5a5a52 !important;border-color:#ddd;}
.dg-modal-btn-secondary:hover{background:#f4f4f0;}
.dg-field-highlight{outline:3px solid #62A403 !important;outline-offset:2px;border-radius:4px;}
@media (max-width:480px){
	.dg-modal{padding:26px 20px 20px;border-radius:12px;}
	.dg-modal-title{font-size:19px;}
}
