/* ESPANT filter presentation. Load after espant-catalog-adapter.css.
   No routing, form, product, SEO or landing-page changes. */
.ec-sidebar {
  --ef-accent: #ef703d;
  --ef-soft: #fff3ec;
  --ef-selected: #a63c16;
  --ef-focus: #bd471d;
}
html.dark-theme .ec-sidebar {
  --ef-soft: #382c28;
  --ef-selected: #ffb28b;
  --ef-focus: #ffac82;
}
.ec-sidebar .ec-filters {
  border-radius: 16px;
  border-color: var(--esp-line, #dfe5eb);
  box-shadow: 0 3px 14px rgb(25 38 48 / 3%);
}
.ec-sidebar .ec-filters > summary {
  align-items: center;
  min-height: 60px;
  padding: 16px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  background: var(--esp-soft, #f5f7fa);
}
.ec-sidebar .ec-filters[open] > summary {
  border-bottom: 1px solid var(--esp-line, #dfe5eb);
  margin-bottom: 18px;
}
.ec-sidebar .ec-filters > summary > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--esp-line, #dfe5eb);
  border-radius: 9px;
  color: var(--esp-ink, #192630);
  background: var(--esp-surface, #fff);
}
.ec-sidebar #ec-filter-form {
  padding: 0 14px 14px;
  font-size: 14px;
  line-height: 1.5;
}
.ec-sidebar .ec-equipment-panel {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-color: var(--esp-line, #dfe5eb);
}
.ec-sidebar .ec-equipment-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--esp-ink, #192630);
}
.ec-sidebar .ec-type-search-label,
.ec-sidebar .ec-filter-search-label {
  font-size: 14px;
  color: var(--esp-muted, #617185);
  font-weight: 500;
}
.ec-sidebar #ec-type-search,
.ec-sidebar #ec-filter-search {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 11px 12px 11px 36px;
  margin-bottom: 12px;
  border: 1px solid var(--esp-line, #dfe5eb);
  border-radius: 10px;
  background-color: var(--esp-surface, #fff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23778696' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E");
  background-position: 11px center;
  background-repeat: no-repeat;
  color: var(--esp-ink, #192630);
  box-shadow: none;
  font: inherit;
}
.ec-sidebar #ec-type-search::placeholder,
.ec-sidebar #ec-filter-search::placeholder {
  color: var(--esp-muted, #617185);
  opacity: 1;
  font-size: 14px;
}
.ec-sidebar .ec-type-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 336px;
  padding: 2px 5px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--esp-line, #cbd4df) transparent;
  scrollbar-gutter: stable;
}
.ec-sidebar .ec-type-options label {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 11px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--esp-ink, #192630);
}
.ec-sidebar .ec-type-options label[hidden],
.ec-sidebar .ec-filter-group[hidden] { display: none; }
.ec-sidebar #ec-filter-form input[type=radio],
.ec-sidebar #ec-filter-form input[type=checkbox] {
  appearance: auto;
  position: static;
  opacity: 1;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ef-focus);
  cursor: pointer;
}
.ec-sidebar .ec-type-options span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ec-sidebar .ec-type-options small {
  flex: 0 0 auto;
  min-width: 24px;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--esp-soft, #f5f7fa);
  color: var(--esp-muted, #617185);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
  opacity: 1;
}
.ec-sidebar .ec-type-options label:has(input:checked) {
  border-color: var(--ef-accent);
  background: var(--ef-soft);
  color: var(--ef-selected);
  font-weight: 600;
}
.ec-sidebar .ec-type-options label:has(input:checked) small {
  background: var(--esp-surface, #fff);
  color: var(--ef-selected);
}
.ec-sidebar .ec-type-hint {
  margin: 12px 2px 0;
  color: var(--esp-muted, #617185);
  font-size: 13px;
  line-height: 1.6;
  opacity: 1;
}
.ec-sidebar .ec-stock-filter {
  padding: 12px;
  border-color: var(--esp-line, #dfe5eb);
  border-radius: 10px;
  background: var(--esp-soft, #f5f7fa);
  margin-bottom: 20px;
}
.ec-sidebar .ec-stock-filter label { min-height: 22px; gap: 10px; font-size: 14px; }
.ec-sidebar .ec-stock-filter:has(input:checked) {
  background: var(--ef-soft);
  border-color: var(--ef-accent);
  color: var(--ef-selected);
}
.ec-sidebar .ec-price-filter { margin-bottom: 20px; }
.ec-sidebar .ec-price-filter legend,
.ec-sidebar .ec-brand-filter {
  font-size: 14px;
  font-weight: 600;
  color: var(--esp-ink, #192630);
}
.ec-sidebar .ec-price-filter label {
  min-height: 46px;
  padding: 10px;
  gap: 6px;
  border-radius: 10px;
  background: var(--esp-surface, #fff);
}
.ec-sidebar .ec-price-filter span { font-size: 12px; }
.ec-sidebar .ec-price-filter input { font-variant-numeric: tabular-nums; }
.ec-sidebar .ec-price-filter label:focus-within {
  outline: 2px solid var(--ef-focus);
  outline-offset: 2px;
}
.ec-sidebar .ec-price-filter input:focus-visible { outline: none; }
.ec-sidebar #ec-brand {
  min-height: 46px;
  padding: 10px 32px 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23778696' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.ec-sidebar .ec-filter-group { padding: 3px 0; }
.ec-sidebar .ec-filter-group > summary {
  padding: 14px 2px;
  font-size: 14px;
  color: var(--esp-ink, #192630);
}
.ec-sidebar .ec-filter-values { padding: 2px 4px 10px 2px; }
.ec-sidebar .ec-filter-values label {
  gap: 9px;
  min-height: 44px;
  padding: 10px 8px;
  margin: 2px 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.ec-sidebar .ec-filter-values label:has(input:checked) {
  background: var(--ef-soft);
  color: var(--ef-selected);
}
.ec-sidebar .ec-filter-actions { gap: 8px; padding-top: 20px; }
.ec-sidebar .ec-filter-actions button {
  min-height: 48px;
  border-radius: 10px;
  background: #ff793f;
  color: #192630;
  font-size: 14px;
  font-weight: 700;
}
.ec-sidebar .ec-filter-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--esp-muted, #617185);
}
.ec-sidebar :is(input, select, button, a, summary):focus-visible {
  outline: 2px solid var(--ef-focus);
  outline-offset: 3px;
}
@media (hover: hover) {
  .ec-sidebar .ec-type-options label:hover,
  .ec-sidebar .ec-filter-values label:hover,
  .ec-sidebar .ec-filter-actions a:hover { background: var(--esp-soft, #f5f7fa); }
  .ec-sidebar .ec-type-options label:has(input:checked):hover,
  .ec-sidebar .ec-filter-values label:has(input:checked):hover { background: var(--ef-soft); }
  .ec-sidebar .ec-filter-actions button:hover { background: #ff8b58; }
}
@media (min-width: 1200px) {
  .ec-live-catalog .ec-layout { grid-template-columns: 290px minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .ec-sidebar .ec-filters { border-radius: 14px; }
  .ec-sidebar .ec-filters > summary { min-height: 56px; }
  .ec-sidebar .ec-filters[open] > summary { margin-bottom: 16px; }
  .ec-sidebar #ec-filter-form { padding: 0 14px 14px; }
  .ec-sidebar #ec-type-search,
  .ec-sidebar #ec-filter-search,
  .ec-sidebar #ec-brand,
  .ec-sidebar .ec-price-filter input { font-size: 16px; }
  .ec-sidebar .ec-type-options { max-height: 285px; }
  .ec-sidebar .ec-filter-actions {
    padding: 12px 0 4px;
    background: var(--esp-surface, #fff);
  }
}
@media (forced-colors: active) {
  .ec-sidebar .ec-type-options label:has(input:checked),
  .ec-sidebar .ec-stock-filter:has(input:checked) { border-color: Highlight; }
}

/* Applied filters: keep the label and remove icon centered, including wrapped text. */
.ec-live-catalog .ec-picked {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}
.ec-live-catalog .ec-picked button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 10px 8px 12px;
  border: 1px solid #f2c8b5;
  border-radius: 10px;
  background: #fff3ec;
  color: var(--esp-ink, #192630);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.ec-live-catalog .ec-picked button span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  line-height: 1;
  color: #a63c16;
}
.ec-live-catalog .ec-picked button:focus-visible {
  outline: 2px solid #bd471d;
  outline-offset: 3px;
}
html.dark-theme .ec-live-catalog .ec-picked button {
  background: #382c28;
  border-color: #795140;
}
html.dark-theme .ec-live-catalog .ec-picked button span { color: #ffb28b; }
html.dark-theme .ec-live-catalog .ec-picked button:focus-visible { outline-color: #ffac82; }
@media (hover: hover) {
  .ec-live-catalog .ec-picked button:hover { border-color: #ef703d; }
}

/* Live characteristic counts; long labels keep their own flexible column. */
.ec-sidebar .ec-facet-hint {
  margin: 0 2px 12px;
  color: var(--esp-muted, #617185);
  font-size: 12px;
  line-height: 1.5;
}
.ec-sidebar .ec-filter-values label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 9px;
}
.ec-sidebar .ec-filter-values label > span { min-width: 0; overflow-wrap: anywhere; }
.ec-sidebar .ec-facet-count {
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--esp-soft, #f5f7fa);
  color: var(--esp-muted, #617185);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ec-sidebar .ec-filter-values label:has(input:checked) .ec-facet-count {
  background: var(--esp-surface, #fff);
  color: var(--ef-selected);
}
.ec-sidebar .ec-filter-values label.ec-facet-unavailable {
  color: var(--esp-muted, #617185);
  cursor: not-allowed;
}
.ec-sidebar .ec-filter-values label.ec-facet-unavailable .ec-facet-count {
  background: transparent;
  opacity: .7;
}
.ec-sidebar #ec-filter-form .ec-facet-unavailable input { cursor: not-allowed; }
@media (hover: hover) {
  .ec-sidebar .ec-filter-values label.ec-facet-unavailable:hover { background: transparent; }
}
