/* Projects page filter bar — Figma 184:229. Grey chips open a checkbox list; choices show below as round removable chips. */
.wp-block-post-content > .scico-projects-filter { margin-block-start: 0; }

.scico-projects-filter { position: relative; z-index: 5; box-sizing: border-box; margin-block-start: 0; padding: 24px 96px 0; background: #fff; }
.scico-projects-filter__inner { display: flex; width: min(100%, var(--projects-filter-contentWidth, 1248px)); flex-direction: column; align-items: flex-start; gap: 24px; margin-inline: auto; }

.scico-projects-filter__bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
/* The chips wrap in one flow with the filter icon, so on phones the icon never sits alone on a row. */
.scico-projects-filter__groups { display: contents; }
.scico-projects-filter__groups[hidden] { display: none; }
.scico-projects-filter__group { position: relative; }

.scico-projects-filter__toggle,
.scico-projects-filter__chip { display: inline-flex; box-sizing: border-box; height: 48px; align-items: center; justify-content: center; gap: 12px; margin: 0; padding: 0 16px; border: 1px solid transparent; border-radius: 4px; background: var(--projects-filter-chipBackground, #f3efe5); color: var(--projects-filter-chipColor, #4c504a); cursor: pointer; font: inherit; font-size: var(--projects-filter-chipSize, 16px); font-weight: var(--projects-filter-chipWeight, 500); line-height: 1.5; white-space: nowrap; transition: background-color 200ms ease, border-color 200ms ease; }
.scico-projects-filter__toggle { width: 48px; padding: 0; }
.scico-projects-filter__toggle img { display: block; }
/* Figma's arrow-left-01 (7.5×13.5 inside a 24px frame) turns down while its list is open. */
.scico-projects-filter__chevron { display: block; flex: 0 0 auto; margin-inline: 8px; transition: transform 200ms ease; }
.scico-projects-filter__chip[aria-expanded="true"] .scico-projects-filter__chevron { transform: rotate(-90deg); }
.scico-projects-filter__chip[aria-expanded="true"],
.scico-projects-filter__group.is-active .scico-projects-filter__chip { border-color: var(--projects-filter-accentColor, #4c504a); }
.scico-projects-filter__count { display: inline-flex; min-width: 20px; height: 20px; box-sizing: border-box; align-items: center; justify-content: center; padding: 0 6px; border-radius: 10px; background: var(--projects-filter-accentColor, #4c504a); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.scico-projects-filter__count[hidden] { display: none; }
.scico-projects-filter__toggle:focus-visible,
.scico-projects-filter__chip:focus-visible,
.scico-projects-filter__tag:focus-visible,
.scico-projects-filter__clear:focus-visible { outline: 2px solid var(--projects-filter-accentColor, #4c504a); outline-offset: 2px; }

.scico-projects-filter__panel { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 20; display: flex; min-width: 220px; max-width: calc(100vw - 32px); max-height: 320px; box-sizing: border-box; flex-direction: column; gap: 2px; padding: 6px; overflow-y: auto; border: 1px solid #eaeaea; border-radius: 8px; background: #fff; box-shadow: 0 14px 30px rgb(19 22 17 / 10%); }
.scico-projects-filter__panel[hidden] { display: none; }
.scico-projects-filter__panel.is-flipped { inset-inline: auto 0; }
.scico-projects-filter__option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; color: #2a2e28; cursor: pointer; font-size: 15px; font-weight: 500; line-height: 1.5; }
.scico-projects-filter__option input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--projects-filter-accentColor, #4c504a); cursor: pointer; }
.scico-projects-filter__option:has(input:focus-visible) { outline: 2px solid var(--projects-filter-accentColor, #4c504a); outline-offset: -2px; }

.scico-projects-filter__active { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.scico-projects-filter__active[hidden] { display: none; }
.scico-projects-filter__tag { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px 7px 10px; border: 1px solid var(--projects-filter-tagBorder, #000); border-radius: 20px; background: #fff; color: var(--projects-filter-chipColor, #4c504a); cursor: pointer; font: inherit; font-size: var(--projects-filter-tagSize, 14px); font-weight: 500; line-height: 1.5; transition: background-color 200ms ease; }
.scico-projects-filter__tag img { display: block; width: 16px; height: 16px; flex: 0 0 auto; }
.scico-projects-filter__clear { margin: 0; padding: 4px 2px; border: 0; background: none; color: var(--projects-filter-chipColor, #4c504a); cursor: pointer; font: inherit; font-size: var(--projects-filter-tagSize, 14px); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

.scico-projects-filter__empty { margin: 0; color: #4c504a; font-size: 16px; font-weight: 500; line-height: 1.7; }
.scico-projects-filter__empty[hidden] { display: none; }
.scico-projects-filter__status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (hover: hover) {
	.scico-projects-filter__toggle:hover,
	.scico-projects-filter__chip:hover { background: color-mix(in srgb, var(--projects-filter-chipBackground, #f3efe5) 92%, #000); }
	.scico-projects-filter__option:hover { background: var(--projects-filter-chipBackground, #f3efe5); }
	.scico-projects-filter__tag:hover { background: var(--projects-filter-chipBackground, #f3efe5); }
}
@media (prefers-reduced-motion: reduce) {
	.scico-projects-filter__chevron { transition: none; }
}

@media (max-width: 1100px) {
	.scico-projects-filter { padding: 16px 32px 0; }
}

@media (max-width: 600px) {
	.scico-projects-filter { padding: 8px 16px 0; }
	.scico-projects-filter__inner { gap: 16px; }
	.scico-projects-filter__bar { gap: 8px; }
	.scico-projects-filter__toggle,
	.scico-projects-filter__chip { height: 42px; font-size: min(var(--projects-filter-chipSize, 16px), 14px); }
	.scico-projects-filter__toggle { width: 42px; }
	.scico-projects-filter__chip { gap: 8px; padding: 0 12px; }
	.scico-projects-filter__chevron { margin-inline: 4px; }
	.scico-projects-filter__active { gap: 8px; }
}
