/* The screens gallery: toolbar, sets, rows and tiles. Loaded by preview/screens/index.html
   and by every page that shows one set of its own, such as preview/openproject/. */
/* Toolbar: design system, search, filter */
.sc-toolbar {
  position: sticky; top: 0; z-index: 10;
  background: white;
  border-bottom: 1px solid var(--c-cobalt-100);
  box-shadow: var(--shadow-1);
}
.sc-toolbar .sc-wrap { padding-top: var(--space-4); padding-bottom: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.sc-toolbar .line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.sc-toolbar .label { font-family: var(--conduction-typography-font-family-code); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-cobalt-400); }
.sc-toolbar .note { font-size: 13px; color: var(--c-cobalt-700); margin: 0; }
.sc-toolbar input[type="search"], .sc-toolbar select {
  font: inherit; font-size: 15px; color: var(--c-cobalt-900);
  min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--c-cobalt-200); border-radius: var(--radius-sm); background: white;
}
.sc-toolbar input[type="search"] { flex: 1 1 280px; min-width: 0; }
.sc-toolbar select { flex: 0 1 320px; min-width: 0; }
.sc-toolbar input:focus-visible, .sc-toolbar select:focus-visible { outline: 2px solid var(--conduction-color-focus-ring); outline-offset: 1px; }
.sc-toolbar .links { display: flex; gap: var(--space-4); font-size: 14px; }
.sc-toolbar .links button { font: inherit; background: none; border: 0; padding: 4px 0; color: var(--c-blue-cobalt); text-decoration: underline; cursor: pointer; }
.sc-toolbar .links button:hover { color: var(--c-coral-600); }
.sc-toolbar .count { font-family: var(--conduction-typography-font-family-code); font-size: 12px; color: var(--c-cobalt-400); margin-left: auto; }

/* Sets and rows */
.sc-set { margin: var(--space-12) 0; }
.sc-set > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
.sc-set > header h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.sc-set > header .sub { font-size: 14px; color: var(--c-cobalt-700); }
.sc-set > header a { font-size: 14px; color: var(--c-blue-cobalt); }

.sc-row { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-1); margin-bottom: var(--space-3); border: 1px solid transparent; }
.sc-row[open] { border-color: var(--c-cobalt-100); }
.sc-row > summary {
  list-style: none; cursor: pointer;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  padding: var(--space-4) var(--space-6); min-height: 56px;
}
.sc-row > summary::-webkit-details-marker { display: none; }
.sc-row > summary:focus-visible { outline: 2px solid var(--conduction-color-focus-ring); outline-offset: 2px; border-radius: var(--radius-lg); }
.sc-row > summary .chev { width: 18px; height: 18px; flex: none; color: var(--c-cobalt-400); transition: transform 160ms; }
.sc-row[open] > summary .chev { transform: rotate(90deg); }
.sc-row > summary .rt { font-size: 17px; font-weight: 600; color: var(--c-cobalt-900); flex: 1 1 320px; min-width: 0; }
.sc-row > summary .rt .blurb { display: block; font-size: 13px; font-weight: 400; color: var(--c-cobalt-700); margin-top: 2px; line-height: 1.4; }
.sc-row > summary .app { font-family: var(--conduction-typography-font-family-code); font-size: 12px; color: var(--c-cobalt-700); background: var(--c-cobalt-50); border-radius: var(--radius-sm); padding: 2px 8px; }
.sc-row > summary .n { font-family: var(--conduction-typography-font-family-code); font-size: 12px; color: var(--c-cobalt-400); min-width: 9ch; text-align: right; }
.sc-row .tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-5); padding: var(--space-2) var(--space-6) var(--space-6);
}

/* Tiles */
.sc-tile { display: flex; flex-direction: column; border: 1px solid var(--c-cobalt-100); border-radius: var(--radius-md); overflow: hidden; background: white; scroll-margin-top: 200px; transition: box-shadow 160ms, transform 160ms; }
.sc-tile:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.sc-tile.hit { outline: 3px solid var(--c-orange-knvb); outline-offset: 2px; }
.sc-tile .thumb { text-decoration: none; position: relative; display: flex; justify-content: center; align-items: flex-start; height: 190px; overflow: hidden; background: var(--c-cobalt-50); border-bottom: 1px solid var(--c-cobalt-100); }
.sc-tile .thumb img { display: block; height: auto; }
.sc-tile .thumb .ph { align-self: center; font-family: var(--conduction-typography-font-family-code); font-size: 12px; color: var(--c-cobalt-400); }
.sc-tile .hint {
  position: absolute; right: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  background: white; border-radius: 999px; padding: 3px 9px 3px 6px;
  font-size: 11px; color: var(--c-cobalt-700); box-shadow: var(--shadow-1);
}
.sc-tile .hint .dot { width: 10px; height: 12px; clip-path: var(--hex-pointy-top); background: var(--sc-primary, var(--c-blue-cobalt)); }
.sc-tile .meta { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sc-tile .title { font-size: 15px; font-weight: 600; color: var(--c-cobalt-900); text-decoration: none; line-height: 1.35; }
.sc-tile .title:hover { color: var(--c-coral-600); text-decoration: underline; }
.sc-tile .caps { font-size: 12px; color: var(--c-cobalt-700); line-height: 1.4; margin: 0; }
.sc-tile .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }
.sc-tile .size { font-family: var(--conduction-typography-font-family-code); font-size: 11px; color: var(--c-cobalt-400); }
.sc-tile .bs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sc-row > summary .rt .bs-line { display: block; font-size: 13px; font-weight: 500; color: var(--c-cobalt-900); margin-top: 4px; line-height: 1.4; }
.sc-row > summary .rt .bs-bar { display: flex; height: 6px; max-width: 360px; margin-top: 6px; border-radius: 3px; overflow: hidden; background: var(--c-cobalt-100); }
.sc-row > summary .rt .bs-bar span { display: block; height: 100%; }
.sc-row > summary .rt .bs-bar [data-bs="match"] { background: var(--conduction-color-status-success); }
.sc-row > summary .rt .bs-bar [data-bs="differs"] { background: var(--conduction-color-status-info); }
.sc-row > summary .rt .bs-bar [data-bs="partial"] { background: var(--conduction-color-status-warning); }
.sc-row > summary .rt .bs-bar [data-bs="missing"] { background: var(--conduction-color-status-error); }
.bs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 0; vertical-align: middle; background: var(--c-cobalt-100); }
.bs-dot[data-bs="match"] { background: var(--conduction-color-status-success); }
.bs-dot[data-bs="differs"] { background: var(--conduction-color-status-info); }
.bs-dot[data-bs="partial"] { background: var(--conduction-color-status-warning); }
.bs-dot[data-bs="missing"] { background: var(--conduction-color-status-error); }
.bs-dot[data-bs="stateOf"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c-cobalt-300, #9aa5b8); }
.bs-seg { white-space: nowrap; margin-right: 12px; }
.bs-legend { margin-top: 8px; font-size: 13px; color: var(--c-cobalt-700, inherit); }

.sc-empty { padding: var(--space-8); text-align: center; color: var(--c-cobalt-700); }
[hidden] { display: none !important; }
