/**
 * KO Product Filter — front-end styles.
 *
 * Everything is driven by CSS custom properties written by the plugin settings,
 * so the look can be changed in the admin (or overridden in a child theme)
 * without touching this file.
 */

:root {
	--kopf-bar-bg: #ffffff;
	--kopf-bar-text: #6b6b63;
	--kopf-bar-border: #e2e0d6;
	--kopf-bar-hover: #f5f3e9;
	--kopf-bar-height: 62px;
	--kopf-bar-font: 12px;
	--kopf-bar-ls: 2.4px;
	--kopf-bar-transform: uppercase;
	--kopf-accent: #1e4620;
	--kopf-drawer-bg: #ffffff;
	--kopf-text: #2b2b28;
	--kopf-muted: #8a8a80;
	--kopf-border: #ece9dd;
	--kopf-font: 14px;
	--kopf-gap: 6px;
	--kopf-radius: 0px;
	--kopf-btn-bg: #1e4620;
	--kopf-btn-text: #ffffff;
	--kopf-chip-bg: #f5f3e9;
	--kopf-chip-text: #3c3c36;
	--kopf-overlay: rgba(20, 20, 18, 0.42);
	--kopf-drawer-width: 380px;
	--kopf-family: inherit;
	--kopf-z: 999950;
}

/* ---------------------------------------------------------- Wrapper + bar */

.kopf {
	font-family: var(--kopf-family);
	position: relative;
	width: 100%;
	box-sizing: border-box;
	container-type: inline-size;
	container-name: kopf;
}

.kopf *,
.kopf *::before,
.kopf *::after {
	box-sizing: border-box;
}

/*
 * Theme / page-builder isolation.
 * Themes like the one used here (and most Elementor-based kits) ship a
 * global `button` style — usually a pill shape with its own border,
 * shadow and background — that otherwise overrides the plugin's own
 * buttons, since a bare element selector loaded late (or with an
 * !important somewhere in the theme) can beat a plain class selector.
 * Every interactive control below is reset here first, scoped tightly to
 * `.kopf`, and every plugin control then re-declares its own look with
 * !important so it can never be repainted by the surrounding theme.
 */
/* :where() carries zero specificity, so this reset always loses to every
   specific .kopf-btn / .kopf-bar__cell / .kopf-section__toggle rule below
   — it only clears out whatever the theme attached, never our own CSS. */
:where(.kopf) button {
	all: unset;
	display: block;
	box-sizing: border-box;
	font-family: inherit;
	cursor: pointer;
}

:where(.kopf) select,
:where(.kopf) input[type="text"],
:where(.kopf) input[type="search"],
:where(.kopf) input[type="number"] {
	appearance: none;
	-webkit-appearance: none;
	border-radius: 0;
	box-shadow: none;
	background-image: none;
}

.kopf--width-contained .kopf-bar {
	max-width: 1200px;
	margin-inline: auto;
}

.kopf--sticky .kopf-bar {
	position: sticky;
	top: 0;
	z-index: 40;
}

.kopf-bar {
	display: flex;
	align-items: stretch;
	width: 100%;
	background: var(--kopf-bar-bg);
	border-top: 1px solid var(--kopf-bar-border);
	border-bottom: 1px solid var(--kopf-bar-border);
}

.kopf-bar__cell {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--kopf-bar-height);
	padding: 0 18px;
	margin: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-right: 1px solid var(--kopf-bar-border) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--kopf-bar-text);
	font-family: inherit;
	font-size: var(--kopf-bar-font);
	font-weight: 400;
	letter-spacing: var(--kopf-bar-ls);
	text-transform: var(--kopf-bar-transform);
	line-height: 1.2;
	cursor: pointer;
	position: relative;
	transition: background-color 0.18s ease, color 0.18s ease;
	text-align: center;
}

.kopf-bar__cell:last-child {
	border-right: 0;
}

.kopf-bar__filter:hover,
.kopf-bar__filter:focus-visible,
.kopf-bar__sorttoggle:hover {
	background: var(--kopf-bar-hover);
	color: var(--kopf-accent);
}

.kopf-bar__sortcell {
	padding: 0;
	position: relative;
}

.kopf-bar__sorttoggle {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100% !important;
	min-height: var(--kopf-bar-height);
	padding: 0 18px !important;
	margin: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.kopf-bar__label {
	white-space: nowrap;
}

.kopf-icon {
	flex: none;
	transition: transform 0.2s ease;
}

.kopf-bar__sorttoggle[aria-expanded="true"] .kopf-icon {
	transform: rotate(180deg);
}

/* Inline / pill bar variants */

.kopf--bar-inline .kopf-bar {
	justify-content: flex-start;
	gap: 0;
}

.kopf--bar-inline .kopf-bar__cell {
	flex: 0 0 auto;
	min-width: 180px;
}

.kopf--bar-pill .kopf-bar {
	border: 0;
	gap: 10px;
	padding: 8px 0;
	flex-wrap: wrap;
}

.kopf--bar-pill .kopf-bar__cell {
	flex: 0 0 auto;
	min-height: 42px;
	border: 1px solid var(--kopf-bar-border) !important;
	border-radius: 999px !important;
	padding: 0 22px !important;
}

.kopf--bar-pill .kopf-bar__sortcell {
	padding: 0;
}

.kopf--bar-pill .kopf-bar__sorttoggle {
	min-height: 40px;
	border-radius: 999px !important;
}

/* Active count badge */

.kopf-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--kopf-accent);
	color: #fff;
	font-size: 10px;
	letter-spacing: 0;
	line-height: 1;
}

.kopf-badge.is-hidden {
	display: none;
}

/* ------------------------------------------------------------- Sort menu */

.kopf-sortmenu {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 60;
	min-width: 240px;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: var(--kopf-drawer-bg);
	border: 1px solid var(--kopf-border);
	border-radius: var(--kopf-radius);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
}

.kopf-sortmenu[hidden] {
	display: none;
}

.kopf-sortmenu li {
	margin: 0;
	list-style: none;
}

.kopf-sortmenu__item {
	display: block !important;
	width: 100% !important;
	padding: 10px 18px !important;
	margin: 0 !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--kopf-text);
	font-family: inherit;
	font-size: 13px;
	text-align: left;
	cursor: pointer;
}

.kopf-sortmenu__item:hover,
.kopf-sortmenu__item:focus-visible {
	background: var(--kopf-chip-bg);
}

.kopf-sortmenu__item.is-active {
	color: var(--kopf-accent);
	font-weight: 600;
}

/* ----------------------------------------------------------- Active chips */

.kopf-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 14px 4px 2px;
	font-size: 13px;
}

.kopf-chips.is-hidden {
	display: none;
}

.kopf-chips__title {
	color: var(--kopf-muted);
	font-size: 12px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

.kopf-chip {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 6px 12px !important;
	margin: 0 !important;
	background: var(--kopf-chip-bg) !important;
	color: var(--kopf-chip-text);
	border: 1px solid var(--kopf-border) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kopf-chip span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kopf-chip:hover {
	background: #fff !important;
	border-color: var(--kopf-accent) !important;
	color: var(--kopf-accent);
}

.kopf-chips__clear {
	display: inline-block !important;
	margin: 0 0 0 4px !important;
	padding: 6px 4px !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--kopf-muted);
	font-family: inherit;
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
}

.kopf-chips__clear:hover {
	color: var(--kopf-accent);
}

/* --------------------------------------------------------------- Overlay */

.kopf-overlay {
	position: fixed;
	inset: 0;
	z-index: var(--kopf-z);
	background: var(--kopf-overlay);
	opacity: 0;
	transition: opacity 0.28s ease;
	cursor: pointer;
}

.kopf-overlay[hidden] {
	display: none;
}

.kopf-overlay.is-visible {
	opacity: 1;
}

/* ---------------------------------------------------------------- Drawer */

.kopf-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	z-index: calc(var(--kopf-z) + 1);
	display: flex;
	flex-direction: column;
	width: min(var(--kopf-drawer-width), 92vw);
	max-width: 100%;
	background: var(--kopf-drawer-bg);
	color: var(--kopf-text);
	font-size: var(--kopf-font);
	box-shadow: 0 0 42px rgba(0, 0, 0, 0.16);
	transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
	overscroll-behavior: contain;
}

.kopf-drawer[hidden] {
	display: none;
}

.kopf-drawer--left {
	left: 0;
	transform: translate3d(-102%, 0, 0);
}

.kopf-drawer--right {
	right: 0;
	transform: translate3d(102%, 0, 0);
}

.kopf-drawer.is-open {
	transform: translate3d(0, 0, 0);
}

.kopf-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 22px;
	border-bottom: 1px solid var(--kopf-border);
	flex: none;
}

.kopf-drawer__title {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	color: var(--kopf-text);
	line-height: 1.2;
}

.kopf-drawer__close {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 34px;
	height: 34px;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	box-shadow: none !important;
	border: 1px solid transparent !important;
	border-radius: 50% !important;
	color: var(--kopf-muted);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.kopf-drawer__close:hover {
	color: var(--kopf-accent);
	border-color: var(--kopf-border);
}

.kopf-drawer__close .kopf-icon {
	width: 14px;
	height: 14px;
}

/* The panel is moved between the drawer and the inline slot by JavaScript. */

.kopf-panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.kopf-panel--drawer {
	flex: 1 1 auto;
}

.kopf-drawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 22px 22px;
}

.kopf-drawer__foot {
	flex: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 22px;
	border-top: 1px solid var(--kopf-border);
	background: var(--kopf-drawer-bg);
}

.kopf-empty {
	color: var(--kopf-muted);
	padding: 24px 0;
}

/* ---------------------------------------------- Inline (desktop) panel */

.kopf-inline-host {
	width: 100%;
	margin-top: 18px;
}

.kopf-inline-host:empty {
	display: none;
}

.kopf-panel--inline {
	display: block;
	color: var(--kopf-text);
	font-size: var(--kopf-font);
}

.kopf-panel--inline .kopf-drawer__body {
	overflow: visible;
	padding: 0;
	max-height: none;
}

.kopf-panel--inline .kopf-drawer__foot {
	padding: 16px 0 0;
	border-top: 1px solid var(--kopf-border);
	background: transparent;
	margin-top: 6px;
}

.kopf-panel--inline .kopf-section:first-child .kopf-section__toggle {
	padding-top: 0;
}

.kopf-panel--inline .kopf-list {
	max-height: 300px;
}

/*
 * The inline panel is dropped into whatever column width the page layout
 * gives it (often a narrow ~20-25% sidebar), so it needs to respond to its
 * own container width, not the viewport. `.kopf` declares
 * container-type: inline-size above; these queries key off that.
 */
@container kopf (max-width: 340px) {
	.kopf-drawer__foot {
		flex-direction: column;
	}

	.kopf-btn {
		flex: 1 1 auto;
		width: 100%;
	}

	.kopf-price__fields {
		flex-wrap: wrap;
	}

	.kopf-price__field {
		flex: 1 1 45%;
	}

	.kopf-list--swatch .kopf-opt__label {
		width: 52px;
	}
}

/* Fallback for browsers without container-query support: same fixes,
   triggered by viewport width instead. Harmless no-op where @container
   already applied. */
@supports not (container-type: inline-size) {
	@media (max-width: 480px) {
		.kopf-drawer__foot {
			flex-direction: column;
		}

		.kopf-price__fields {
			flex-wrap: wrap;
		}

		.kopf-price__field {
			flex: 1 1 45%;
		}
	}
}

/* -------------------------------------------------------------- Sections */

.kopf-section {
	border-bottom: 1px solid var(--kopf-border);
	padding-bottom: var(--kopf-gap);
	margin-bottom: var(--kopf-gap);
}

.kopf-section:last-child {
	border-bottom: 0;
	margin-bottom: 0;
}

.kopf-section__title {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.kopf-section__toggle {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100% !important;
	max-width: 100%;
	padding: 15px 2px !important;
	margin: 0 !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--kopf-text);
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	text-align: left;
	cursor: pointer;
	transition: color 0.15s ease;
}

.kopf-section__toggle:hover {
	color: var(--kopf-accent);
}

.kopf-section__toggle .kopf-icon {
	flex: none;
	width: 10px;
	height: 10px;
	opacity: 0.7;
}

.kopf-section__toggle[aria-expanded="true"] {
	color: var(--kopf-accent);
}

.kopf-section__toggle[aria-expanded="true"] .kopf-icon {
	transform: rotate(180deg);
	opacity: 1;
}

.kopf-section__panel {
	padding-bottom: 14px;
}

.kopf-section__panel[hidden] {
	display: none;
}

/* -------------------------------------------------------------- Controls */

.kopf-list {
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 260px;
	overflow-y: auto;
}

.kopf-list::-webkit-scrollbar {
	width: 5px;
}

.kopf-list::-webkit-scrollbar-thumb {
	background: var(--kopf-border);
	border-radius: 4px;
}

.kopf-opt {
	margin: 0;
	list-style: none;
}

.kopf-opt[data-depth="1"] {
	padding-left: 16px;
}

.kopf-opt[data-depth="2"] {
	padding-left: 32px;
}

.kopf-opt[data-depth="3"] {
	padding-left: 48px;
}

.kopf-opt.is-hidden {
	display: none;
}

.kopf-opt__label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	cursor: pointer;
	color: var(--kopf-text);
	line-height: 1.35;
	transition: color 0.15s ease;
}

.kopf-opt__label:hover {
	color: var(--kopf-accent);
}

.kopf-opt__label--single {
	padding: 4px 0 10px;
}

.kopf-opt__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.kopf-tick {
	flex: none;
	position: relative;
	width: 16px;
	height: 16px;
	border: 1px solid var(--kopf-border);
	background: #fff;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.kopf-opt__input[type="radio"] ~ .kopf-tick {
	border-radius: 50%;
}

.kopf-tick::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 1.6px 1.6px 0;
	transform: rotate(45deg) scale(0.5);
	opacity: 0;
	transition: opacity 0.12s ease, transform 0.12s ease;
}

.kopf-opt__input:checked ~ .kopf-tick {
	background: var(--kopf-accent);
	border-color: var(--kopf-accent);
}

.kopf-opt__input:checked ~ .kopf-tick::after {
	opacity: 1;
	transform: rotate(45deg) scale(1);
}

.kopf-opt__input:focus-visible ~ .kopf-tick,
.kopf-opt__input:focus-visible ~ .kopf-swatch,
.kopf-opt__input:focus-visible ~ .kopf-switch {
	outline: 2px solid var(--kopf-accent);
	outline-offset: 2px;
}

.kopf-opt__text {
	flex: 1 1 auto;
}

.kopf-opt__count {
	flex: none;
	color: var(--kopf-muted);
	font-size: 12px;
}

/* Swatches */

.kopf-list--swatch {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-height: none;
}

.kopf-list--swatch .kopf-opt {
	padding: 0;
}

.kopf-list--swatch .kopf-opt__label {
	flex-direction: column;
	gap: 6px;
	width: 62px;
	text-align: center;
	padding: 4px 0;
}

.kopf-swatch {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--kopf-border);
	background: var(--kopf-chip-bg);
	font-size: 11px;
	text-transform: uppercase;
	color: var(--kopf-muted);
	transition: box-shadow 0.15s ease;
}

.kopf-opt__input:checked ~ .kopf-swatch {
	box-shadow: 0 0 0 2px var(--kopf-drawer-bg), 0 0 0 3px var(--kopf-accent);
}

.kopf-list--swatch .kopf-opt__text {
	flex: none;
	font-size: 11px;
	color: var(--kopf-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.kopf-list--swatch .kopf-opt__count {
	display: none;
}

/* Switch */

.kopf-switch {
	flex: none;
	position: relative;
	width: 38px;
	height: 21px;
	border-radius: 999px;
	background: var(--kopf-border);
	transition: background-color 0.18s ease;
}

.kopf-switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.18s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.kopf-opt__input:checked ~ .kopf-switch {
	background: var(--kopf-accent);
}

.kopf-opt__input:checked ~ .kopf-switch::after {
	transform: translateX(17px);
}

/* Stars */

.kopf-stars {
	display: inline-flex;
	gap: 2px;
	letter-spacing: 1px;
	color: var(--kopf-border);
	font-size: 14px;
	line-height: 1;
}

.kopf-star.is-on {
	color: #d8a33c;
}

/* Select + search */

.kopf-select,
.kopf-search {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px !important;
	margin: 0 !important;
	background: #fff !important;
	border: 1px solid var(--kopf-border) !important;
	border-radius: var(--kopf-radius) !important;
	box-shadow: none !important;
	color: var(--kopf-text);
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
}

.kopf-search {
	margin-bottom: 10px;
}

.kopf-select:focus,
.kopf-search:focus {
	outline: none;
	border-color: var(--kopf-accent);
}

/* ----------------------------------------------------------------- Price */

.kopf-price__slider {
	position: relative;
	height: 30px;
	margin: 6px 2px 4px;
}

.kopf-price__track {
	position: absolute;
	top: 13px;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--kopf-border);
	border-radius: 3px;
}

.kopf-price__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	background: var(--kopf-accent);
	border-radius: 3px;
}

.kopf-price__range {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 30px;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.kopf-price__range:focus {
	outline: none;
}

.kopf-price__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--kopf-accent);
	cursor: grab;
	margin-top: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.kopf-price__range::-moz-range-thumb {
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--kopf-accent);
	cursor: grab;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.kopf-price__range::-webkit-slider-runnable-track {
	height: 30px;
	background: none;
	border: 0;
}

.kopf-price__range::-moz-range-track {
	height: 30px;
	background: none;
	border: 0;
}

.kopf-price__fields {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.kopf-price__field {
	flex: 1 1 0;
	margin: 0;
}

.kopf-price__input {
	width: 100%;
	min-width: 0;
	padding: 8px 10px !important;
	margin: 0 !important;
	background: #fff !important;
	border: 1px solid var(--kopf-border) !important;
	border-radius: var(--kopf-radius) !important;
	box-shadow: none !important;
	color: var(--kopf-text);
	font-family: inherit;
	font-size: 13px;
}

.kopf-price__input:focus {
	outline: none;
	border-color: var(--kopf-accent);
}

.kopf-price__sep {
	color: var(--kopf-muted);
}

.kopf-price__readout {
	margin: 10px 0 0;
	color: var(--kopf-muted);
	font-size: 12px;
}

.kopf-price__readout .amount,
.kopf-price__readout bdi {
	color: var(--kopf-text);
}

/* --------------------------------------------------------------- Buttons */

.kopf-btn {
	flex: 1 1 120px;
	min-width: 0;
	max-width: 100%;
	padding: 14px 16px !important;
	margin: 0 !important;
	border-radius: var(--kopf-radius) !important;
	box-shadow: none !important;
	text-shadow: none !important;
	background-image: none !important;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	line-height: 1.3;
	text-align: center;
	white-space: normal;
	cursor: pointer;
	transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.kopf-btn--primary {
	flex: 2 1 160px;
	background: var(--kopf-btn-bg) !important;
	color: var(--kopf-btn-text) !important;
	border: 1px solid var(--kopf-btn-bg) !important;
}

.kopf-btn--primary:hover {
	opacity: 0.88;
}

.kopf-btn--ghost {
	background: transparent !important;
	color: var(--kopf-muted) !important;
	border: 1px solid var(--kopf-border) !important;
}

.kopf-btn--ghost:hover {
	color: var(--kopf-accent) !important;
	border-color: var(--kopf-accent) !important;
}

/* --------------------------------------------------------------- Loading */

.kopf-drawer__loading {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.6);
}

.kopf-drawer.is-loading .kopf-drawer__loading {
	display: flex;
}

.kopf-spinner,
.kopf-loading-overlay__spinner {
	width: 26px;
	height: 26px;
	border: 2px solid var(--kopf-border);
	border-top-color: var(--kopf-accent);
	border-radius: 50%;
	animation: kopf-spin 0.7s linear infinite;
}

@keyframes kopf-spin {
	to {
		transform: rotate(360deg);
	}
}

.kopf-loading-overlay {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 60px;
	background: rgba(255, 255, 255, 0.62);
	backdrop-filter: saturate(0.9);
}

.kopf-target-wrap {
	position: relative;
}

.kopf-is-busy {
	opacity: 0.45;
	transition: opacity 0.2s ease;
}

.kopf-noresults {
	list-style: none;
	padding: 40px 0;
	text-align: center;
	color: var(--kopf-muted);
	width: 100%;
}

/* --------------------------------------------------------- Body lock / a11y */

body.kopf-drawer-open {
	overflow: hidden;
}

.kopf .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

.kopf-bar__cell:focus-visible,
.kopf-bar__sorttoggle:focus-visible,
.kopf-btn:focus-visible,
.kopf-chip:focus-visible {
	outline: 2px solid var(--kopf-accent);
	outline-offset: -2px;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 782px) {
	.kopf-bar__cell,
	.kopf-bar__sorttoggle {
		min-height: max(52px, calc(var(--kopf-bar-height) - 10px));
		padding: 0 12px;
		font-size: max(11px, calc(var(--kopf-bar-font) - 1px));
		letter-spacing: calc(var(--kopf-bar-ls) * 0.75);
	}

	.kopf-drawer {
		width: min(var(--kopf-drawer-width), 100vw);
	}

	.kopf-drawer--mobile-full {
		width: 100vw;
	}

	.kopf-sortmenu {
		left: 0;
		right: 0;
		min-width: 0;
	}

	.kopf-drawer__body {
		padding: 4px 18px 18px;
	}

	.kopf-drawer__head,
	.kopf-drawer__foot {
		padding: 16px 18px;
	}

	.kopf-list {
		max-height: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kopf-drawer,
	.kopf-overlay,
	.kopf-icon,
	.kopf-tick,
	.kopf-switch::after {
		transition: none !important;
	}

	.kopf-spinner {
		animation-duration: 2s;
	}
}
