/* =========================================================================
   Filament picker, option C (2026-10-16): one line on the page (colour chip,
   material, "Change"), up to six quick picks and a "+N more" sheet with the
   materials down a rail, filters and the colour grid. Shared by the printing
   estimator (React, same class names), /m/ model pages and the models.html
   catalogue modal. Paper look by default; a page can recolour it by setting
   the --fp-* custom properties on .fp (the /m/ pages do, they are dark).
   ========================================================================= */
.fp{
  --fp-ink:#171512;
  --fp-ink-2:#3d3830;
  --fp-mut:#5b554b;
  --fp-line:#d9d2c3;
  --fp-paper:#f3efe6;
  --fp-surface:#ffffff;
  --fp-accent:#b8400a;
  --fp-ring:#171512;
  --fp-on-ink:#f3efe6;
  --fp-mono:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;
  --fp-display:'Fraunces',Georgia,'Times New Roman',serif;
  display:flex;flex-direction:column;gap:8px;min-width:0;color:var(--fp-ink);
}
.fp *,.fp *::before,.fp *::after{box-sizing:border-box}
.fp button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.fp button:focus-visible{outline:3px solid var(--fp-ring);outline-offset:2px}
.fp .fp-label{font-size:13px;font-weight:600;color:var(--fp-ink);margin:0}

/* The one line: swatch, colour + material, Change */
.fp .fp-chip{display:flex;align-items:center;gap:10px;width:100%;min-height:56px;padding:8px 12px;margin:0;
  background:var(--fp-surface);color:var(--fp-ink);border:2px solid var(--fp-ink);border-radius:0;text-align:left;box-shadow:none}
.fp .fp-chip:hover{background:var(--fp-paper)}
.fp .fp-chip:disabled{cursor:not-allowed;opacity:.6}
.fp .fp-chip-text{display:flex;flex-direction:column;flex:1;min-width:0;gap:1px}
.fp .fp-chip-text strong{font-size:15px;line-height:1.25;color:var(--fp-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fp .fp-chip-text small{font-size:12px;line-height:1.3;color:var(--fp-ink-2)}
.fp .fp-change{font-family:var(--fp-mono);font-size:12px;text-decoration:underline;text-underline-offset:3px;color:var(--fp-ink);flex:none}

/* Swatch dot. Background comes inline (solid, silk sheen, conic two/three-tone, rainbow). */
.fp .fp-sw{display:inline-flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;border-radius:50%;
  border:1px solid rgba(0,0,0,.2);background:var(--fp-paper);color:var(--fp-ink);font-size:14px;font-weight:600;line-height:1}
.fp .fp-sw.is-any{background:repeating-linear-gradient(45deg,var(--fp-paper) 0 5px,var(--fp-surface) 5px 10px)}

/* Quick picks */
.fp .fp-quick{display:flex;align-items:center;flex-wrap:wrap;gap:2px 2px;margin:0}
.fp .fp-quick-label{font-size:12px;color:var(--fp-mut);margin-right:4px}
.fp .fp-dot{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;margin:0;border:0;border-radius:50%;background:transparent}
.fp .fp-dot .fp-sw{width:32px;height:32px}
.fp .fp-dot[aria-pressed="true"] .fp-sw{box-shadow:0 0 0 3px var(--fp-surface),0 0 0 5px var(--fp-ring)}
.fp .fp-more{min-height:44px;padding:0 12px;margin:0 0 0 4px;border:1.5px solid var(--fp-ink);border-radius:0;background:var(--fp-paper);color:var(--fp-ink);font-size:13px;white-space:nowrap}
.fp .fp-more:hover{background:var(--fp-surface)}
.fp .fp-note{margin:0;font-size:12.5px;line-height:1.45;color:var(--fp-ink-2)}
.fp .fp-note strong{color:var(--fp-ink)}

/* Sheet: a modal <dialog>, bottom sheet on phones, centred panel on wider screens */
.fp .fp-sheet{position:fixed;inset:auto 0 0 0;width:100%;max-width:100%;height:min(88vh,760px);max-height:none;margin:0;padding:0;
  border:0;border-top:2px solid var(--fp-ink);border-radius:0;background:var(--fp-surface);color:var(--fp-ink);
  box-shadow:0 -18px 40px rgba(23,21,18,.18);overflow:hidden}
.fp .fp-sheet[open]{display:flex;flex-direction:column}
.fp .fp-sheet::backdrop{background:rgba(23,21,18,.45)}
@media (min-width:760px){
  .fp .fp-sheet{inset:0;margin:auto;width:min(760px,94vw);height:min(660px,88vh);border:2px solid var(--fp-ink);box-shadow:8px 8px 0 var(--fp-ink)}
}
@media (prefers-reduced-motion:no-preference){
  .fp .fp-sheet[open]{animation:fp-rise .2s ease-out}
  @keyframes fp-rise{from{transform:translateY(24px);opacity:.4}to{transform:none;opacity:1}}
}
.fp .fp-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px 10px 14px;border-bottom:1px solid var(--fp-line);flex:none}
.fp .fp-head h2{margin:0;font-family:var(--fp-display);font-weight:600;font-size:19px;line-height:1.2;color:var(--fp-ink)}
.fp .fp-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;margin:0;border:1.5px solid var(--fp-ink);border-radius:0;background:var(--fp-surface);color:var(--fp-ink)}
.fp .fp-close svg{width:16px;height:16px}
.fp .fp-body{display:flex;flex:1;min-height:0}
.fp .fp-rail{width:118px;flex:none;display:flex;flex-direction:column;overflow-y:auto;background:var(--fp-paper);border-right:1px solid var(--fp-line)}
.fp .fp-rail button{display:flex;flex:none;flex-direction:column;align-items:flex-start;gap:1px;min-height:56px;height:auto;line-height:1.2;width:100%;padding:7px 8px 7px 10px;margin:0;
  border:0;border-left:4px solid transparent;border-bottom:1px solid var(--fp-line);border-radius:0;background:transparent;color:var(--fp-ink);text-align:left}
.fp .fp-rail button strong{font-size:13px;line-height:1.2;color:var(--fp-ink)}
.fp .fp-rail button small{font-size:11px;line-height:1.25;color:var(--fp-mut)}
.fp .fp-rail button[aria-pressed="true"]{background:var(--fp-surface);border-left-color:var(--fp-accent)}
.fp .fp-rail button:disabled{opacity:.45;cursor:not-allowed}
.fp .fp-main{flex:1;min-width:0;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.fp .fp-desc{margin:0;font-size:12.5px;line-height:1.45;color:var(--fp-ink-2)}
.fp .fp-filters{display:flex;flex-wrap:wrap;gap:6px}
.fp .fp-filters button{min-height:36px;padding:2px 11px;margin:0;border:1.5px solid var(--fp-ink);border-radius:0;background:var(--fp-surface);color:var(--fp-ink);font-size:12.5px}
.fp .fp-filters button[aria-pressed="true"]{background:var(--fp-ink);color:var(--fp-on-ink)}
.fp .fp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:12px 6px}
.fp .fp-tile{display:flex;height:auto;flex-direction:column;align-items:center;gap:5px;min-height:44px;padding:4px 2px;margin:0;border:0;border-radius:0;background:transparent;color:var(--fp-ink)}
.fp .fp-tile .fp-sw{width:48px;height:48px}
.fp .fp-tile[aria-pressed="true"] .fp-sw{box-shadow:0 0 0 3px var(--fp-surface),0 0 0 5px var(--fp-ring)}
.fp .fp-tile-name{font-size:12px;line-height:1.2;text-align:center;color:var(--fp-ink);overflow-wrap:anywhere}
.fp .fp-tile-tag{font-size:10.5px;line-height:1.2;color:var(--fp-mut);text-align:center}
.fp .fp-empty{margin:0;font-size:13px;color:var(--fp-ink-2)}
.fp .fp-sheet-note{margin:0;padding:8px 10px;font-size:12.5px;line-height:1.45;color:var(--fp-ink-2);background:var(--fp-paper);border-left:3px solid var(--fp-accent)}
.fp .fp-foot{display:flex;align-items:center;gap:10px;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));border-top:2px solid var(--fp-ink);flex:none;background:var(--fp-surface)}
.fp .fp-foot .fp-sw{width:32px;height:32px}
.fp .fp-foot-text{flex:1;min-width:0;font-size:14px;font-weight:600;color:var(--fp-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fp .fp-done{min-height:44px;padding:0 18px;margin:0;border:0;border-radius:0;background:var(--fp-ink);color:var(--fp-on-ink);font-weight:600}
@media (max-width:380px){
  .fp .fp-rail{width:104px}
  .fp .fp-grid{grid-template-columns:repeat(auto-fill,minmax(76px,1fr))}
}
html.fp-sheet-open{overflow:hidden}
