/* The catalogue item form: one row per size with its own optional price. */

.kit-sizes {
  border: 0;
  padding: 0;
  margin: 18px 0 6px;
}

.kit-sizes legend {
  font-size: var(--text-small);
  font-weight: 600;
}

.kit-size-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* A pack's items: a short list of what's in it, and a picker to add more. */
.pack-items {
  margin: 0;
  padding: 0;
  border: 0;
}

.pack-items legend {
  margin-bottom: var(--space-2);
  padding: 0;
  font-weight: 700;
}

.pack-item-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-body);
}

.pack-item-add {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-1);
}

.pack-item-add select {
  flex: 1;
  min-width: 0;
}

/* Equipamentos (kit_items#index): the five tabs with the search on their
   line, then the count line with the team filter on its right, the ready
   table (a row list on a phone), and the grey notes under it. On a phone
   the head keeps "Dar kit" beside the title, the tabs scroll sideways, the
   search and team go under them, and "Catálogo e packs" moves from the head
   to a link under the list. */
.kitc-tabs { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0 var(--space-3); margin-top: var(--space-5); border-bottom: 1px solid var(--line); }
.kitc-tabs .tabs { margin: 0; border-bottom: 0; }
.kitc-tabs .list-toolbar { gap: var(--space-2); margin: 0 0 var(--space-2); }
.kitc-tabs .list-toolbar > .search { width: 200px; min-height: 36px; }
.kitc-tabs .list-toolbar > select { min-width: 0; max-width: 180px; }
.kitc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin: var(--space-3) 0; }
.kitc-bar .list-toolbar { margin: 0 0 0 auto; }
.kitc-bar .list-toolbar > select { min-height: 36px; }
.kitc-lead { margin: 0 var(--space-1); color: var(--muted); font-size: var(--text-label); }
.kitc-lead strong { color: var(--ink); }
.kitc-narrow { display: none; }
.kitc-table td { color: var(--ink); vertical-align: middle; }
.kitc-who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.kitc-who a { color: var(--ink); font-weight: 600; }
.kitc-who a:hover { color: var(--blue); }
.kitc-none { color: var(--faint); }
.kitc-rows, .kitc-catalogue-link { display: none; }
.kitc-announce { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: var(--space-3) var(--space-1) 0; }
.kitc-announce small { color: var(--faint); font-size: var(--text-small); }

@media (max-width: 700px) {
  .kitc-tabs { display: block; border-bottom: 0; }
  .kitc-tabs .tabs { margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); border-bottom: 1px solid var(--line); }
  .kitc-tabs .list-toolbar { margin: var(--space-4) 0 0; }
  .kitc-tabs .list-toolbar > .search { width: auto; }
  .kitc-head .page-head { flex-direction: row; align-items: flex-end; }
  .kitc-head .page-head > :first-child { flex: 1 1 0; }
  .kitc-head .head-actions { width: auto; }
  .kitc-head .head-actions .btn.primary { min-height: 52px; padding: 0 14px; }
  .kitc-bar { flex-direction: column-reverse; align-items: stretch; margin: var(--space-3) 0 10px; }
  .kitc-bar .list-toolbar { margin: 0; }
  .kitc-bar .list-toolbar > select { max-width: none; min-height: var(--control-height); }
  .kitc-lead { margin: var(--space-1) var(--space-2) 0; }
  .kitc-wide { display: none; }
  .kitc-narrow { display: inline; }
  .page-head .kitc-catalogue { display: none; }
  .kitc-table:not(.record-table) { display: none; }
  .kitc-rows { display: block; }
  .kitc-rows .row-item { flex-wrap: nowrap; gap: var(--space-3); }
  .kitc-rows .row-main { flex: 1 1 0; }
  .kitc-rows .row-main .badge { font-size: var(--text-small); }
  .kitc-rows .row-item > svg { display: none; }
  .kitc-give { min-height: 40px; padding: 0 14px; border: 0; background: var(--surface-3); color: var(--ink); }
  .kitc-catalogue-link { display: block; margin: 14px var(--space-2) 0; color: var(--blue); font-size: var(--text-label); font-weight: 600; }
}

.kit-stock-note form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-2);
}

/* The "Entregar" and "Dar kit" dialogs. */
.kit-pick {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.kit-pick .checkbox {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 400;
}

.kit-pick legend {
  margin-bottom: var(--space-2);
  font-size: var(--text-label);
  font-weight: 700;
}

.kit-pack-switch {
  flex-wrap: wrap;
  margin: var(--space-4) 0 var(--space-3);
}

.kit-handover .helper {
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--muted);
}

.kit-pick input[type=text] {
  margin-top: var(--space-1);
}

/* One order: amounts on the right, each item's state on the right of its
   name, and the actions at their own width. */
.kit-order-card .order-money dd {
  text-align: right;
}

.kit-order-items li {
  flex-wrap: nowrap;
  justify-content: space-between;
}

.kit-order-items li > span {
  text-align: right;
}

.kit-order-card .claim-details > .btn {
  justify-self: start;
}

@media (max-width: 700px) {
  .kit-order-items li {
    flex-wrap: wrap;
  }

  .kit-order-items li > span {
    flex-basis: 100%;
    text-align: left;
  }
}

/* Catálogo e packs (kit_products#index): the Artigos and Packs tabs; the
   items as cards, three to a row on a laptop and one on a phone, each with
   its picture (or a shirt) on a grey tile, its sizes and its price, an
   inactive one faded; the packs as lines. A card or a line opens its form. */
.kitc-catalogue-tabs { margin: 20px 0 22px; }
.kitc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: 26px; }
.kitc-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.kitc-card:hover { box-shadow: 0 0 0 2px var(--blue-line); }
.kitc-card:focus-visible, .kitc-pack:focus-visible { outline: 3px solid var(--blue-line); outline-offset: 1px; }
.kitc-card.is-inactive { opacity: .7; }
.kitc-photo { display: flex; flex: none; align-items: center; justify-content: center; width: 56px; height: 56px; overflow: hidden; border-radius: var(--radius); background: var(--surface-3); color: var(--muted); }
.kitc-photo img { width: 100%; height: 100%; object-fit: cover; }
.kitc-card-main { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.kitc-card-main strong { font-size: var(--text-body); font-weight: 600; }
.kitc-card-main small { color: var(--muted); font-size: var(--text-small); }
.kitc-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kitc-note { margin: 16px var(--space-1) 0; color: var(--faint); font-size: var(--text-small); }
.kitc-cards + .kitc-note { margin-top: -10px; }
.kitc-packs li + li { border-top: 1px solid var(--line-soft); }
.kitc-pack { display: grid; gap: 4px; width: 100%; padding: var(--space-4); border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.kitc-pack:hover { background: var(--surface-2); }
.kitc-pack small { color: var(--muted); font-size: var(--text-small); line-height: 1.4; }
.kitc-pack-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); font-size: var(--text-subheading); }
.kitc-pack-states { display: flex; gap: var(--space-3); margin-top: 6px; color: var(--muted); font-size: var(--text-small); font-weight: 600; }

@media (max-width: 1100px) {
  .kitc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .kitc-cards { grid-template-columns: minmax(0, 1fr); }
  .kitc-catalogue-tabs { margin: 12px calc(-1 * var(--space-4)) 18px; padding: 0 var(--space-4); }
}
