/* List filter for /our-clients and /case-studies (markup built by list-filter.js).
   Colours and type come from the Webflow theme: black ground, white text, #fff85e accent, Sf Pro Display. */
.ssw-filter {
  --sf-fg: #fff;
  --sf-mut: #8a8a8a;
  --sf-line: #393939;
  --sf-acc: #fff85e;
  --sf-panel: #0d0d0d;
  --sf-hover: #1c1c1c;
  color: var(--sf-fg);
  font-family: "Sf Pro Display", Arial, sans-serif;
  margin-bottom: 24px;
}
.sf-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: .5px solid var(--sf-line); }
.sf-meta { flex-basis: 100%; display: flex; justify-content: center; align-items: baseline; gap: 16px; }
.sf-facet { position: relative; display: flex; align-items: center; }

.sf-trigger {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px;
  border: .5px solid var(--sf-mut); border-radius: 100px; background: transparent;
  color: var(--sf-fg); font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.sf-trigger:hover, .sf-trigger[aria-expanded="true"] { border-color: var(--sf-fg); }
.sf-text { display: flex; min-width: 0; white-space: nowrap; }
.sf-label { flex: none; }
.sf-value { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.sf-chev { width: 12px; height: 8px; transition: transform .15s; }
.sf-trigger[aria-expanded="true"] .sf-chev { transform: rotate(180deg); }
.sf-facet.is-set .sf-trigger { border-color: var(--sf-acc); color: var(--sf-acc); padding-right: 48px; }
.sf-facet.is-set .sf-chev { display: none; }
.sf-x {
  position: absolute; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--sf-acc); font-size: 20px; line-height: 1; cursor: pointer;
}
.sf-x:hover { background: var(--sf-hover); }

.sf-status { margin: 0; color: var(--sf-mut); font-size: 14px; font-variant-numeric: tabular-nums; }
.sf-clear, .sf-empty button {
  padding: 0; border: 0; background: none; color: var(--sf-fg); font: inherit; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

.sf-panel {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(680px, calc(100vw - 32px)); max-height: min(60vh, 480px); overflow: auto;
  padding: 12px; background: var(--sf-panel); border: .5px solid var(--sf-line); border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .7);
}
.sf-head { display: none; }
.sf-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.sf-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--sf-fg); font: inherit; font-size: 14px; line-height: 1.3; text-align: left; cursor: pointer;
}
.sf-opt:hover { background: var(--sf-hover); }
.sf-opt[aria-pressed="true"] { background: var(--sf-fg); color: #000; }
.sf-opt:disabled { color: #4d4d4d; background: none; cursor: default; }
.sf-n { color: var(--sf-mut); font-size: 12px; font-variant-numeric: tabular-nums; }
.sf-opt[aria-pressed="true"] .sf-n { color: #000; }
.sf-opt:disabled .sf-n { color: #4d4d4d; }
.sf-all { grid-column: 1 / -1; border-bottom: .5px solid var(--sf-line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }

.sf-trigger:focus-visible, .sf-x:focus-visible, .sf-opt:focus-visible, .sf-clear:focus-visible,
.sf-close:focus-visible, .sf-empty button:focus-visible { outline: 2px solid var(--sf-acc); outline-offset: 2px; }

.sf-backdrop { position: fixed; inset: 0; z-index: 9998; background: rgba(0, 0, 0, .6); }
.sf-empty { padding: 48px 0; color: var(--sf-mut); text-align: center; }
[data-filter-list] > [hidden], .sf-panel[hidden], .sf-backdrop[hidden], .sf-x[hidden], .sf-clear[hidden], .sf-empty[hidden] { display: none !important; }
html.sf-lock { overflow: hidden; }

@media (max-width: 991px) { .sf-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .sf-facet { flex: 1 1 40%; min-width: 0; }
  .sf-trigger { width: 100%; justify-content: space-between; padding: 0 16px; }
  .sf-facet.is-set .sf-trigger { padding-right: 44px; }
  .sf-value { max-width: none; }
  .sf-meta { justify-content: space-between; }
  .sf-panel {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 9999; width: auto; max-height: 75vh; transform: none;
    padding: 0 12px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 16px 16px 0 0;
  }
  .sf-head {
    display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0;
    padding: 16px 4px 12px; background: var(--sf-panel); font-size: 17px; font-weight: 600;
  }
  .sf-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--sf-hover); color: var(--sf-fg); font-size: 22px; line-height: 1; cursor: pointer; }
  .sf-opts { grid-template-columns: 1fr; }
  .sf-opt { padding: 14px 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .sf-trigger, .sf-chev { transition: none; } }
