/* "Shop by Spec" fastener filter - lib/rt-fastener-filter.php */

.rt-ff-dock { margin: 0 0 24px; }
/* Josef 2026-11-23: a gap between the product grid and the filter, like the category menu has */
@media (min-width: 992px) { .rt-ff-dock { margin-left: 30px; } }
.rt-ff {
    --ff-bg: #232323;
    --ff-line: #3a3a3a;
    --ff-muted: #9a9a9a;
    --ff-red: #ee2d33;
    color: #fff;
    background: var(--ff-bg);
    border: 1px solid var(--ff-line);
    border-top: 3px solid var(--ff-red);
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.35;
    position: relative;
}
.rt-ff.is-busy::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -3px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: rtff-load 0.9s linear infinite;
}
@keyframes rtff-load { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.rt-ff__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px 2px; }
.rt-ff__h { margin: 0; font-size: 18px; letter-spacing: .5px; text-transform: uppercase; color: #fff; }
.rt-ff__clear { color: var(--ff-red); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.rt-ff__clear:hover { text-decoration: underline; color: #ff6b70; }
.rt-ff__count { padding: 0 14px 10px; color: var(--ff-muted); font-size: 13px; }

.rt-ff__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.rt-ff__chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 6px 4px 9px;
    background: #143d22; border: 1px solid #2f9e52; border-radius: 14px;
    color: #fff; font-size: 12.5px; text-decoration: none; line-height: 1.2;
}
.rt-ff__chip:hover { border-color: #8fe3a5; color: #fff; }
.rt-ff__chipk { color: #8fe3a5; }
.rt-ff__x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 15px; line-height: 1; color: #cfcfcf; }
.rt-ff__chip:hover .rt-ff__x { background: var(--ff-red); color: #fff; }

/* sections */
.rt-ff__facet { border-top: 1px solid var(--ff-line); }
.rt-ff .rt-ff__title {
    display: flex !important; align-items: center; gap: 8px;
    width: 100% !important; min-height: 44px;
    margin: 0; padding: 10px 14px !important;
    background: transparent !important; color: #fff !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important; text-shadow: none !important;
    font: inherit; font-size: 14px !important; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; text-align: left;
    line-height: 1.2 !important; cursor: pointer;
}
.rt-ff .rt-ff__title:hover { background: #2b2b2b !important; }
.rt-ff__title > span:first-child { flex: 1; }
.rt-ff__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ff-red); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.rt-ff__chev { width: 8px; height: 8px; border-right: 2px solid #cfcfcf; border-bottom: 2px solid #cfcfcf; transform: rotate(45deg); margin: -4px 2px 0 4px; transition: transform .15s; flex: none; }
.rt-ff__facet.is-open .rt-ff__chev { transform: rotate(-135deg); margin-top: 4px; }
.rt-ff__body { display: none; padding: 0 14px 14px; }
.rt-ff__facet.is-open .rt-ff__body { display: block; }

.rt-ff__diagram { margin: 0 0 8px; color: #cfcfcf; }
.rt-ff__svg { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto; font-family: inherit; }
.rt-ff__note { margin: 2px 0 0; padding: 0; color: var(--ff-muted); font-size: 12px; line-height: 1.35; }

.rt-ff__search {
    display: block; width: 100%; height: 36px; margin: 0 0 8px; padding: 0 10px;
    background: #1a1a1a; color: #fff; border: 1px solid var(--ff-line); border-radius: 3px;
    font-size: 16px; /* no iOS zoom */
}
.rt-ff__search:focus { outline: none; border-color: var(--ff-red); }
.rt-ff__nomatch { margin: 6px 0 0; padding: 0; color: var(--ff-muted); font-size: 13px; }

/* options */
.rt-ff__list { display: grid; gap: 2px 10px; }
.rt-ff__list--c1 { grid-template-columns: 1fr; }
.rt-ff__list--c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rt-ff__list--c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rt-ff__list.is-long { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #555 transparent; }
.rt-ff__grp { grid-column: 1 / -1; margin: 8px 0 2px; color: var(--ff-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.rt-ff__grp:first-child { margin-top: 0; }
.rt-ff__opt {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    min-height: 32px; padding: 3px 4px; border-radius: 3px;
    color: #e6e6e6; text-decoration: none; cursor: pointer;
}
.rt-ff__opt:hover { background: #2f2f2f; color: #fff; }
.rt-ff__opt[hidden] { display: none; }
.rt-ff__box { flex: none; width: 16px; height: 16px; border: 1.5px solid #777; border-radius: 3px; position: relative; }
.rt-ff__opt.is-on .rt-ff__box { background: var(--ff-red); border-color: var(--ff-red); }
.rt-ff__opt.is-on .rt-ff__box::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rt-ff__opt.is-on { color: #fff; font-weight: 700; }
.rt-ff__l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-ff__n { flex: none; color: #8a8a8a; font-size: 12px; font-weight: 400; }

/* head styles: picture grid */
.rt-ff__list--icons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rt-ff__list--icons .rt-ff__opt {
    flex-direction: column; justify-content: flex-start; gap: 2px;
    min-height: 0; padding: 6px 2px 5px; text-align: center;
    border: 1px solid transparent; border-radius: 4px;
}
.rt-ff__list--icons .rt-ff__opt:hover { border-color: #555; background: #2b2b2b; }
.rt-ff__list--icons .rt-ff__opt.is-on { border-color: var(--ff-red); background: #3a1214; }
.rt-ff__ico { color: #d8d8d8; line-height: 0; }
.rt-ff__opt.is-on .rt-ff__ico { color: #fff; }
.rt-ff__list--icons .rt-ff__l { white-space: normal; font-size: 12.5px; line-height: 1.15; }
.rt-ff__list--icons .rt-ff__n { font-size: 11px; }

.rt-ff__none { padding: 0 14px 14px; color: var(--ff-muted); }

/* filtered results page: the picks above the parts */
.rt-ff-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 16px; padding: 10px 12px; background: #232323; border: 1px solid #3a3a3a; border-left: 3px solid #ee2d33; border-radius: 3px; }
.rt-ff-bar__lead { color: #9a9a9a; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-right: 2px; }
.rt-ff-bar__clear { margin-left: auto; color: #ee2d33; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.rt-ff-bar__clear:hover { text-decoration: underline; color: #ff6b70; }
@media (max-width: 991px) { .rt-ff-bar .rt-ff__chip { font-size: 14px; padding: 6px 8px 6px 11px; } }

/* desktop: the listing fades while the new one loads */
.content.rt-ff-loading { opacity: .45; transition: opacity .15s; pointer-events: none; }

/* the FILTER button on phones */
@media (max-width: 991px) {
    .filter-results-btn[data-rt-ff] { cursor: pointer; display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; text-decoration: none !important; }
}
@media (min-width: 992px) {
    .rt-ff-on .filter-results-btn { display: none !important; }   /* the panel is already on screen */
}
.rt-ff-btn__n { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: #ee2d33; font-size: 14px; line-height: 1; }

/* ---------------- phone sheet ---------------- */
.rt-ff-sheet[hidden] { display: none !important; }
.rt-ff-sheet {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; flex-direction: column;
    background: #1c1c1c; color: #fff;
}
html.rt-ff-locked, html.rt-ff-locked body { overflow: hidden !important; }
.rt-ff-sheet__bar { flex: none; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 8px 0 16px; border-bottom: 1px solid #3a3a3a; background: #111; }
.rt-ff-sheet__h { margin: 0; font-size: 20px; letter-spacing: .6px; text-transform: uppercase; color: #fff; }
.rt-ff-sheet .rt-ff-sheet__close {
    width: 44px !important; height: 44px !important; min-width: 0; padding: 0 !important;
    background: transparent !important; color: #fff !important; border: 0 !important; box-shadow: none !important;
    font-size: 32px !important; line-height: 1 !important; cursor: pointer;
}
.rt-ff-sheet__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.rt-ff-sheet .rt-ff { border: 0; border-radius: 0; background: transparent; }
.rt-ff-sheet .rt-ff__top { display: none; }
.rt-ff-sheet .rt-ff__count { padding-top: 12px; }
.rt-ff-sheet .rt-ff .rt-ff__title { min-height: 52px; font-size: 15px !important; padding: 12px 16px !important; }
.rt-ff-sheet .rt-ff__body { padding: 0 16px 16px; }
.rt-ff-sheet .rt-ff__chips { padding: 0 16px 12px; }
.rt-ff-sheet .rt-ff__opt { min-height: 42px; font-size: 15px; }
.rt-ff-sheet .rt-ff__box { width: 20px; height: 20px; }
.rt-ff-sheet .rt-ff__opt.is-on .rt-ff__box::after { left: 6px; top: 2px; width: 5px; height: 10px; }
.rt-ff-sheet .rt-ff__list.is-long { max-height: 46vh; }
.rt-ff-sheet .rt-ff__list--icons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rt-ff-sheet .rt-ff__list--icons .rt-ff__opt { min-height: 78px; }
.rt-ff-sheet__foot {
    flex: none; display: flex; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #3a3a3a; background: #111;
}
.rt-ff-sheet__clear { flex: none; padding: 0 6px; color: #fff; font-weight: 700; text-decoration: underline; font-size: 15px; }
.rt-ff-sheet__clear[hidden] { display: none; }
.rt-ff-sheet__go {
    flex: 1; display: flex; align-items: center; justify-content: center;
    height: 50px; border-radius: 3px; background: #ee2d33; color: #fff !important;
    font-weight: 700; font-size: 17px; letter-spacing: .5px; text-transform: uppercase; text-decoration: none !important;
}
.rt-ff-sheet__go.is-zero { background: #4a4a4a; color: #bbb !important; }
@media (min-width: 992px) { .rt-ff-sheet { display: none !important; } }

/* "See more" (Material: Titanium shown, the rest on request) */
.rt-ff__opt.is-more { display: none; }
.rt-ff__facet.show-more .rt-ff__opt.is-more { display: flex; }
.rt-ff .rt-ff__more {
    display: inline-block !important; width: auto !important; height: auto !important; margin: 4px 0 0 !important; padding: 4px 4px !important;
    background: transparent !important; color: #ee2d33 !important; border: 0 !important; box-shadow: none !important; text-shadow: none !important;
    font: inherit; font-size: 13px !important; font-weight: 700; text-transform: none !important; letter-spacing: 0 !important; cursor: pointer;
}
.rt-ff .rt-ff__more:hover { text-decoration: underline; }
/* came from the search bar: the way back to a plain site-wide search */
.rt-ff-sitewide { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -6px 0 16px; padding: 10px 12px; background: #232323; border: 1px solid #3a3a3a; border-radius: 3px; color: #cfcfcf; font-size: 14px; }
.rt-ff-sitewide__go { color: #fff !important; background: #ee2d33; padding: 5px 12px; border-radius: 3px; font-weight: 700; font-size: 13px; text-decoration: none !important; }
.rt-ff-sitewide__go:hover { background: #c9252a; }
