/* Workshop (src/ui/workshop.js): one tab per crafting discipline, the discipline head (mastery, class perks), the
   recipe toolbar, tier groups, locked drop-only recipes, and the recipe-item lines in the bag, tooltips and the
   Auction House. Owner rule: no yellow / gold text - counts use the green "ready" accent, tags the theme accents.
   The panel is 350-430 px wide on desktop and the full width on phones, so the tab strip is always 4 x 2. */
.ws-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0 0 var(--s-3); }
.ws-tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 48px;
  padding: 5px 3px 6px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface-sunken);
  color: var(--text-muted); font: inherit; text-align: center; cursor: pointer;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.ws-tab:hover { color: var(--text-strong); border-color: var(--border-strong); }
.ws-tab.on { color: var(--text-strong); border-color: var(--sel-line); background: var(--sel-soft); box-shadow: inset 0 -3px 0 var(--sel); }
.ws-tab:focus-visible { outline-offset: 1px; }
.ws-tab-top { display: inline-flex; align-items: center; gap: 5px; }
.ws-tab-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); font-weight: 800; line-height: 1.15; }
.ws-tab-sub { font-size: var(--fs-micro); font-weight: 800; line-height: 1; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-tab.on .ws-tab-sub { color: var(--sel-text); }
/* recipes the hero can craft right now: dark green on light, light green on dark, the number in the surface colour */
.ws-tab-n {
  position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--good-strong); color: var(--surface-1); font-size: var(--fs-micro); font-weight: 900; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface-1);
}
/* a recipe item in the bag teaches a recipe of this tab: a dot inside the cell (the count sits on the other corner) */
.ws-tab-new { position: absolute; top: 5px; left: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--sel); box-shadow: 0 0 0 2px var(--sel-soft); }

.ws-head { padding-top: 10px; padding-bottom: 10px; }
.ws-head-top { display: flex; align-items: center; gap: 10px; }
.ws-head-top .h4 { margin: 0; }
.ws-head-top > .ico { flex: none; padding: 3px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--tile-bg); }
.ws-lv { flex: none; font-weight: 800; font-size: var(--fs-sm); color: var(--accent-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-lv .muted { font-weight: 700; }
.ws-head .bar.craft { height: 15px; margin-top: 4px; }
.ws-head-note { margin-top: 7px; }
.ws-perks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--hairline-2); }
.ws-perks-h { flex: 1 0 100%; font-size: var(--fs-micro); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.ws-perk { padding: 1px 8px; border-radius: var(--radius-sm); border: 1px solid var(--good-line); background: var(--good-soft); color: var(--good-text); font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; }

.ws-tools { margin: 0 0 var(--s-2); }
.ws-tools-row { display: flex; align-items: center; gap: 6px; }
.ws-tools .qs-field { flex: 1 1 auto; min-width: 0; margin: 0; }
.ws-tools-row .chip { flex: none; min-height: 34px; }
.ws-chip-n { margin-left: 6px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--good-soft); color: var(--good-text); font-variant-numeric: tabular-nums; }
.ws-tools .catalyst { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; margin: 7px 0 0; }
.catalyst-picks { display: inline-flex; gap: 4px; }

.ws-group .section-title { margin-top: var(--s-3); }
.ws-group .section-title > span { white-space: nowrap; }
.ws-group-note { font-weight: 700; letter-spacing: 0.4px; text-transform: none; color: var(--text-faint); }
.ws-group-hint { margin: -2px 2px var(--s-2); }
/* a group whose recipes are all hidden by the quick search disappears with them */
.ws-group:not(:has(.recipe:not([hidden]))) { display: none; }

.recipe-odds { margin-top: 6px; }
.ws-learned { color: var(--r-unique); border-color: var(--r-unique-line); background: var(--r-unique-tint); }
.recipe.locked { background: var(--surface-sunken); border-style: dashed; }
.recipe.locked.has { border-style: solid; border-color: var(--good-line); }
.recipe.locked .recipe-ico { position: relative; }
.recipe.locked .recipe-ico > .ico { opacity: 0.55; filter: grayscale(0.6); }
.ws-lock { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); }
.ws-recipe-item { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; cursor: help; vertical-align: middle; }
.ws-recipe-item .ico { flex: none; }

/* recipe items: the tooltip block, the line under bag selections and Auction House listings */
.tt-recipe { margin-top: 2px; }
.tt-recipe > div { margin: 2px 0; }
.tt-recipe-out { font-weight: 800; }
.tt-known { font-weight: 800; }
.tt-known.yes { color: var(--text-muted); }
.tt-known.no { color: var(--good-text); }
.ah-recipe { margin-top: 1px; color: var(--text-muted); }
.recipe-tag { display: inline-block; padding: 0 6px; border: 1px solid var(--good-line); border-radius: var(--radius-pill); font-size: var(--fs-micro); font-weight: 800; color: var(--good-text); background: var(--good-soft); }
.recipe-tag.known { color: var(--text-muted); border-color: var(--border); background: transparent; }

@media (max-width: 420px) {
  .ws-tab { padding: 5px 2px 6px; }
  .ws-tab-name { font-size: 12px; }
}
