/*
 * Swift Ink Store: adjustments to what plugins print.
 *
 * Not inside a cascade layer on purpose: plugin stylesheets are unlayered, and
 * unlayered rules always beat layered ones, so these must be unlayered too.
 * Each block names the plugin it is for. If a plugin is removed, its block
 * can be deleted.
 */

/* ------------------------------------------------------------------
 * FiboSearch: header search box in the theme's style.
 * ---------------------------------------------------------------- */
.sis-header__search .dgwt-wcas-search-wrapp {
	max-inline-size: none;
	min-inline-size: 0;
	margin: 0;
}

.sis-header__search .dgwt-wcas-sf-wrapp {
	display: flex;
	padding: 0.3125rem;
	border: 1.5px solid var(--sis-ink);
	border-radius: 0.625rem;
	background: var(--sis-white);
	box-shadow: 0 4px 14px rgb(20 21 26 / 12%);
}

.sis-header__search .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	flex: 1;
	min-inline-size: 0;
	min-block-size: var(--sis-tap);
	padding: 0.5rem 0.875rem;
	border: 0;
	border-radius: 0.4375rem;
	background: transparent;
	box-shadow: none;
	color: var(--sis-ink);
	font-size: var(--sis-text-md);
}

.sis-header__search .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
	color: var(--sis-gray);
	font-style: normal;
	opacity: 1;
}

/* FiboSearch prints its own button colour inline with three classes, so
   these rules name its wrapper too in order to outrank it. */
.sis-header__search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit {
	position: static;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	inline-size: auto;
	min-inline-size: 2.75rem;
	block-size: auto;
	min-block-size: var(--sis-tap);
	padding: 0 1.25rem;
	border: 0;
	border-radius: 0.4375rem;
	background: var(--sis-blue);
	color: var(--sis-white);
	font-size: var(--sis-text-sm);
	font-weight: 700;
	text-transform: none;
}

/* Magnifier before the word (Aziz, December 1). FiboSearch prints either its
   label or its own icon, never both, so the icon is drawn here, from the same
   shape as the theme's search icon (inc/icons.php). The word is FiboSearch's
   "Search submit button" label setting. This also replaces FiboSearch's own
   ::before, a small arrow on the button's left edge. */
.sis-header__search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::before {
	--sis-search-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");

	content: "";
	position: static;
	flex-shrink: 0;
	inline-size: 1.25rem;
	block-size: 1.25rem;
	margin: 0;
	border: 0;
	background: currentcolor;
	-webkit-mask: var(--sis-search-mask) center / contain no-repeat;
	mask: var(--sis-search-mask) center / contain no-repeat;
}

/* Phones: the icon alone, in a 44px square. The word stays the button's
   spoken name: FiboSearch also prints it as the button's aria-label. The
   gap goes too: the hidden word still takes part in the layout, and the
   gap beside it pushed the icon 4px left of centre. */
@media (width < 640px) {
	.sis-header__search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit {
		gap: 0;
		inline-size: var(--sis-tap);
		padding: 0;
		font-size: 0;
	}
}

/* Hover: Deep Blue at full strength, like every other blue button.
   FiboSearch also fades the button to 70% on hover and keeps it faded after
   a click (:focus), which turned the dark blue a washed-out grey-blue. */
.sis-header__search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover {
	background: var(--sis-blue-dark);
	opacity: 1;
}

.sis-header__search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus,
.sis-header__search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active {
	opacity: 1;
}

.sis-header__search .dgwt-wcas-ico-magnifier {
	position: static;
	inline-size: 1.125rem;
	max-inline-size: 1.125rem;
	block-size: 1.125rem;
	margin: 0;
	fill: currentcolor;
}

/* The suggestion list is a menu of links: no underline on each row. */
.dgwt-wcas-suggestions-wrapp a {
	text-decoration: none;
}

/*
 * The suggestion list. FiboSearch has settings for its colours and nothing
 * else: the list's text, border and selected-row colours are set in
 * FiboSearch > Autocomplete > Suggestions colors. Size, spacing and position
 * have no setting, so they are here.
 */

/* Under the header field (992px and wider) the list is a floating panel.
   FiboSearch lines it up with the bottom of the text box, which sits inside
   the bordered field, so it covered the field's bottom edge: the margin
   moves it clear of the field and leaves a small gap. Under 992px FiboSearch
   opens its own full-screen search and puts the list inside that, where it
   stays full width and flush. */
body > .dgwt-wcas-suggestions-wrapp {
	margin-block-start: 0.625rem;
	border: 1px solid var(--sis-border);
	border-radius: var(--sis-radius-md);
	box-shadow: var(--sis-shadow-md);
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-st {
	font-size: var(--sis-text-md);
	line-height: 1.3;
}

/* Phones: names stay at FiboSearch's own 15px. A name's first two lines fit
   beside its photo; a third makes the row taller, and at 16px names start
   taking a third line on narrow phones, leaving fewer results above the
   keyboard. */
@media (width < 640px) {
	.dgwt-wcas-suggestions-wrapp .dgwt-wcas-st {
		font-size: var(--sis-text-compact);
	}
}

/* Group labels ("Printers", "Cartridges"). */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
	border-color: var(--sis-border);
	color: var(--sis-gray);
	font-size: var(--sis-text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
}

/* Printer rows. Each is one line ("HP DeskJet 3720": wp-content/fibosearch.php
   puts the brand in front and drops FiboSearch's second line), so the row
   gets the 44px minimum itself. FiboSearch underlines the highlighted
   printer row and leaves it white; it is highlighted like a cartridge row
   instead, in the colour of FiboSearch's "Suggestion selected" setting. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-tax {
	min-block-size: var(--sis-tap);
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected,
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover {
	background-color: var(--sis-blue-tint);
	text-decoration: none;
}

/* "Show more items": a 44px row in the theme's blue. FiboSearch's text
   colour setting names every element in the list, so the count inside it
   is named as well. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-more {
	min-block-size: var(--sis-tap);
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-st-more,
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-st-more * {
	color: var(--sis-blue);
	font-size: var(--sis-text-sm);
	font-weight: 700;
	text-transform: none;
}

/*
 * FiboSearch "no results" panel. The wording and links are FiboSearch's
 * "No results" label setting (copy kept in
 * new-theme-docs/fibosearch-no-results.html). FiboSearch strips class
 * attributes and <strong> from that label when it saves it, so the panel is
 * styled by its structure: first line the heading, the line just before the
 * list its label, the list the brand pills, the line after the list the help
 * line. Brand links are pale-blue pills; the phone and contact links sit
 * inside a sentence, so they stay underlined.
 */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores {
	padding: var(--sis-space-5);
	color: var(--sis-gray);
	font-size: var(--sis-text-md);
	line-height: 1.5;
}

.dgwt-wcas-suggestion-nores p {
	margin: 0;
}

.dgwt-wcas-suggestion-nores > p:first-child {
	margin-block-end: var(--sis-space-1);
	color: var(--sis-ink);
	font-size: var(--sis-text-lg);
	font-weight: 700;
}

.dgwt-wcas-suggestion-nores > p:has(+ ul) {
	margin-block: var(--sis-space-4) var(--sis-space-2);
	color: var(--sis-ink);
	font-size: var(--sis-text-sm);
	font-weight: 700;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores > ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sis-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* FiboSearch gives every list item in this panel a bullet. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores > ul li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores > ul a {
	display: inline-flex;
	align-items: center;
	min-block-size: var(--sis-tap);
	padding: 0 var(--sis-space-4);
	border-radius: 999px;
	background: var(--sis-blue-tint);
	color: var(--sis-blue-dark);
	font-size: var(--sis-text-sm);
	font-weight: 700;
	text-decoration: none;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores > ul a:hover {
	background: var(--sis-blue);
	color: var(--sis-white);
}

.dgwt-wcas-suggestion-nores > ul ~ p {
	margin-block-start: var(--sis-space-4);
	padding-block-start: var(--sis-space-3);
	border-block-start: 1px solid var(--sis-border);
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores > ul ~ p a {
	color: var(--sis-blue);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores > ul ~ p a:hover {
	color: var(--sis-blue-dark);
}

/* ------------------------------------------------------------------
 * Tom Select (the Ink & Toner Finder's model search box). Structural rules
 * the library needs, in the theme's look. Its own stylesheet is not loaded.
 * ---------------------------------------------------------------- */
.ts-hidden-accessible {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	border: 0;
	clip-path: inset(50%);
	white-space: nowrap;
}

.ts-wrapper {
	position: relative;
}

.ts-control {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	min-block-size: 3rem;
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--sis-border-strong);
	border-radius: var(--sis-radius-sm);
	background: var(--sis-surface);
	color: var(--sis-ink);
	font-weight: 600;
	cursor: text;
}

.ts-control > .item {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ts-control > input {
	flex: 1 1 4rem;
	min-inline-size: 4rem;
	min-block-size: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: var(--sis-text-md);
	font-weight: 600;
}

.ts-control > input:focus {
	outline: none;
}

.ts-control > input::placeholder {
	color: var(--sis-gray);
}

.ts-wrapper.has-items .ts-control > input:not(:focus) {
	position: absolute;
	opacity: 0;
}

.ts-wrapper.focus .ts-control {
	outline: 3px solid var(--sis-blue);
	outline-offset: 2px;
}

.ts-dropdown {
	position: absolute;
	inset-block-start: calc(100% + 0.25rem);
	inset-inline-start: 0;
	z-index: 50;
	inline-size: 100%;
	border: 1px solid #c3cad6;
	border-radius: var(--sis-radius-sm);
	background: var(--sis-white);
	box-shadow: var(--sis-shadow-md);
	color: var(--sis-ink);
}

.ts-dropdown-content {
	max-block-size: 17.5rem;
	padding: 0.25rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ts-dropdown .option,
.ts-dropdown .no-results {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-block-size: var(--sis-tap);
	padding: 0.375rem 0.75rem;
	border-radius: 0.375rem;
	font-size: var(--sis-text-md);
	text-align: start;
}

.ts-dropdown .option {
	cursor: pointer;
}

.ts-dropdown .option.active {
	background: var(--sis-blue-tint);
	color: var(--sis-blue-dark);
}

.ts-dropdown .no-results {
	color: var(--sis-gray);
}

/* ------------------------------------------------------------------
 * CheckoutWC side cart: one clear main button, "Continue shopping" as a
 * text link. (Replaces the rules that used to live in Customizer >
 * Additional CSS, which WordPress stores per theme.)
 * Side cart colours are not set here: they come from CheckoutWC's own
 * settings.
 * The !important flags are needed because CheckoutWC sets these inline.
 * ---------------------------------------------------------------- */

/*
 * While the sticky Add to Cart bar shows on a product page, lift the Crisp
 * chat button (bottom left) above it. product.js keeps --sis-stickybar-h
 * equal to the bar's height. (CheckoutWC's floating cart button is switched
 * off in its Side Cart settings: the header cart is always in view.)
 */
html:has(.sis-stickybar:not([hidden])) #crisp-chatbox [role="button"][data-maximized="false"] {
	bottom: calc(var(--sis-stickybar-h, 5rem) + 1rem) !important;
	transition: bottom 0.2s ease;
}

#cfw-side-cart .wc-proceed-to-checkout {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

#cfw-side-cart .wc-proceed-to-checkout .cfw-primary-btn {
	order: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-block-size: 3.375rem;
	margin-block-end: 0;
	padding: 0.75rem 1rem;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

#cfw-side-cart .wc-proceed-to-checkout .cfw-side-cart-close-trigger {
	order: 99;
	align-self: center;
	inline-size: auto;
	min-block-size: var(--sis-tap);
	margin: 0.375rem 0 0;
	padding: 0.5rem 0.75rem;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--cfw-body-link-color) !important;
	font-size: var(--sis-text-md);
	font-weight: 400;
	text-decoration: none;
	text-underline-offset: 3px;
	text-transform: none;
}

/* Plain blue text beside the big checkout button; underlined on hover and
   keyboard focus only. */
#cfw-side-cart .wc-proceed-to-checkout .cfw-side-cart-close-trigger:hover,
#cfw-side-cart .wc-proceed-to-checkout .cfw-side-cart-close-trigger:focus-visible {
	text-decoration: underline;
}

/*
 * Side cart text. CheckoutWC's font setting only offers Google Fonts, which
 * would load a second copy of Inter, so its own font variables are pointed
 * at the copy the theme already loads. It has no settings for text size:
 * these lift the text that was under 14px. The selectors carry one more
 * class than CheckoutWC's because its stylesheet loads after this one.
 */
#cfw-side-cart {
	--cfw-body-font-family: var(--sis-font);
	--cfw-heading-font-family: var(--sis-font);
}

/* The cart count names its own font, flagged important. */
#cfw-side-cart .cfw-side-cart-quantity {
	font-family: inherit !important;
}

/* The free-shipping message above the bar (16px, ink) and the label under
   it (hidden) are styled in CheckoutWC's own Custom CSS, so that the
   checkout page matches (copy in new-theme-docs/checkoutwc-custom.css). */

/* Product names: long names in a narrow column (249px, 153px on a phone).
   CheckoutWC sets 16px with no line spacing. Inter is wider than the system
   font it replaces, and at 16px most names took one more line; 15px keeps
   the rows close to the height they were. The selector is CheckoutWC's own
   with "table" added so that it outranks it. */
#cfw-side-cart table.cfw-cart-table .cart-item-row .cfw-cart-item-description .cfw-cart-item-title {
	font-size: var(--sis-text-compact);
	line-height: 1.25;
}

/* Quantity stepper: the same as the stepper on product cards (global.css,
   "Quantity stepper"): 44px buttons, ink icons, the count in bold between
   two hairlines, a grey outline. CheckoutWC draws it 30px tall with 8px
   icons at 90% opacity. The selectors carry ".cfw-cart-table" so that they
   outrank CheckoutWC's, which load after this file. */
#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper {
	align-items: stretch;
	border: 1px solid var(--sis-border-strong);
	border-radius: var(--sis-radius-sm);
	background: var(--sis-white);
	font-size: var(--sis-text-md);
	opacity: 1;
	overflow: hidden;
}

#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-minus,
#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-plus {
	inline-size: 2.5rem;
	min-block-size: var(--sis-tap);
	border: 0;
	border-radius: 0;
	background: var(--sis-white);
	color: var(--sis-ink);
}

#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-minus:hover,
#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-plus:hover {
	background: var(--sis-surface);
}

#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-minus svg,
#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-plus svg,
#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-minus:hover svg,
#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-btn-plus:hover svg {
	inline-size: 1rem;
	block-size: 1rem;
	max-inline-size: none;
	fill: currentcolor;
}

#cfw-side-cart .cfw-cart-table .cfw-quantity-stepper .cfw-quantity-stepper-value-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 2.75rem;
	border-inline: 1px solid var(--sis-border);
	color: var(--sis-ink);
	font-size: var(--sis-text-md);
	font-weight: 700;
	text-decoration: none;
}

/* Remove-item button. CheckoutWC draws a 20px cross in a shrink-to-fit table
   cell, and the theme's base rule (img and svg no wider than their box)
   collapsed it to nothing. The icon keeps its own size here, and the button
   gets a 44px hit area that does not widen the column. */
#cfw-side-cart .cfw-remove-item-button {
	position: relative;
}

#cfw-side-cart .cfw-remove-item-button svg {
	max-inline-size: none;
}

#cfw-side-cart .cfw-remove-item-button::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	inline-size: var(--sis-tap);
	block-size: var(--sis-tap);
	transform: translate(-50%, -50%);
}

/* "Have a promo code?" (wording in inc/integrations.php): a full-width row
   with a plus on the right, like an expandable section. Blue, as everything
   that can be pressed; underlined on hover and keyboard focus. */
#cfw-side-cart a.cfw-show-coupons-module {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sis-space-3);
	min-block-size: var(--sis-tap);
	font-size: var(--sis-text-md);
	text-decoration: none;
	cursor: pointer;
}

#cfw-side-cart a.cfw-show-coupons-module:hover,
#cfw-side-cart a.cfw-show-coupons-module:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

#cfw-side-cart a.cfw-show-coupons-module::after {
	content: "";
	flex: none;
	inline-size: 1.25rem;
	block-size: 1.25rem;
	background-color: currentcolor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ------------------------------------------------------------------
 * FunnelKit Automations: the "Update my preference" button on the email
 * preferences page (Let's Keep in Touch, reached from every email's
 * unsubscribe link). FunnelKit prints it as a link with WordPress's admin
 * button classes, which the theme does not style, so it showed as a plain
 * underlined link. Same look as the theme's primary button.
 * ---------------------------------------------------------------- */
#bwfan_unsubscribe {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: var(--sis-tap);
	margin-block: var(--sis-space-4) 0;
	padding: 0.625rem 1.25rem;
	border: 2px solid transparent;
	border-radius: var(--sis-radius-sm);
	background: var(--sis-blue);
	color: var(--sis-white);
	font-size: var(--sis-text-md);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

#bwfan_unsubscribe:hover {
	background: var(--sis-blue-dark);
	color: var(--sis-white);
}

/* ------------------------------------------------------------------
 * Reviewbird review carousel (homepage): each card names the product the
 * review is for, as a link. Reviewbird leaves it with the browser's
 * underline; it reads as a caption, so the underline shows on hover and
 * keyboard focus only.
 * ---------------------------------------------------------------- */
a.rb-carousel-product {
	text-decoration: none;
}

a.rb-carousel-product:hover,
a.rb-carousel-product:focus-visible {
	text-decoration: underline;
}

/* ------------------------------------------------------------------
 * Reviewbird text colours and font. Reviewbird's own settings cover the
 * card background, stars and button; its names, dates and body text use
 * fixed greys (#333, #666, #111827), a green tick (#22c55e, too faint
 * behind a white check) and the system font. These match them to the
 * theme. Reviewbird marks its own rules !important, so these must too;
 * "body" makes them the more specific of the two.
 * ---------------------------------------------------------------- */
body .rb-review-wall,
body .rb-carousel,
body .rb-carousel-modal {
	font-family: inherit !important;
}

body .rb-review-wall-rating-number,
body .rb-review-wall-card-author,
body .rb-review-wall-card-title,
body .rb-review-wall-card-body {
	color: var(--sis-ink) !important;
}

body .rb-review-wall-rating-count,
body .rb-review-wall-card-date {
	color: var(--sis-gray) !important;
}

body .rb-review-wall-card-verified-icon {
	background-color: var(--sis-green) !important;
}

/* ------------------------------------------------------------------
 * Crisp chat.
 *
 * Phones: the floating chat button covers page content, so it is hidden
 * there and the chat icon in the header opens the chat instead.
 * iOS zooms the page when a focused field is under 16px.
 * ---------------------------------------------------------------- */
@media (width < 640px) {
	#crisp-chatbox [role="button"][data-maximized="false"] {
		display: none !important;
	}
}

@supports (-webkit-touch-callout: none) {
	#crisp-chatbox input,
	#crisp-chatbox textarea,
	#crisp-chatbox [contenteditable] {
		font-size: 16px !important;
	}
}
