/* Конфигуратор кораблей. Цвета — токены из /assets/css/site.css. */

.cfg { margin-top: 8px; }
.cfg-loading { color: var(--muted); }
.cfg-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.cfg-col, .cfg-wide { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.cfg-card, .cfg-mod {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.cfg-mod { margin: 0; }
.cfg-mod legend { font-weight: 700; padding: 0 6px; }
.cfg-sub { font-weight: 400; color: var(--muted); font-size: .85rem; }
.cfg-h { font-size: 1.15rem; margin: 0 0 10px; }
.cfg-h small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.cfg h3 { font-size: 1rem; margin: 14px 0 8px; color: var(--muted); }
.cfg-hint { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.cfg-warn { color: var(--accent); margin-top: 8px; }
.cfg-error { border-color: var(--accent); color: var(--accent); }

.cfg select {
  width: 100%; max-width: 100%;
  font: inherit; font-size: .95rem;
  padding: 7px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
.cfg select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

.cfg-hull { display: flex; gap: 12px; align-items: center; }
.cfg-hull-ico { width: 72px; height: 72px; object-fit: contain; flex: none; }
.cfg-hull-main { flex: 1; min-width: 0; }

.cfg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.cfg-btn {
  font: inherit; font-size: .9rem; cursor: pointer;
  padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
.cfg-btn:hover { border-color: var(--accent); }

.cfg-slot { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.cfg-mod > .cfg-slot:first-of-type, .cfg-bbody > .cfg-slot:first-child { border-top: 0; }
.cfg-slot-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cfg-slot-label { font-size: .8rem; color: var(--muted); }
.cfg-ico { width: 40px; height: 40px; object-fit: contain; flex: none; border-radius: 8px; background: var(--surface-2); }
.cfg-ico.is-empty { display: inline-block; }
.cfg-sico { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 6px; }

.cfg-load { margin-top: 10px; }
.cfg-load-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 4px; }
.cfg-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.cfg-bar i { display: block; height: 100%; background: #3f9b6b; }
.cfg-load.is-over .cfg-bar i { background: #d0493b; }
.cfg-load.is-over .cfg-load-head b { color: #d0493b; }

.cfg-table-wrap { overflow-x: auto; }
.cfg-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.cfg-table th, .cfg-table td { padding: 6px 6px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.cfg-table thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: .8rem; }
.cfg-table tbody th { text-align: left; font-weight: 500; white-space: normal; }
.cfg-table tbody th small { color: var(--muted); font-weight: 400; }
.cfg-full { font-weight: 700; }
.cfg-base { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.cfg-wname { display: inline-flex; align-items: center; gap: 2px; }
.cfg-weapons th, .cfg-weapons td { padding-left: 4px; padding-right: 4px; }
.cfg-weapons th, .cfg-weapons td { vertical-align: middle; }
.cfg-up { color: #3f9b6b; font-weight: 600; }

.cfg-bhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.cfg-bhead .cfg-actions { margin: 0 0 8px; }
.cfg-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.cfg-tabs::-webkit-scrollbar { display: none; }
.cfg-tabs button {
  font: inherit; font-size: .9rem; white-space: nowrap; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--muted);
}
.cfg-tabs button[aria-selected="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.cfg-tiles { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.cfg-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
}
.cfg-tile.is-off { opacity: .72; }
.cfg-tile.is-max { border-color: var(--accent); }
.cfg-tile-main { flex: 1; min-width: 0; }
.cfg-tile-name { font-weight: 600; font-size: .92rem; }
.cfg-tile-text { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.cfg-step { display: flex; align-items: center; gap: 4px; flex: none; }
.cfg-step button {
  width: 34px; height: 34px; font: inherit; font-size: 1.1rem; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.cfg-step button:disabled { opacity: .35; cursor: default; }
.cfg-lv { min-width: 3.2em; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }

.cfg-picks { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.cfg-pick {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  font: inherit; color: var(--text);
  padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
}
.cfg-pick span { display: flex; flex-direction: column; min-width: 0; }
.cfg-pick small { color: var(--muted); }
.cfg-pick.is-on { border-color: var(--accent); background: var(--accent-soft); }
.cfg-pick.is-idle { opacity: .7; }

.cfg-check { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.cfg-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-chips li { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; }

@media (min-width: 40rem) {
  .cfg-tiles, .cfg-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
  .cfg-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .cfg-side { position: sticky; top: 80px; }
  .cfg-wide { grid-column: 1 / -1; }
  .cfg-tiles, .cfg-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cfg-bgroup { border-top: 1px solid var(--line); }
.cfg-bgroup:first-child { border-top: 0; }
.cfg-bgroup summary { cursor: pointer; padding: 10px 2px; font-weight: 600; }
.cfg-bgroup summary small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.cfg-bgroup[open] summary { margin-bottom: 4px; }
.cfg-bgroup .cfg-tiles { padding-bottom: 10px; }
