/**
 * Haddiction Cart — drawer styles.
 *
 * EVERY declaration carries !important, the same house rule as every other
 * haddiction plugin. haddiction.com runs Astra + Elementor, which restyle bare
 * <button>, <a> and bordered boxes inside our output and load after us, and
 * some of their own rules are already !important. Specificity alone does not
 * win that argument.
 *
 * Exempt, because no theme targets them: transition, animation,
 * overscroll-behavior and ::-webkit-scrollbar pseudo-elements.
 *
 * COLOURS AND SIZES COME FROM var(), set inline on the root element from the
 * settings. The fallback in each var() is what ships if that inline style is
 * ever missing - it is a safety net, not the default; the real default lives in
 * HADC_Settings::defaults(). This file is static and behind a seven-day CDN
 * cache, which is exactly why no setting may be written into it.
 */

/* --- The icon ----------------------------------------------------------- */

/* The icon states its own colour rather than inheriting it.
 *
 * inherit reads whatever the header happens to set, which on an Elementor
 * header can be a theme accent, white-on-dark, or nothing at all - and an SVG
 * drawn with currentColor then disappears. :hover and :focus are restated for
 * the same reason: Astra styles bare <a> and would otherwise recolour it. */
.hadc-icon,
.hadc-icon:visited,
.hadc-icon:hover,
.hadc-icon:focus,
.hadc-icon:active {
	align-items: center !important;
	box-shadow: none !important;
	color: var(--hadc-icon, #111111) !important;
	display: inline-flex !important;
	line-height: 1 !important;
	position: relative !important;
	text-decoration: none !important;
}

.hadc-icon-glyph {
	display: inline-flex !important;
}

/* The glyph is a FILLED path now, so fill is what colours it - and `stroke` is
   cleared rather than left alone, because the rule here used to set it for the
   old outline bag and a stroke on a filled path thickens every edge. Both are
   restated against a theme rule that targets svg inside a link directly. */
.hadc-icon-glyph svg {
	display: block !important;
	fill: var(--hadc-icon, #111111) !important;
	height: var(--hadc-icon-size, 24px) !important;
	stroke: none !important;
	width: var(--hadc-icon-size, 24px) !important;
}

/* THE COUNT SITS ON THE BAG'S TOP-RIGHT CORNER, not beside it.
 *
 * It used to be a flex sibling with a 6px gap, which made the link wider than
 * the icon and pushed whatever follows it in the header along every time
 * somebody added an item. Absolute takes it out of the flow: the link is now
 * exactly the glyph's width whether the cart holds nothing or eleven things.
 *
 * The negative offsets are deliberate overlap - a badge tucked inside the
 * glyph's box would sit on the bag itself and cover it. `.hadc-icon` is
 * already `position: relative`, which is what these are measured against.
 *
 * `transform: translate(50%, -50%)` is NOT used: the badge grows to the left
 * as the number gets wider (min-width plus padding), and a percentage
 * transform would move it as it grew, so a two-digit count would drift off the
 * corner. Pinning the right edge keeps the corner fixed and lets the width
 * run inwards. */
.hadc-icon-count {
	align-items: center !important;
	background: var(--hadc-badge-bg, #111827) !important;
	border-radius: 999px !important;
	color: var(--hadc-badge-text, #ffffff) !important;
	display: inline-flex !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	height: 18px !important;
	justify-content: center !important;
	line-height: 1 !important;
	min-width: 18px !important;
	padding: 0 5px !important;
	pointer-events: none !important;
	position: absolute !important;
	right: -8px !important;
	top: -7px !important;
}

/* An empty cart still renders the badge element so the fragment has something
   to replace, but it should not show a 0. */
.hadc-icon-count.is-empty {
	display: none !important;
}

/* --- Shell -------------------------------------------------------------- */

.hadc-root {
	bottom: 0 !important;
	left: 0 !important;
	position: fixed !important;
	right: 0 !important;
	top: 0 !important;
	/* Above Astra's sticky header, which lives in the 99xxx range. */
	z-index: var(--hadc-z, 999999) !important;
}

/* [hidden] comes from the browser's default stylesheet, which any
   display:…!important above outranks. Restate it or the drawer never closes. */
.hadc-root[hidden] {
	display: none !important;
}

.hadc-backdrop {
	background: var(--hadc-backdrop, rgba(12, 16, 24, .5)) !important;
	inset: 0 !important;
	opacity: 0 !important;
	position: absolute !important;
	transition: opacity .22s ease;
}

.hadc-root.is-open .hadc-backdrop {
	opacity: 1 !important;
}

.hadc-panel {
	background: var(--hadc-panel-bg, #ffffff) !important;
	bottom: 0 !important;
	box-sizing: border-box !important;
	color: var(--hadc-text, #111827) !important;
	display: flex !important;
	flex-direction: column !important;
	max-width: 100% !important;
	position: absolute !important;
	top: 0 !important;
	transition: transform .26s cubic-bezier(.22, .61, .36, 1);
	width: var(--hadc-w-desktop, 400px) !important;
}

/* Which edge it comes from. The shadow follows the panel, so it always falls
   across the page rather than off the side of the screen. */
.hadc-side-right .hadc-panel {
	box-shadow: -24px 0 60px rgba(12, 16, 24, .22) !important;
	right: 0 !important;
	transform: translateX(100%) !important;
}

.hadc-side-left .hadc-panel {
	box-shadow: 24px 0 60px rgba(12, 16, 24, .22) !important;
	left: 0 !important;
	transform: translateX(-100%) !important;
}

.hadc-root.is-open .hadc-panel {
	transform: translateX(0) !important;
}

/* Locks the page behind the drawer. overscroll-behavior stops a scroll that
   reaches the end of the drawer from carrying on down the page underneath. */
body.hadc-open {
	overflow: hidden !important;
}

/* --- Head --------------------------------------------------------------- */

.hadc-head {
	align-items: center !important;
	border-bottom: 1px solid var(--hadc-line, #e8eaee) !important;
	display: flex !important;
	flex: 0 0 auto !important;
	justify-content: space-between !important;
	padding: 16px 18px !important;
}

.hadc-title {
	color: var(--hadc-text, #111827) !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	line-height: 1.2 !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
}

/* --- Language switcher ---------------------------------------------------
   Sits between the title and the close button, pushed to the right by the
   title's own margin so it stays put whatever the title says. */

.hadc-langs {
	display: inline-flex !important;
	gap: 2px !important;
	margin: 0 8px 0 auto !important;
	padding: 2px !important;
	background: rgba(17, 24, 39, .06) !important;
	border-radius: 999px !important;
}

.hadc-lang {
	background: transparent !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	color: var(--hadc-muted, #6b7280) !important;
	cursor: pointer !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: .3px !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 6px 9px !important;
	text-transform: uppercase !important;
}

/* Only while the new language is on its way back. Pointer events off so a
   second tap cannot race the first; no spinner, because the swap takes about
   as long as the tap itself and a spinner would flash. */
.hadc-langs.is-busy {
	opacity: .6 !important;
	pointer-events: none !important;
}

.hadc-lang.is-on {
	background: var(--hadc-panel-bg, #fff) !important;
	box-shadow: 0 1px 2px rgba(12, 16, 24, .12) !important;
	color: var(--hadc-text, #111827) !important;
}

.hadc-close {
	background: transparent !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	color: var(--hadc-muted, #6b7280) !important;
	cursor: pointer !important;
	font-size: 26px !important;
	height: 34px !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
	width: 34px !important;
}

/* --- Body --------------------------------------------------------------- */

.hadc-body {
	flex: 1 1 auto !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
	padding: 0 !important;
}

.hadc-empty {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: 14px !important;
	margin: 0 !important;
	padding: 40px 18px !important;
	text-align: center !important;
}

.hadc-items {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* --- One line -----------------------------------------------------------
   The whole point of the gaps here being small and explicit: the stack of
   name / variation / price-and-quantity has to come out about as tall as the
   thumbnail beside it. When it is taller, the price drifts below the image and
   starts reading as though it belongs to the row underneath; when the gaps are
   loose, the text looks unrelated to the product it describes.

   align-items is flex-start so a two-line product name does not drag the image
   down the row, and nothing here uses margin collapsing - every gap is a
   stated margin on the element below it. */

.hadc-item {
	align-items: flex-start !important;
	border-bottom: 1px solid var(--hadc-line, #f1f2f4) !important;
	display: flex !important;
	gap: 12px !important;
	margin: 0 !important;
	padding: var(--hadc-row-pad, 12px) 18px !important;
	position: relative !important;
}

.hadc-item-media {
	flex: 0 0 var(--hadc-thumb, 72px) !important;
	width: var(--hadc-thumb, 72px) !important;
}

.hadc-item-media .hadc-item-img,
.hadc-item-media img {
	border: 1px solid var(--hadc-line, #eceef1) !important;
	border-radius: var(--hadc-thumb-radius, 10px) !important;
	display: block !important;
	/* Square, cropped. A tall or wide photo under object-fit:contain
	   letterboxes inside the box and reads as a small image floating in a
	   large empty one. */
	aspect-ratio: 1 / 1 !important;
	height: var(--hadc-thumb, 72px) !important;
	margin: 0 !important;
	max-width: var(--hadc-thumb, 72px) !important;
	object-fit: cover !important;
	padding: 0 !important;
	width: var(--hadc-thumb, 72px) !important;
}

/* The text block is a column at least as tall as the thumbnail, and the
   price/quantity row is pushed to its bottom with margin-top:auto. That is what
   actually keeps the price level with the bottom of the image: fixed gaps only
   line up for a one-line product name, and the moment a name wraps to two lines
   the price slides below the photo and starts reading as though it belongs to
   the row underneath. With this, the name may be one line or two and the row
   still lands on the same baseline as the image. */
.hadc-item-main {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	min-height: var(--hadc-thumb, 72px) !important;
	min-width: 0 !important;
}

/* Name, price and the remove button share one row. baseline, not center, so
   the price sits on the same line as the name rather than floating beside it. */
.hadc-item-head {
	align-items: baseline !important;
	display: flex !important;
	gap: 8px !important;
}

/* One line, then an ellipsis.
 *
 * min-width:0 is what makes that work at all: a flex item's default minimum is
 * the width of its content, so without it the name refuses to shrink, pushes
 * the price out of the row and never truncates - the single most common reason
 * text-overflow quietly does nothing inside flexbox. */
.hadc-item-name {
	color: var(--hadc-text, #111827) !important;
	display: block !important;
	flex: 1 1 auto !important;
	font-size: var(--hadc-name-size, 14px) !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	margin: 0 !important;
	min-width: 0 !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

.hadc-item-meta {
	color: var(--hadc-muted, #6b7280) !important;
	display: block !important;
	font-size: var(--hadc-meta-size, 12px) !important;
	line-height: 1.3 !important;
	margin-top: 1px !important;
}

/* Woo renders item data as a <dl>; flatten it so a variation reads as one
   quiet line rather than a definition list with its own margins. */
.hadc-item-meta dl,
.hadc-item-meta dt,
.hadc-item-meta dd,
.hadc-item-meta p {
	display: inline !important;
	line-height: 1.3 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* margin-top:auto, not a fixed gap. This is the half that does the aligning:
   it pushes the row to the bottom of a block that is already as tall as the
   thumbnail, so the price sits level with the bottom of the image whether the
   name took one line or two. */
.hadc-item-row {
	align-items: center !important;
	display: flex !important;
	gap: 10px !important;
	justify-content: space-between !important;
	margin-top: auto !important;
	padding-top: 6px !important;
}

.hadc-qty {
	align-items: center !important;
	border: 1px solid #d8dbe0 !important;
	border-radius: 999px !important;
	display: inline-flex !important;
	flex: 0 0 auto !important;
	overflow: hidden !important;
}

.hadc-qty-btn {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--hadc-text, #374151) !important;
	cursor: pointer !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	height: 28px !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
	width: 28px !important;
}

/* At the cap, + is visibly spent rather than silently doing nothing. */
.hadc-qty-btn[disabled] {
	cursor: default !important;
	opacity: .35 !important;
}

.hadc-qty-value {
	font-size: 13px !important;
	font-weight: 600 !important;
	min-width: 20px !important;
	text-align: center !important;
}

.hadc-item-remove {
	align-self: center !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #9ca3af !important;
	cursor: pointer !important;
	flex: 0 0 auto !important;
	font-size: 18px !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
}

/* While a line is being written to the server. Pointer events off so a double
   tap cannot queue two writes against the same row. */
.hadc-item.is-busy,
.hadc-bundle.is-busy {
	opacity: .55 !important;
	pointer-events: none !important;
}

/* --- Prices --------------------------------------------------------------
   The price itself is up on the name row. What stays down here is the
   explanation of it: the struck original and the saving, side by side at the
   right-hand end of the quantity row. */

.hadc-item-pricing {
	align-items: baseline !important;
	display: flex !important;
	gap: 7px !important;
	justify-content: flex-end !important;
	margin-left: auto !important;
	text-align: right !important;
}

/* flex:0 0 auto so it is never squeezed by a long name: the name gives way
   first, which is the whole point of giving it an ellipsis. */
.hadc-item-price {
	color: var(--hadc-text, #111827) !important;
	flex: 0 0 auto !important;
	font-size: var(--hadc-price-size, 14px) !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	margin-left: auto !important;
	white-space: nowrap !important;
}

.hadc-item-was {
	color: var(--hadc-muted, #9ca3af) !important;
	font-size: calc(var(--hadc-price-size, 14px) - 2px) !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	text-decoration: line-through !important;
	white-space: nowrap !important;
}

.hadc-item-save {
	color: var(--hadc-save, #1a7f4f) !important;
	display: inline-block !important;
	flex: 0 0 auto !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	white-space: nowrap !important;
}

/* --- Bundles ------------------------------------------------------------- */

/* One card, so three cart lines read as the one thing the customer bought. */
.hadc-bundle {
	background: var(--hadc-bundle-bg, #f7f8fa) !important;
	border: 1px solid var(--hadc-bundle-line, #e6e8ec) !important;
	border-radius: 14px !important;
	list-style: none !important;
	margin: 14px 18px !important;
	overflow: hidden !important;
	padding: 0 !important;
}

.hadc-bundle-head {
	align-items: center !important;
	display: flex !important;
	justify-content: space-between !important;
	padding: 10px 14px !important;
}

.hadc-bundle-label {
	color: var(--hadc-bundle-label, #264487) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .2px !important;
	line-height: 1.2 !important;
	text-transform: none !important;
}

.hadc-bundle-items {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Inside the card the rows are quieter: no border between them and no card
   background of their own, so the group reads as one block. */
.hadc-bundle-items .hadc-item {
	background: transparent !important;
	border-bottom: 0 !important;
	padding: 6px 14px !important;
}

.hadc-bundle-items .hadc-item:last-child {
	padding-bottom: 12px !important;
}

.hadc-item-qty-flat {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
}

.hadc-bundle-foot {
	align-items: baseline !important;
	border-top: 1px solid var(--hadc-bundle-line, #e6e8ec) !important;
	display: flex !important;
	justify-content: space-between !important;
	padding: 10px 14px !important;
}

/*
 * A coupon's before-and-after, wherever it appears: a line price, a bundle
 * foot, the subtotal.
 *
 * `<ins>` is underlined by the BROWSER's default stylesheet, which reads as a
 * link on a price, so it is reset explicitly. Everything in this file carries
 * !important for Elementor's sake, and that makes the browser default lose
 * either way - but stating it is what keeps the price from looking clickable.
 */
.hadc-item-price-was,
.hadc-total-was {
	color: var(--hadc-muted, #6b7280) !important;
	font-weight: 600 !important;
	margin-right: 4px !important;
	text-decoration: line-through !important;
}

.hadc-item-price-now,
.hadc-total-now {
	background: none !important;
	color: inherit !important;
	text-decoration: none !important;
}

.hadc-item-price-was .amount,
.hadc-total-was .amount {
	color: inherit !important;
	font-weight: inherit !important;
}

.hadc-bundle-total-label {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
}

.hadc-bundle-total {
	color: var(--hadc-text, #111827) !important;
	font-size: 15px !important;
	font-weight: 800 !important;
}

/* --- Foot --------------------------------------------------------------- */

.hadc-foot {
	border-top: 1px solid var(--hadc-line, #e8eaee) !important;
	flex: 0 0 auto !important;
	padding: 14px 18px 18px !important;
}

.hadc-totals {
	align-items: baseline !important;
	display: flex !important;
	justify-content: space-between !important;
	margin: 0 0 12px !important;
}

.hadc-totals-label {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}

.hadc-totals-value {
	color: var(--hadc-text, #111827) !important;
	font-size: 17px !important;
	font-weight: 800 !important;
}

.hadc-checkout {
	background: var(--hadc-accent-bg, #111827) !important;
	border: 0 !important;
	border-radius: var(--hadc-btn-radius, 12px) !important;
	box-shadow: none !important;
	color: var(--hadc-accent-text, #ffffff) !important;
	display: block !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	padding: 15px 18px !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	width: 100% !important;
}

/* Renders as a <button> when it only closes the drawer and an <a> when it has
   somewhere to go, so both are styled. */
.hadc-continue {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--hadc-muted, #6b7280) !important;
	cursor: pointer !important;
	display: block !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	margin: 10px auto 0 !important;
	padding: 4px 8px !important;
	text-align: center !important;
	text-decoration: underline !important;
	text-transform: none !important;
	width: auto !important;
}

/* --- Wallet buttons (Apple Pay / Google Pay) -----------------------------
   The row is `hidden` in the markup and only revealed once Stripe reports a
   wallet actually exists on this device, so most of this never paints on a
   desktop with no saved card.

   The `[hidden]` rule is not redundant: every declaration in this stylesheet
   carries !important because Elementor restyles bare elements, and a
   `display: … !important` anywhere in here outranks the browser's own
   behaviour for the hidden attribute. Restating it is what keeps `hidden`
   meaning hidden - the same trap the Meal Builder and the weight tracker
   both hit. */

.hadc-express {
	display: block !important;
	margin: 10px 0 0 !important;
	padding: 0 !important;
}

.hadc-express[hidden] {
	display: none !important;
}

/* A PLAIN BLOCK AT FULL WIDTH. Do not make this a flex container.
   Stripe's Express Checkout Element measures its own container to decide how
   many buttons fit on a row. A flex parent - which 0.12.1 used, to centre a
   lone wallet - gives it a shrink-to-fit width it cannot reason about, so it
   gives up on one row, stacks Apple Pay and Google Pay vertically and adds a
   "See more" control. The buttons were never misaligned; they were being told
   there was no room.

   Centring is not needed here either: the element fills the row and lays its
   own buttons out inside it, exactly as `layout: { maxColumns: 2, maxRows: 1 }`
   in drawer.js asks for. */
.hadc-express-mount {
	display: block !important;
	min-height: 42px !important;
	width: 100% !important;
}

/* The iframe Stripe mounts does not reliably take the full width of the box it
   is given - it comes out a little narrower and left-aligned, so the slack
   shows as extra space to the RIGHT of the last button and the row stops short
   of the checkout button above it. Forcing the width closes it.

   This is not a guess: FunnelKit's own gateway does the same two declarations
   on the same iframe (`width: 100%` and `margin: 0`, both !important) wherever
   it mounts one. `.__PrivateStripeElement` is the wrapper Stripe puts inside,
   and it carries its own margin.

   Note this styles the CHILD, after Stripe has measured. The container above
   stays a plain block - making THAT flex is what stacked the buttons in
   0.12.1. */
.hadc-express-mount iframe {
	margin: 0 !important;
	width: 100% !important;
}

.hadc-express-mount .__PrivateStripeElement {
	margin: 0 !important;
	width: 100% !important;
}

.hadc-express-error {
	color: #b42318 !important;
	font-size: 12px !important;
	line-height: 1.4 !important;
	margin: 8px 0 0 !important;
	text-align: center !important;
}

.hadc-express-error:empty {
	display: none !important;
}

/* --- FunnelKit belt ------------------------------------------------------
   The PHP dequeues FunnelKit's assets for previewing users, which is the real
   fix. This is the belt for the case where its handles differ from our guesses
   and its markup still lands on the page: a visible second cart is worse than
   a missing one. Scoped to the body class so it can never affect a customer. */

body.hadc-active .fkcart-preview-ui,
body.hadc-active .fkcart-slide-cart,
body.hadc-active .fkcart-modal,
body.hadc-active #fkcart-modal {
	display: none !important;
	visibility: hidden !important;
}

/* On a phone the drawer is a percentage of the screen, so a strip of the page
   stays visible behind it and it reads as an overlay you can dismiss rather
   than a page you have navigated to. 768px rather than 440px because a tablet
   in portrait wants the same thing. */
@media (max-width: 768px) {
	.hadc-panel {
		width: var(--hadc-w-mobile, 75%) !important;
	}
}

/* --- Coupon --------------------------------------------------------------
   Collapsed until asked for: a discount box on display invites every shopper
   to go hunting for a code they do not have, and leave to find one. */

.hadc-coupon {
	border-bottom: 1px solid var(--hadc-line, #e8eaee) !important;
	margin: 0 0 12px !important;
	padding: 0 0 12px !important;
}

.hadc-coupon-toggle {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--hadc-muted, #6b7280) !important;
	cursor: pointer !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: left !important;
	text-decoration: underline !important;
	text-transform: none !important;
	width: auto !important;
}

.hadc-coupon-body {
	display: none !important;
	margin-top: 10px !important;
}

.hadc-coupon.is-open .hadc-coupon-body {
	display: block !important;
}

.hadc-coupon-form {
	display: flex !important;
	gap: 8px !important;
	margin: 0 !important;
}

/* 16px, and not a pixel less.
 *
 * Safari on iOS zooms the whole page in when a text field smaller than 16px
 * takes focus, and it does NOT zoom back out afterwards - so a 14px box meant
 * one tap left the drawer stretched off the screen and the layout apparently
 * broken. This is the only reason for the size: it is a platform rule, not a
 * design choice, and it applies to every text input this drawer ever adds. */
.hadc-coupon-input {
	background: var(--hadc-panel-bg, #fff) !important;
	border: 1px solid #d8dbe0 !important;
	border-radius: var(--hadc-btn-radius, 12px) !important;
	box-shadow: none !important;
	color: var(--hadc-text, #111827) !important;
	flex: 1 1 auto !important;
	font-size: 16px !important;
	margin: 0 !important;
	min-width: 0 !important;
	padding: 11px 12px !important;
	text-transform: uppercase !important;
	width: auto !important;
}

.hadc-coupon-apply {
	background: transparent !important;
	border: 1px solid var(--hadc-accent-bg, #111827) !important;
	border-radius: var(--hadc-btn-radius, 12px) !important;
	box-shadow: none !important;
	color: var(--hadc-accent-bg, #111827) !important;
	cursor: pointer !important;
	flex: 0 0 auto !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	margin: 0 !important;
	padding: 11px 16px !important;
	text-transform: none !important;
	width: auto !important;
}

.hadc-coupon.is-busy {
	opacity: .6 !important;
	pointer-events: none !important;
}

/* Empty by default, and empty is invisible: no reserved gap under the field
   for a message that is not there. */
.hadc-coupon-error:empty,
.hadc-coupon-note:empty,
.hadc-coupon-list:empty {
	display: none !important;
}

/*
 * A cart that cannot take any code shows a sentence where the field was.
 *
 * The toggle and the input are hidden rather than not rendered, because they
 * cannot be fragments: the footer sits outside the replaced body so that a
 * half-typed code survives a quantity tap. The class is put on by the drawer
 * script from the blocked panel's own contents.
 */
.hadc-coupon-blocked:empty {
	display: none !important;
}

.hadc-coupon-blocked p {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: 12px !important;
	line-height: 1.35 !important;
	margin: 0 !important;
}

/* Naming a line the shopper can remove keeps the red the error used to have. */
.hadc-coupon-blocked.is-product p {
	color: #b32d2e !important;
}

.hadc-coupon.is-blocked .hadc-coupon-toggle,
.hadc-coupon.is-blocked .hadc-coupon-body {
	display: none !important;
}

/*
 * The standing bundle note steps aside while there is a real error.
 *
 * Toggled by a class, not by jQuery's .hide(): everything here is !important
 * for Elementor's sake, and an inline display from JavaScript would be the one
 * rule in the drawer that a theme could outrank.
 */
.hadc-coupon-note.is-hidden {
	display: none !important;
}

.hadc-coupon-error {
	color: #b32d2e !important;
	font-size: 12px !important;
	line-height: 1.35 !important;
	margin: 8px 0 0 !important;
}

.hadc-coupon-note p {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: 12px !important;
	line-height: 1.35 !important;
	margin: 8px 0 0 !important;
}

.hadc-coupon-row {
	align-items: center !important;
	display: flex !important;
	gap: 8px !important;
	margin-top: 10px !important;
}

.hadc-coupon-code {
	color: var(--hadc-text, #111827) !important;
	flex: 1 1 auto !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	min-width: 0 !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

.hadc-coupon-amount {
	color: var(--hadc-save, #1a7f4f) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	white-space: nowrap !important;
}

.hadc-coupon-off {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #9ca3af !important;
	cursor: pointer !important;
	font-size: 16px !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 2px !important;
	text-transform: none !important;
}

/* --- Free shipping progress: it IS the checkout button -------------------
 *
 * The standalone bar is gone. It used to sit at the top of the panel with a
 * track, two dots and the amounts hanging beneath, and it was accurate and
 * too much: a 400px drawer that already carries a bundle card, a coupon row
 * and an order bump cannot also give its most valuable space to one sentence.
 *
 * So the progress is drawn on the thing the shopper is already looking at.
 * Three pieces:
 *
 *   - .hadc-checkout-fill is an absolutely positioned green layer whose WIDTH
 *     is the percentage. Width, not a clip, because there is no gradient to
 *     keep mapped any more - it is one flat green - and width is what
 *     transitions most cheaply.
 *   - .hadc-checkout-text sits above it, so the label never moves as the fill
 *     grows underneath.
 *   - .is-done sets the width to 100%, which is the whole button green. That
 *     is the one state worth being unmistakable.
 *
 * The label stays WHITE throughout, which is why the fill can pass under it
 * without a colour change: white reads on the dark button and on the green.
 */

.hadc-checkout.has-ship {
	overflow: hidden !important;
	padding: 11px 20px !important;
	position: relative !important;
}

.hadc-checkout-fill {
	background: var(--hadc-ship-green, #22c55e) !important;
	border: 0 !important;
	bottom: 0 !important;
	display: block !important;
	left: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	position: absolute !important;
	top: 0 !important;
	width: var(--hadc-ship-pct, 0%) !important;
}

/* Exempt, per the house rule: no theme targets a transition. */
.hadc-checkout-fill {
	transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.hadc-checkout.is-done .hadc-checkout-fill {
	width: 100% !important;
}

.hadc-checkout-text {
	display: block !important;
	position: relative !important;
	z-index: 1 !important;
}

.hadc-checkout-main {
	display: block !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
}

/* 11px and not bold: this is context for the button, not a second button.
   White at 85% rather than the muted grey, because the muted grey was chosen
   to sit on the white panel and would disappear on both the dark button and
   the green. */
.hadc-checkout-ship {
	display: block !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: .1px !important;
	line-height: 1.3 !important;
	margin: 2px 0 0 !important;
	opacity: .85 !important;
	text-transform: none !important;
}

/* The old bar's node is still in the fragment set so a payload cached before
   this update cannot leave a dead bar behind. It renders empty and hidden;
   this is the belt in case something re-injects the old markup, because a
   `display: … !important` rule anywhere in this file outranks the browser's
   own handling of the hidden attribute. */
.hadc-ship {
	display: none !important;
}

/* --- Order bump ---------------------------------------------------------
 *
 * One card, in the drawer's own language: the same radius, the same muted
 * eyebrow, the same thumbnail size as a cart line, so it reads as part of the
 * cart rather than an advert dropped into it.
 */

.hadc-bump {
	padding: 0 20px 14px !important;
}

.hadc-bump:empty {
	display: none !important;
}

.hadc-bump-eyebrow {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: var(--hadc-meta-size, 12px) !important;
	font-weight: 700 !important;
	letter-spacing: .3px !important;
	margin: 0 0 8px !important;
	text-transform: uppercase !important;
}

.hadc-bump-card {
	align-items: center !important;
	background: var(--hadc-bundle-bg, #f7f8fa) !important;
	border: 1px solid var(--hadc-bundle-line, #e6e8ec) !important;
	border-radius: var(--hadc-thumb-radius, 10px) !important;
	display: flex !important;
	gap: 12px !important;
	padding: 10px !important;
}

.hadc-bump-media {
	flex: 0 0 auto !important;
	height: 48px !important;
	width: 48px !important;
}

.hadc-bump-media img {
	border-radius: 8px !important;
	display: block !important;
	height: 100% !important;
	object-fit: cover !important;
	width: 100% !important;
}

/* min-width:0 or the name cannot ellipsis inside a flex row. */
.hadc-bump-main {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	gap: 2px !important;
	min-width: 0 !important;
}

.hadc-bump-name {
	color: var(--hadc-text, #111827) !important;
	font-size: var(--hadc-name-size, 14px) !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

.hadc-bump-price {
	color: var(--hadc-muted, #6b7280) !important;
	font-size: var(--hadc-meta-size, 12px) !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
}

.hadc-bump-price del {
	opacity: .6 !important;
}

.hadc-bump-add {
	background: var(--hadc-accent-bg, #111827) !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: var(--hadc-accent-text, #fff) !important;
	cursor: pointer !important;
	flex: 0 0 auto !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	padding: 10px 16px !important;
}

.hadc-bump-add.is-busy,
.hadc-bump-add[disabled] {
	opacity: .55 !important;
	pointer-events: none !important;
}
