/*
 * Styles for the armory views the phone's filter sheet, add-firearm wizard, discover screen, and
 * settings map onto: the loadout filter, the free plan's limit, catalog hints, and AI research.
 * Loaded by views/armory.ts (ensureArmoryStyles) on top of styles.css; tokens come from there.
 */

/* ---------- toolbar: the filter toggle and its active count ---------- */

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-toggle.active {
  border-color: var(--brass);
  color: var(--brass);
}

.filter-toggle .count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brass);
  color: #141414;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* ---------- active filters as chips, each one a remove button ---------- */

.armory-active {
  align-items: center;
  margin: -8px 0 18px;
}

.armory-active .chip,
.armory-filters .chip {
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 0;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.armory-active .chip:hover,
.armory-filters .chip:hover {
  border-color: var(--brass-dim);
}

.armory-active .chip.on,
.armory-filters .chip.on {
  border-color: var(--brass);
  color: var(--brass);
  background: var(--brass-faint);
  box-shadow: 0 0 14px var(--glow);
}

.armory-active .chip .x {
  margin-left: 8px;
  opacity: 0.7;
}

.armory-active button.ghost {
  padding: 4px 10px;
  font-size: 13px;
}

/* ---------- the filter panel ---------- */

.armory-filters .filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.armory-filters .group {
  margin-bottom: 16px;
}

.armory-filters .group > .label {
  display: block;
  margin-bottom: 8px;
}

.armory-filters .switches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}

.armory-filters .switch-row {
  margin: 0;
  align-items: flex-start;
}

.armory-filters .switch-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.armory-filters .switch-row .sub {
  color: var(--muted);
  font-size: 12px;
}

.armory-filters .filters-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.cards .empty button {
  margin-top: 12px;
}

/* ---------- the free plan's limit, shown in place of the add form ---------- */

.rack-full {
  max-width: 560px;
  margin: 40px auto;
  padding: 32px 30px;
}

.rack-full h1 {
  margin: 8px 0 14px;
}

.rack-full .strong {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
}

.rack-full .actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 20px;
}

/* ---------- the firearm form's catalog hint ---------- */

.catalog-hint:empty {
  display: none;
}

.catalog-hint {
  margin: -6px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--brass-dim);
  background: var(--brass-faint);
  color: var(--text);
}

/* ---------- AI research on the record page ---------- */

.intel-research:empty {
  display: none;
}

.intel-research {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.intel-research .label {
  display: block;
  margin: 12px 0 8px;
}

.intel-research .working {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  color: var(--text);
}

.intel-research .working-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intel-research .working-head .label {
  margin: 0;
  color: var(--brass);
}

.intel-research .working-elapsed {
  font-size: 15px;
  color: var(--text);
}

.intel-research .working .boot {
  margin: 0;
}

.intel-research .working-stage {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
}

.intel-research .working-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.intel-specs {
  margin: 8px 0 12px;
}

.intel-sources ul {
  margin: 0 0 12px;
  padding: 0;
}

.intel-research .actions {
  margin-top: 8px;
}
