/**
 * NKALL Meilisearch — phone filter panel (VapeGreen style). 0.9.3.
 *
 * Only loaded when `mobile_filter_layout = sheet`, and everything below only applies once filter-sheet.js has
 * run (it adds `html.nkall-fs-on` on phones). Without JS the normal pill row is untouched.
 *
 * Accent = the theme's primary colour (Kadence `--global-palette1`), so each store gets its own colour without a
 * setting. Override with `--nkall-fs-accent` if a store needs something else.
 */

.nkall-fs-tab,
.nkall-fs-inline,
.nkall-fs { display: none; }

html.nkall-fs-on .nkall-fs-tab,
html.nkall-fs-on .nkall-fs-inline { display: inline-flex; }
html.nkall-fs-on .nkall-fs:not([hidden]) { display: flex; }

/* The inline row is replaced by one "Filters" button; the "N products · Clear all" line stays. */
html.nkall-fs-on .nkall-fb-pills,
html.nkall-fs-on .nkall-fb-label { display: none; }

:root { --nkall-fs-accent-default: var(--global-palette1, #10b981); }

/* ---------------------------------------------------------- floating tab */

.nkall-fs-tab {
	position: fixed;
	right: 0;
	top: 62%;
	z-index: 9990;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 8px;
	border: 0;
	border-radius: 12px 0 0 12px;
	background: var(--nkall-fs-accent, var(--nkall-fs-accent-default));
	color: #fff;
	box-shadow: -2px 2px 10px rgba(0, 0, 0, .18);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.nkall-fs-tab-text {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	letter-spacing: .02em;
}

.nkall-fs-tab-badge,
.nkall-fs-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.nkall-fs-tab-badge { background: #fff; color: var(--nkall-fs-accent, var(--nkall-fs-accent-default)); }
.nkall-fs-badge { margin-left: 8px; background: var(--nkall-fs-accent, var(--nkall-fs-accent-default)); color: #fff; }

html.nkall-fs-open .nkall-fs-tab { display: none; }

/* ------------------------------------------------------- inline button */

.nkall-fs-inline {
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	border: 1px solid var(--nkall-fs-accent, var(--nkall-fs-accent-default));
	border-radius: 9999px;
	background: #fff;
	color: var(--nkall-fs-accent, var(--nkall-fs-accent-default));
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

/* --------------------------------------------------------------- panel */

.nkall-fs {
	position: fixed;
	inset: 0;
	z-index: 100000;
	flex-direction: column;
	background: #fff;
	color: #1f2937;
	font-size: 15px;
	transform: translateX(100%);
	transition: transform .22s ease-out;
}

.nkall-fs.is-in { transform: none; }
.nkall-fs.is-instant { transition: none; }

html.nkall-fs-open,
html.nkall-fs-open body { overflow: hidden; }

.nkall-fs-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
	padding: 14px 16px 14px 22px;
	border-bottom: 1px solid #e5e7eb;
}

.nkall-fs-title { display: flex; align-items: center; font-size: 18px; font-weight: 600; }

.nkall-fs-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	color: #6b7280;
	cursor: pointer;
}

.nkall-fs-body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 22px 24px;
}

.nkall-fs-sec { padding: 16px 0; border-bottom: 1px solid #e5e7eb; }

.nkall-fs-sec-title {
	display: flex;
	align-items: center;
	margin-bottom: 8px;
	font-weight: 600;
}

.nkall-fs-list { margin: 0; padding: 0; list-style: none; }
.nkall-fs-list li { margin: 0; }

.nkall-fs-row,
.nkall-fs-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
	color: inherit;
	text-decoration: none;
}

.nkall-fs-box {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 1.5px solid #9ca3af;
	border-radius: 4px;
	background: #fff;
}

.nkall-fs-row.is-on .nkall-fs-box {
	border-color: var(--nkall-fs-accent, var(--nkall-fs-accent-default));
	background: var(--nkall-fs-accent, var(--nkall-fs-accent-default)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.nkall-fs-name { flex: 1 1 auto; min-width: 0; }
.nkall-fs-count { flex: 0 0 auto; color: #9ca3af; font-size: 14px; }

.nkall-fs-more {
	margin-top: 6px;
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--nkall-fs-accent, var(--nkall-fs-accent-default));
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.nkall-fs-sort {
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	font-size: 15px;
}

.nkall-fs-switch {
	position: relative;
	flex: 0 0 auto;
	width: 40px;
	height: 24px;
	border-radius: 9999px;
	background: #d1d5db;
}

.nkall-fs-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s;
}

.nkall-fs-toggle.is-on .nkall-fs-switch { background: var(--nkall-fs-accent, var(--nkall-fs-accent-default)); }
.nkall-fs-toggle.is-on .nkall-fs-switch::after { transform: translateX(16px); }

.nkall-fs-price { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.nkall-fs-price .nkall-fb-price-field { flex: 1 1 100px; }
.nkall-fs-price .nkall-fb-price-field input { min-height: 44px; width: 100%; font-size: 16px; }
.nkall-fs-price .nkall-fb-price-go { min-height: 44px; }

.nkall-fs-clear {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 20px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	color: #374151;
	text-decoration: none;
}

.nkall-fs-foot {
	flex: 0 0 auto;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.nkall-fs-show {
	width: 100%;
	min-height: 48px;
	border: 0;
	border-radius: 10px;
	background: var(--nkall-fs-accent, var(--nkall-fs-accent-default));
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}

/* busy while the next page loads */
.nkall-fs.is-loading .nkall-fs-body { opacity: .45; pointer-events: none; }
.nkall-fs.is-loading .nkall-fs-show { opacity: .7; }

/* 🔴 Theme button styles (Kadence: filled, coloured, padded) bleed into every <button> — reset ours
   explicitly, or the close button turns into a coloured square with a tiny X (seen 2026-11-09). */
.nkall-fs button.nkall-fs-close,
.nkall-fs button.nkall-fs-more {
	-webkit-appearance: none;
	appearance: none;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	text-transform: none;
	letter-spacing: normal;
}
.nkall-fs button.nkall-fs-close { padding: 0 !important; color: #6b7280 !important; }
.nkall-fs button.nkall-fs-close svg { width: 24px; height: 24px; }
.nkall-fs button.nkall-fs-more { padding: 6px 0 !important; color: var(--nkall-fs-accent, var(--nkall-fs-accent-default)) !important; }
button.nkall-fs-tab,
.nkall-fs button.nkall-fs-show,
.nkall-fb button.nkall-fs-inline {
	-webkit-appearance: none;
	appearance: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}
button.nkall-fs-tab { box-shadow: -2px 2px 10px rgba(0, 0, 0, .18); }
button.nkall-fs-tab svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
	.nkall-fs { transition: none; }
}
