/* MODAMIX shop filter (README §5.113, mmx_filter.js). Everything is scoped to .module-filter.mmx-f. */
.module-filter.mmx-f { --mmx-line: rgba(128, 128, 128, .38); --mmx-soft: rgba(128, 128, 128, .14); }

/* no inner scroll box: long lists show 8 rows + "show all" */
.module-filter.mmx-f .panel-body { max-height: none !important; overflow: visible !important; }

/* rows: [box] [swatch] name ............ count */
.module-filter.mmx-f .mmx-list > label.mmx-f-row {
	display: flex !important; align-items: center; gap: 10px; width: 100%;
	min-height: 36px; margin: 0 !important; padding: 4px 8px; border-radius: 8px;
	cursor: pointer; line-height: 1.3; position: relative;
}
.module-filter.mmx-f .mmx-list > label.mmx-f-row:hover { background: var(--mmx-soft); }
.module-filter.mmx-f .mmx-list > label.mmx-on { background: var(--mmx-soft); }
.module-filter.mmx-f .mmx-list > label.mmx-on .links-text { font-weight: 700; }
.module-filter.mmx-f .mmx-list > label .filter-item-bg { display: none; }
.module-filter.mmx-f .mmx-list > label input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0 !important; accent-color: currentColor; }
.module-filter.mmx-f .mmx-list > label .links-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; overflow: visible !important; max-height: none !important; line-height: 1.3 !important; }
.module-filter.mmx-f .mmx-list > label .count-badge {
	flex: 0 0 auto; margin-inline-start: auto; background: none !important; border: 0 !important;
	min-width: 0; width: auto; height: auto; padding: 0; opacity: .6; font-size: 12px; font-variant-numeric: tabular-nums;
}
.module-filter.mmx-f .mmx-list > label.mmx-hide { display: none !important; }

/* colour swatch */
.module-filter.mmx-f .mmx-sw, .module-filter.mmx-f .mmx-chip .mmx-sw {
	flex: 0 0 auto; display: inline-block; width: 20px; height: 20px; border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .55);
}
.module-filter.mmx-f .mmx-sw-none { background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(128, 128, 128, .5) 3px 4px); }
.module-filter.mmx-f .mmx-chip .mmx-sw { width: 14px; height: 14px; }

/* search field in long sections */
.module-filter.mmx-f .mmx-f-search { position: relative; margin: 2px 0 8px; }
.module-filter.mmx-f .mmx-f-search input {
	width: 100%; height: 40px; padding: 0 36px 0 12px; border-radius: 10px;
	border: 1px solid var(--mmx-line); background: transparent; color: inherit;
	font-size: 16px; /* no zoom on iPhone */ -webkit-appearance: none; appearance: none; outline: 0;
}
html[dir=rtl] .module-filter.mmx-f .mmx-f-search input { padding: 0 12px 0 36px; }
.module-filter.mmx-f .mmx-f-search input:focus { border-color: currentColor; }
.module-filter.mmx-f .mmx-f-search input::-webkit-search-cancel-button { display: none; }
.module-filter.mmx-f .mmx-f-x {
	display: none; position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
	width: 30px; height: 30px; border: 0; background: none; color: inherit; opacity: .7; cursor: pointer; padding: 0;
}
html[dir=rtl] .module-filter.mmx-f .mmx-f-x { right: auto; left: 6px; }
.module-filter.mmx-f .mmx-f-x::before { content: "\00d7"; font-size: 22px; line-height: 30px; }
.module-filter.mmx-f .mmx-f-search.mmx-has .mmx-f-x { display: block; }
.module-filter.mmx-f .mmx-f-none { padding: 10px 8px; opacity: .65; font-size: 13px; }
.module-filter.mmx-f .mmx-f-more {
	display: block; margin: 6px 0 2px; padding: 8px; border: 0; background: none; color: inherit;
	text-decoration: underline; text-underline-offset: 3px; font-weight: 600; cursor: pointer;
}

/* sizes: a grid of boxes */
.module-filter.mmx-f .mmx-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; }
.module-filter.mmx-f .mmx-grid > label.mmx-wide { grid-column: span 2; }
.module-filter.mmx-f .mmx-grid > label .links-text { overflow: visible !important; max-height: none !important; height: auto !important; line-height: 1.25 !important; white-space: nowrap; font-size: 14px; }
.module-filter.mmx-f .mmx-grid > label {
	position: relative; display: inline-flex !important; align-items: center; justify-content: center; gap: 4px;
	min-width: 0; min-height: 44px; margin: 0 !important; padding: 5px 6px; border-radius: 8px;
	border: 1px solid var(--mmx-line); cursor: pointer; line-height: 1.1; flex-direction: column;
}
.module-filter.mmx-f .mmx-grid > label input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.module-filter.mmx-f .mmx-grid > label .filter-item-bg { display: none; }
.module-filter.mmx-f .mmx-grid > label .count-badge { background: none !important; border: 0 !important; padding: 0; min-width: 0; width: auto; height: auto; font-size: 10px; line-height: 1.2 !important; opacity: .55; }
.module-filter.mmx-f .mmx-grid > label.mmx-on { border: 2px solid currentColor; background: var(--mmx-soft); font-weight: 700; }
.module-filter.mmx-f .mmx-grid > label:focus-within { outline: 2px solid currentColor; outline-offset: 2px; }

/* chosen filters */
.module-filter.mmx-f .mmx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 12px; }
.module-filter.mmx-f .mmx-chip {
	display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 16px;
	border: 1px solid var(--mmx-line); background: var(--mmx-soft); color: inherit; font-size: 13px; cursor: pointer;
}
.module-filter.mmx-f .mmx-chip-x::before { content: "\00d7"; font-style: normal; font-size: 17px; line-height: 1; opacity: .75; }
.module-filter.mmx-f .mmx-chip-clear { background: none; text-decoration: underline; border-color: transparent; }

/* how many chosen, on the section title */
.module-filter.mmx-f .mmx-f-n {
	display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
	margin: 0 8px; border-radius: 10px; font-size: 12px; vertical-align: middle;
}
.module-filter.mmx-f .mmx-f-n { background: var(--mmx-soft); border: 1px solid var(--mmx-line); }

/* phone */
@media (max-width: 1024px) {
	.module-filter.mmx-f .mmx-list > label.mmx-f-row { min-height: 44px; }
	.module-filter.mmx-f .mmx-list > label input { width: 20px; height: 20px; }
	.module-filter.mmx-f .mmx-sw { width: 24px; height: 24px; }
	.module-filter.mmx-f .mmx-list > label .count-badge { font-size: 13px; }
}
.mobile-filter-container .mmx-f-bar {
	position: sticky; bottom: 0; z-index: 5; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: inherit; border-top: 1px solid rgba(128, 128, 128, .3);
}
.mobile-filter-container .mmx-f-show {
	display: block; width: 100%; height: 48px; border-radius: 12px; font-size: 16px; font-weight: 700;
	background: #fff; color: #111; border: 0;
}
.mobile-filter-container .mmx-f-show[disabled] { opacity: .5; }
.mobile-filter-container .mmx-f-bar.mmx-busy .mmx-f-show { opacity: .55; }

/* the assistant's round button would sit on the bar */
html.mobile-filter-active [data-mmx-ai] { display: none !important; }
