/* Copyright (c) 2026. All rights reserved. See LICENSE. */
/* The window library (windows.html): filters down the side, the windows in a grid, one picked in 3D at the right. */
:root {
  --film: #e9ece8; --paper: #fbfbf9; --graphite: #23272b; --lead: #5c636a; --rule: #cfd5d1; --rule-strong: #9aa39e;
  --blue: #7fb3c8; --ink: #2b6f9e; --wash: #e6f0f4;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(35, 39, 43, .08), 0 6px 18px rgba(35, 39, 43, .10);
  --r: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--film); color: var(--graphite); font: 400 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.wl-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--film); border-bottom: 1px solid var(--rule); }
.wl-top h1 { margin: 0; font-size: 18px; font-weight: 750; font-stretch: 90%; }
.wl-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; font-weight: 700; font-size: 13px;
  text-decoration: none; color: var(--graphite); background: var(--paper); border: 1px solid var(--rule-strong);
  border-radius: var(--r); box-shadow: var(--shadow); }
.wl-count { color: var(--lead); font-size: 13px; font-variant-numeric: tabular-nums; }

.wl-main { display: grid; grid-template-columns: 290px 1fr; gap: 16px; padding: 16px; align-items: start; }
.wl-filters { position: sticky; top: 77px; max-height: calc(100vh - 93px); overflow: auto; display: grid; gap: 14px;
  padding: 12px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r); box-shadow: var(--shadow); }
.wl-filters section { display: grid; gap: 6px; }
.wl-filters h2 { margin: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--lead);
  display: flex; justify-content: space-between; gap: 8px; }
.wl-sub { color: var(--lead); font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 400; }

.wl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wl-chips button { height: 28px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: 14px;
  background: #fff; cursor: pointer; font-size: 12.5px; }
.wl-chips button:hover { border-color: var(--graphite); }
.wl-chips button[aria-pressed=true] { background: var(--graphite); border-color: var(--graphite); color: var(--paper); }

.wl-shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.wl-shapes button { aspect-ratio: 1; display: grid; place-items: center; padding: 6px; border: 1px solid var(--rule-strong);
  border-radius: 6px; background: #fff; cursor: pointer; }
.wl-shapes button:hover { border-color: var(--graphite); }
.wl-shapes svg { width: 100%; height: 100%; overflow: visible; }
.wl-shapes path { fill: var(--wash); stroke: var(--graphite); stroke-width: 6; vector-effect: non-scaling-stroke; stroke-width: 1.5px; }
.wl-shapes button[aria-pressed=true] { background: var(--graphite); border-color: var(--graphite); }
.wl-shapes button[aria-pressed=true] path { fill: var(--blue); stroke: var(--paper); }

.wl-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-swatches button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--rule-strong); cursor: pointer;
  padding: 0; box-shadow: inset 0 0 0 2px #fff; }
.wl-swatches button[aria-pressed=true] { outline: 2px solid var(--graphite); outline-offset: 2px; }

.wl-size { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wl-size label { display: grid; gap: 2px; font-size: 12px; color: var(--lead); }
.wl-size select { height: 30px; padding: 0 6px; border: 1px solid var(--rule-strong); border-radius: 6px; background: #fff; }
.wl-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.wl-check input { width: 16px; height: 16px; accent-color: var(--ink); }
.wl-btn { height: 30px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 15px; background: var(--paper);
  cursor: pointer; font-size: 12.5px; font-weight: 600; justify-self: start; }
.wl-btn:hover { border-color: var(--graphite); }

.wl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.wl-card { display: grid; grid-template-rows: 190px auto; width: 100%; padding: 8px 8px 10px; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); }
.wl-card:hover { border-color: var(--graphite); box-shadow: var(--shadow); }
.wl-card[aria-current=true] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.wl-pic { min-height: 0; }
.wl-card svg { display: block; width: 100%; height: 100%; }
.wl-card b { display: block; font-size: 12.5px; font-weight: 650; line-height: 1.3; }
.wl-card span { display: block; color: var(--lead); font-size: 11.5px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.wl-empty { color: var(--lead); }
.wl-more { height: 1px; }

.wl-detail { position: fixed; right: 16px; top: 77px; bottom: 16px; width: min(440px, calc(100vw - 32px)); z-index: 8;
  display: grid; grid-template-rows: auto minmax(220px, 1fr) auto auto; gap: 10px; padding: 12px; overflow: auto;
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r); box-shadow: var(--shadow); }
.wl-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.wl-detail-head b { display: block; font-size: 15px; }
.wl-x { width: 30px; height: 30px; border: 1px solid var(--rule-strong); border-radius: 50%; background: #fff; cursor: pointer;
  font-size: 18px; line-height: 1; }
.wl-view { position: relative; border-radius: 6px; overflow: hidden; background: linear-gradient(#dfe7ea, #f3f4f1); min-height: 220px; }
.wl-view canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.wl-tabs { display: grid; gap: 8px; }
.wl-specs { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 12.5px; }
.wl-specs dt { color: var(--lead); }
.wl-specs dd { margin: 0; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .wl-main { grid-template-columns: 1fr; }
  .wl-filters { position: static; max-height: none; }
  .wl-top { flex-wrap: wrap; }
  .wl-detail { top: auto; height: 78vh; left: 16px; width: auto; }
}
