/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* =============================================================
   Wholesale Cart: Brand headers in cart table
   Match the look of the mini-cart brand header
   ============================================================= */

.woocommerce-cart-form .shop_table .woocommerce-cart-brand-header td {
	background-color: #f7f7f8; /* subtle grey like mini-cart */
	color: #6c757d;            /* muted text */
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: bolder;
	font-size: 1rem;
	padding: 10px 12px;
	border: none;
	border-top: 1px solid #e5e7eb; /* light separator */
    text-align: left; /* ensure brand header is left-aligned */

}

/* Remove top border for the first header in the table */
.woocommerce-cart-form .shop_table tbody tr.woocommerce-cart-brand-header:first-child td {
	border-top: 0;
}

/* Slight spacing before each brand group for readability */
.woocommerce-cart-form .shop_table tr.woocommerce-cart-brand-header td strong {
	display: inline-block;
	padding: 2px 0;
}

/* Optional: compact the row beneath brand headers a bit */
.woocommerce-cart-form .shop_table tr.woocommerce-cart-brand-header + tr.cart_item td {
	border-top: none;
}

/* Remove default table borders for a cleaner grouped look */
.woocommerce table.shop_table {
	border: none !important;
	box-shadow: none;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border: none;
}

/* =============================================================
   CODA row styling in cart table (match mini-cart discount line)
   ============================================================= */
.woocommerce-cart-form .shop_table tr.cart_item--coda td {
	background-color: #f7f7f8; /* same subtle grey as brand header to mark end of group */
}

.woocommerce-cart-form .shop_table .discount-line {
	display: flex;
	align-items: center;
	justify-content: flex-end; /* Right-align all content */
	gap: 8px;
	width: 100%;
}

.woocommerce-cart-form .shop_table .discount-line .discount-left {
	display: flex;
	align-items: center;
	gap: 1em;
	flex-shrink: 0;
}

.woocommerce-cart-form .shop_table .discount-line .discount-badge {
	background-color: #3b82f6; /* default blue badge */
	color: #fff;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 0.75rem;
	font-weight: 700;
	flex-shrink: 0;
}

/* Badge color variations */
.woocommerce-cart-form .shop_table .discount-line .discount-badge.blue {
	background-color: steelblue;
}

.woocommerce-cart-form .shop_table .discount-line .discount-badge.red {
	background-color: firebrick;
}

.woocommerce-cart-form .shop_table .discount-line .discount-badge.gold {
	background-color: darkgoldenrod;
}

.woocommerce-cart-form .shop_table .discount-line .discount-badge.plain {
	background-color: transparent;
	color: #6c757d; /* Match mini-cart muted text color */
	border: none; /* Remove border */
}

.woocommerce-cart-form .shop_table .discount-line .discount-desc {
	color: #6c757d;
	font-size: 0.75rem;
	flex-shrink: 0;
}

.woocommerce-cart-form .shop_table .discount-line .discount-amount {
	color: #dc3545; /* red */
	font-weight: normal; /* Match regular price styling */
	font-size: inherit; /* Inherit table font-size (smaller than 1rem) */
	text-align: right;
	flex-shrink: 0;
	margin-left: 1em;
}

.woocommerce-cart-form .shop_table .brand-coda-summary {
	font-size: 0.95rem;
}
.woocommerce-cart-form .shop_table .brand-coda-summary .coda-items-count {
	font-weight: 600;
}

/* Minimum order warning row (cart) */
.woocommerce-cart-form .shop_table tr.minimum-order-warning td,
.woocommerce-checkout-review-order .shop_table tr.minimum-order-warning td {
    background-color: #fee;
    border: none;
	color: #dc3545;
	font-weight: 600;
}
.woocommerce-cart-form .shop_table tr.minimum-order-warning td.product-price {
    text-align: right;
}
/* All discount lines are now right-aligned by default */
.woocommerce-cart-form .shop_table tr.minimum-order-warning .discount-amount {
    color: #dc3545;
    font-weight: 700;
}

/* =============================================================
   Thank You (Order Details) – match checkout grouping look
   Table: .woocommerce .order_details
   ============================================================= */
.woocommerce .order_details tr.woocommerce-order-brand-header td {
	background-color: #f7f7f8;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	font-size: 0.875rem;
	padding: 10px 12px;
	border: none;
	border-top: 1px solid #e5e7eb;
	text-align: left;
}

.woocommerce .order_details tr.woocommerce-order-brand-header + tr.cart_item td {
	border-top: none;
}

/* CODA row background */
.woocommerce .order_details tr.cart_item--coda td {
	background-color: #f7f7f8;
}

/* Discount line (badge, % off, amount) aligned right */
.woocommerce .order_details .discount-line {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}
.woocommerce .order_details .discount-line .discount-badge {
	background-color: #3b82f6; /* default blue badge */
	color: #fff;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 0.75rem;
	font-weight: 700;
	margin-right: 1em;
}

/* Badge color variations for order details */
.woocommerce .order_details .discount-line .discount-badge.blue {
	background-color: steelblue;
}

.woocommerce .order_details .discount-line .discount-badge.red {
	background-color: firebrick;
}

.woocommerce .order_details .discount-line .discount-badge.gold {
	background-color: darkgoldenrod;
}

.woocommerce .order_details .discount-line .discount-badge.plain {
	background-color: transparent;
	color: #6c757d; /* Match mini-cart muted text color */
	border: none; /* Remove border */
}
.woocommerce .order_details .discount-line .discount-desc {
	color: #6c757d;
	font-size: 0.8125rem;
}
.woocommerce .order_details .discount-line .discount-amount {
	color: #dc3545;
	font-weight: normal; /* Match regular price styling */
	font-size: inherit; /* Inherit table font-size */
	text-align: right;
	min-width: 100px;
}

.woocommerce .order_details .brand-coda-summary { font-size: 0.95rem; }
.woocommerce .order_details .brand-coda-summary .coda-items-count { font-weight: 600; }

/* Spacer row before totals on Thank You */
.woocommerce .order_details tr.woocommerce-order-summary-separator td { height: 12px; border: none; }

/* =============================================================
   Separator rows and spacing between brand groups
   ============================================================= */
   
/* Cart brand separator spacing */
.woocommerce-cart-form .shop_table tr.woocommerce-cart-brand-separator td {
	height: 16px;
	border: none;
}

/* Order details brand separator spacing */
.woocommerce .order_details tr.woocommerce-order-brand-separator td {
	height: 12px;
	border: none;
}

/* Checkout brand separator spacing */
.woocommerce-checkout tr.woocommerce-checkout-brand-separator td {
	height: 12px;
	border: none;
}

/* Mini-cart group separator spacing */
.mini-cart-group-separator td {
	height: 20px;
	border: none;
}

/* =============================================================
   Right-aligned CODA discount lines
   ============================================================= */

/* Cart CODA product-price cells right alignment */
.woocommerce-cart-form .shop_table tr.cart_item--coda td.product-price {
	text-align: right;
}

/* Order details CODA product-total cells right alignment */
.woocommerce .order_details tr.cart_item--coda td.product-total {
	text-align: right;
}

/* Checkout CODA product-total cells right alignment */
.woocommerce-checkout tr.cart_item--coda td.product-total {
	text-align: right;
}

/* =============================================================
   Checkout discount line styling (match cart and mini-cart)
   ============================================================= */
.woocommerce-checkout .shop_table .discount-line {
	display: flex;
	align-items: center;
	justify-content: flex-end; /* Right-align all content */
	gap: 8px;
	width: 100%;
}

.woocommerce-checkout .shop_table .discount-line .discount-left {
	display: flex;
	align-items: center;
	gap: 1em;
	flex-shrink: 0;
}

.woocommerce-checkout .shop_table .discount-line .discount-badge {
	background-color: #3b82f6; /* default blue badge */
	color: #fff;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 0.75rem;
	font-weight: 700;
	flex-shrink: 0;
}

/* Badge color variations for checkout */
.woocommerce-checkout .shop_table .discount-line .discount-badge.blue {
	background-color: steelblue;
}

.woocommerce-checkout .shop_table .discount-line .discount-badge.red {
	background-color: firebrick;
}

.woocommerce-checkout .shop_table .discount-line .discount-badge.gold {
	background-color: darkgoldenrod;
}

.woocommerce-checkout .shop_table .discount-line .discount-badge.plain {
	background-color: transparent;
	color: #6c757d; /* Match mini-cart muted text color */
	border: none; /* Remove border */
}

.woocommerce-checkout .shop_table .discount-line .discount-desc {
	color: #6c757d;
	font-size: 0.75rem;
	flex-shrink: 0;
}

.woocommerce-checkout .shop_table .discount-line .discount-amount {
	color: #dc3545; /* red */
	font-weight: normal; /* Match regular price styling */
	font-size: inherit; /* Inherit table font-size */
	text-align: right;
	flex-shrink: 0;
	margin-left: 1em;
}

/* =============================================================
   Mobile optimizations for grouped cart (<= 768px)
   Ensure CODA rows and brand headers render cleanly in responsive tables
   ============================================================= */
@media (max-width: 768px) {
	/* Brand header compact spacing */
	.woocommerce-cart-form .shop_table .woocommerce-cart-brand-header td {
		padding: 8px 12px;
		font-size: 0.8125rem;
	}

	/* Remove responsive label badges from CODA and headers (prevents stray colons) */
	.woocommerce-cart-form .shop_table.shop_table_responsive tr.cart_item--coda td::before,
	.woocommerce-cart-form .shop_table.shop_table_responsive tr.woocommerce-cart-brand-header td::before,
	.woocommerce-cart-form .shop_table.shop_table_responsive tr.woocommerce-cart-brand-separator td::before,
	.woocommerce table.shop_table_responsive tr.woocommerce-cart-brand-header td::before {
		content: '' !important;
	}

	/* Ensure brand header text is left-aligned on mobile */
	.woocommerce-cart-form .shop_table.shop_table_responsive tr.woocommerce-cart-brand-header td,
	.woocommerce table.shop_table_responsive tr.woocommerce-cart-brand-header td {
		text-align: left !important;
	}

	/* Hide the remove column in CODA rows to save space */
	.woocommerce-cart-form .shop_table tr.cart_item--coda td.product-remove { display: none; }

	/* Hide the remove column for all cart rows on mobile */
	.woocommerce-cart-form .shop_table tr.cart_item td.product-remove { display: none; }

	/* Inline remove button basic spacing only (inherit theme button styles) */
	.woocommerce-cart-form .shop_table .hmk-cart-remove-inline {
		display: inline-block;
		margin-right: 8px;
	}

	/* Stack coda cells nicely and span width */
	.woocommerce-cart-form .shop_table tr.cart_item--coda td.product-thumbnail,
	.woocommerce-cart-form .shop_table tr.cart_item--coda td.product-price {
		display: block;
		width: 100%;
		padding: 8px 12px;
		border-top: none;
	}

	.woocommerce-cart-form .shop_table tr.cart_item--coda td.product-price {
		text-align: right;
		padding-top: 0;
	}

	/* Tighten summary */
	.woocommerce-cart-form .shop_table .brand-coda-summary { font-size: 0.875rem; }
	.woocommerce-cart-form .shop_table .discount-line { gap: 8px; justify-content: flex-end; }
	/* Hide cosmetic CODA rows entirely on mobile */
	.woocommerce-cart-form .shop_table tr.cart_item--cosmetic { display: none; }
	/* Hide items-count and subtotal text inside CODA summary on mobile */
	.woocommerce-cart-form .shop_table .brand-coda-summary .coda-items-count,
	.woocommerce-cart-form .shop_table .brand-coda-summary .coda-separator,
	.woocommerce-cart-form .shop_table .brand-coda-summary .coda-subtotal { display: none; }

	/* Thank You (order details) mobile tweaks */
	.woocommerce table.shop_table_responsive.order_details tr.woocommerce-order-brand-header td::before { content: '' !important; }
	.woocommerce .order_details tr.woocommerce-order-brand-header td { text-align: left !important; padding: 8px 12px; font-size: 0.8125rem; }
	.woocommerce .order_details tr.cart_item--cosmetic { display: none; }
	.woocommerce .order_details .brand-coda-summary .coda-items-count,
	.woocommerce .order_details .brand-coda-summary .coda-separator,
	.woocommerce .order_details .brand-coda-summary .coda-subtotal { display: none; }
}

/* =============================================================
   Eligibility Notes - consistent styling across all templates
   ============================================================= */
.eligibility-note {
	color: #007bff; /* Bootstrap primary blue */
	font-style: italic;
	display: block;
	margin-top: 4px;
	font-size: 0.75rem;
	font-weight: 500; /* Medium weight for better contrast */
}