/* T03 (inc/ux2/t03-toolbar-actions.php), Lovable Sample Finder 4 Nov.
 * Px only (html{font-size:10px}); selectors over-qualified on purpose (legacy button rules and
 * sf-toolbar.css / table-actions.css !important rules). */

/* --- 1. Toolbar actions: ToolbarAction.tsx -------------------------------------------------
 * `h-auto min-h-11 flex-col items-center justify-center gap-0.5 rounded-md px-2.5 py-1 text-[11px]
 *  font-medium leading-none text-muted-foreground hover:bg-muted hover:text-foreground`,
 *  icon 18px in text-foreground over the label. No border, no fill. */
body .sb-sf .sb-tb .sb-tb__right {
	gap: 0 !important;
	align-items: center;
}
body .sb-sf .sb-tb .sb-tb__right .sb-tb__cols {
	display: inline-flex;
}
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn,
body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn {
	box-sizing: border-box;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 44px !important;
	margin: 0 !important;
	padding: 4px 10px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #5b6577 !important;
	font-family: Inter, system-ui, sans-serif !important;
	font-size: 11px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease;
}
/* Icon row over a label row; "Columns" and "· 22" share the label row. */
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn {
	display: inline-grid !important;
	grid-template-columns: auto auto;
	justify-content: center;
	justify-items: center;
	align-content: center;
	row-gap: 2px;
	column-gap: 3px;
}
body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn {
	display: inline-flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn > svg,
body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn > svg {
	grid-column: 1 / -1;
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	color: #141d2e;
	flex: none;
}
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn > span:only-of-type {
	grid-column: 1 / -1;
}
/* The labels are always shown (the phone rule hid "Copy link"/"Export CSV" text). */
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn .sb-tb-btn__text {
	position: static !important;
	display: inline !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	overflow: visible !important;
	clip: auto !important;
	white-space: nowrap !important;
}
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn .sb-tb-btn__n {
	color: inherit !important;
	font-weight: 500 !important;
}
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn:hover:not([disabled]),
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn[aria-expanded="true"],
body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn:hover {
	background: #f1f5f9 !important;
	color: #141d2e !important;
}
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn:focus-visible,
body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn:focus-visible {
	outline: 2px solid #07038c !important;
	outline-offset: 0;
}
body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}
/* Notify me / Save search when on: the icon fills, the label goes navy. */
body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn[aria-pressed="true"] {
	color: #07038c !important;
}
body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn[aria-pressed="true"] > svg {
	color: #07038c;
	fill: currentColor;
}

/* --- 2. The count, back at the right end of the filter row --------------------------------- */
body .sb-sf .sb-tb.sb-tq-rows .sb-tb__bar > span.sb-t03-count {
	position: static !important;
	order: 3;
	width: auto !important;
	height: auto !important;
	margin: 0 0 0 auto !important;
	padding: 0 2px !important;
	overflow: visible !important;
	clip: auto !important;
	white-space: nowrap !important;
	border: 0 !important;
	color: #141d2e;
	font-family: Inter, system-ui, sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 30px;
}

/* --- 3. Row action: an orange cart icon (h-8 w-8 table / h-10 w-10 card, rounded-md, #C24B14) --- */
body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	height: 32px;
}
body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action button.sb-sf-atc-btn.sb-sf-atc-btn.sb-lta-atc-icon {
	flex: none !important;
	width: 32px !important;
	height: 32px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: #c24b14 !important;
	color: #fff !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	gap: 0;
}
body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action button.sb-sf-atc-btn.sb-sf-atc-btn.sb-lta-atc-icon:hover:not(:disabled) {
	background: #a63e11 !important;
}
body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action button.sb-sf-atc-btn.sb-sf-atc-btn.sb-lta-atc-icon:focus-visible {
	outline: 2px solid #07038c !important;
	outline-offset: 2px;
}
body .sb-lta-action .sb-lta-atc-icon svg.sb-lta-cart-ico,
body .sb-lta-action .sb-lta-atc-icon svg.sb-lta-loader {
	width: 18px !important;
	height: 18px !important;
	flex: none;
	pointer-events: none;
}
body .sb-lta-action .sb-lta-atc-icon .sb-lta-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* The quantity selector keeps its 82 x 24 footprint (owner, 19 Oct), centred in the 32px row box. */
body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action .sb-lta-qty {
	height: 24px;
}

/* --- phones --------------------------------------------------------------------------------- */
@media (max-width: 767px) {
	/* Search, then the actions spread across the width, then the filters, then the count. */
	body .sb-sf .sb-tb.sb-tq-rows .sb-tb__bar > .sb-tb__right {
		display: flex !important; /* sf-toolbar.css makes it display:contents on phones, which drops its order */
		order: -1 !important;
		flex: 1 1 100% !important;
		justify-content: space-between !important;
		margin: 0 !important;
	}
	body .sb-sf .sb-tb .sb-tb__right button.sb-tb-btn.sb-tb-btn,
	body .sb-sf .sb-tb .sb-tb__right .sb-ss-save .sb-ss-btn.sb-ss-btn {
		padding: 4px 6px !important;
	}
	body .sb-sf .sb-tb.sb-tq-rows .sb-tb__bar > span.sb-t03-count {
		order: 9;
		flex: 1 1 100%;
		margin: 0 !important;
		line-height: 18px;
	}
}
@media (max-width: 699px) {
	body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action {
		justify-content: flex-end;
		height: auto;
	}
	body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action button.sb-sf-atc-btn.sb-sf-atc-btn.sb-lta-atc-icon {
		width: 44px !important;
		height: 44px !important;
		min-height: 44px !important;
	}
	body .sb-sf [data-sb-sf-instock] table.sb-sf-instock-table td[data-col="price"] .sb-lta-action .sb-lta-qty {
		height: auto;
	}
}

/*
 * All Products count row (owner, 9 Nov: "this looks broken"). Signed in, "Notify me" is a <button>; the button rule
 * in table-actions.css is scoped to the In Stock toolbar (.sb-tb), so here the theme's bare button style won (18px,
 * weight 400) and it sat off the count's baseline. Same look as the signed-out link, centred on the count.
 */
body .sb-sf .sb-sf-filter-bar--catalog .sb-sf-filter-bar__countrow {
	align-items: center;
	gap: 4px;
}
body .sb-sf .sb-sf-filter-bar__countrow .sb-ss-save .sb-ss-btn.sb-ss-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	width: auto !important;
	min-width: 0 !important;
	height: 28px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 8px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: hsl(var(--primary, 242 96% 28%)) !important;
	font: 600 12px/1 Inter, system-ui, sans-serif !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	white-space: nowrap;
}
body .sb-sf .sb-sf-filter-bar__countrow .sb-ss-save .sb-ss-btn.sb-ss-btn:hover {
	background: hsl(var(--muted, 216 18% 94%)) !important;
}
body .sb-sf .sb-sf-filter-bar__countrow .sb-ss-save .sb-ss-btn.sb-ss-btn.is-on {
	font-weight: 700 !important;
}
