/*
 * The attribute filter bar of a product listing (parts/filter-bar.php).
 * Only .flt- and .flt__- selectors live here; tokens, bands, cards and buttons come
 * from style.css. Nothing here overrides an existing style.css rule.
 */

/* ---- The bar: a white card over the product grid ------------------------ */
.flt{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:0 10px 30px rgba(24,51,77,.055);padding:16px 18px;margin:0 0 24px}

.flt__head{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:0 0 14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.flt__count{margin:0;font-size:13.5px;font-weight:700;color:var(--ink);letter-spacing:-.01em}
.flt__of{margin-left:2px;font-size:12.5px;font-weight:500;color:var(--muted);letter-spacing:0}
.flt__clear{font-size:12.5px;font-weight:700;color:var(--blue);text-decoration:underline;text-underline-offset:3px;transition:color .18s}
.flt__clear:hover{color:var(--blue-deep)}

/* ---- One dimension per group ------------------------------------------- */
.flt__groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:12px 14px;align-items:end}
.flt__group{display:flex;flex-direction:column;gap:5px;min-width:0}
.flt__label{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:800;color:var(--muted)}

.flt__select{width:100%;min-height:40px;padding:8px 30px 8px 11px;border:1px solid #D8E4EF;border-radius:11px;background-color:#fff;color:var(--ink);font-size:13.5px;font-weight:600;line-height:1.3;cursor:pointer;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%2365778A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;background-size:11px 7px;transition:border-color .18s,background-color .18s,color .18s;text-overflow:ellipsis}
.flt__select:hover{border-color:#9EC2E8}
.flt__select:focus-visible{outline:3px solid rgba(11,95,255,.28);outline-offset:1px;border-color:var(--blue)}
.flt__group--on .flt__label{color:var(--blue)}
.flt__group--on .flt__select{border-color:var(--blue);background-color:#F5F8FF;color:var(--blue);font-weight:800}

/* ---- Apply -------------------------------------------------------------- */
.flt__group--action{justify-content:flex-end}
.flt__group--action .flt__label{visibility:hidden}
.flt__submit{width:100%;min-height:40px;padding:9px 18px;border:1px solid var(--blue);border-radius:11px;background:var(--blue);color:#fff;font-size:13px;font-weight:800;cursor:pointer;box-shadow:0 8px 18px rgba(11,95,255,.18);transition:background .18s,border-color .18s,transform .18s}
.flt__submit:hover{background:var(--blue-deep);border-color:var(--blue-deep);transform:translateY(-1px)}
.flt__submit:focus-visible{outline:3px solid rgba(11,95,255,.35);outline-offset:2px}

/* ---- Applied filters, each removable ----------------------------------- */
.flt__chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 0;padding-top:12px;border-top:1px solid var(--line)}
.flt__chips-label{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;font-weight:800;color:var(--muted);margin-right:2px}
.flt__chip{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:6px 11px;border:1px solid rgba(11,95,255,.28);border-radius:100px;background:#F2F7FF;color:var(--blue);font-size:12.5px;font-weight:700;line-height:1.2;transition:background .18s,border-color .18s}
.flt__chip:hover{background:#E4EEFF;border-color:var(--blue)}
.flt__chip:focus-visible{outline:3px solid rgba(11,95,255,.3);outline-offset:2px}
.flt__chip-key{font-weight:600;color:#3E6AA6}
.flt__chip-value{font-weight:800}
.flt__chip-x{font-size:14px;line-height:1;color:#7290B5}
.flt__chip:hover .flt__chip-x{color:var(--blue)}

/* ---- The empty result of a filter set ---------------------------------- */
.flt-empty .empty__text{margin-bottom:0}
.flt-empty__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin:16px 0 0}

/* ---- Screen-reader text: the chip's "remove" wording ------------------- */
.flt__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width:720px){
  .flt{padding:14px}
  .flt__groups{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
  .flt__chips-label{flex-basis:100%;margin-bottom:2px}
}
@media (max-width:460px){
  .flt__groups{grid-template-columns:1fr}
  .flt-empty__actions .btn{width:100%}
}
