/*
  16-bastion.css — v41.22

  Two fixes.

  1. The Bastion turn buttons
  ---------------------------
  `.bastion-schedule-actions` was `flex: 0 0 auto` with no display of its own,
  so its two buttons were plain inline-block siblings with nothing between
  them. Side by side they touched; below 640px each becomes width:100%, so
  they stacked flush and the second overlapped the first's rounded corner.
  It needs to be a flex container with a gap — which is what it looked like it
  already was.

  2. Grouped emplacement units
  ----------------------------
  Styling for the unit chips that replaced one card per mounted weapon.

  Unlayered, loaded after styles.css. No !important.
*/

/* ==========================================================
   1. Turn buttons
   ========================================================== */
.bastion-schedule-actions {
  flex: 0 0 auto;
  display: flex;
  gap: var(--s2);
}

@media (max-width: 640px) {
  .bastion-schedule-actions {
    flex-direction: column;
    width: 100%;
  }
}

/* ==========================================================
   2. Emplacement units
   ========================================================== */
.barm-group { flex-wrap: wrap; }
.barm-k .barm-x {
  color: var(--muted);
  font-weight: var(--fw-display);
  font-size: var(--ui-meta);
}
.barm-note {
  display: block;
  color: var(--ink-soft);
  font-size: var(--ui-meta);
  line-height: 1.35;
}
.barm-note b { font-weight: var(--fw-display); color: var(--muted); }

/* The unit row wraps to its own line under the name and status, so a group of
   twelve doesn't squeeze the weapon stats out of the card. */
.barm-units {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.barm-unit {
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--chart);
  color: var(--ink);
  font: inherit;
  font-size: var(--ui-meta);
  font-weight: var(--fw-display);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease, border-color .12s ease;
}
span.barm-unit { cursor: default; }
button.barm-unit:hover { background: var(--paper3); border-color: var(--brass); }
button.barm-unit:active { transform: translateY(1px); }

/* Manned vs idle is carried by the border and a dot, not colour alone — the
   group's own chip states the split in words directly above. */
.barm-unit.is-manned { border-color: color-mix(in srgb, var(--lagoon) 52%, var(--line-strong)); }
.barm-unit.is-idle {
  border-style: dashed;
  background: transparent;
  color: var(--ink-soft);
}

/* ==========================================================
   3. Gate footnotes
   ==========================================================
   The two `.player-help` lines under the Crew password and Who's aboard gates
   sat left-aligned inside a stray rounded box, while everything around them
   was a centred panel.

   The box was never intended. 09-gates.css deliberately restyled this as
   "one quiet line, no icon and no tinted box — it is a footnote, not a
   notice", but it only set `border-top`. The other three sides and the 12px
   radius kept coming from the older `border: 1px solid` rule in styles.css,
   which lives in @layer legacy and was never fully overridden. The result was
   a three-sided box with a differently-coloured top edge.

   So: finish the job the comment describes, and centre it. */
.player-help {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  /* --muted measured 4.50 on the gate panel — exactly on the AA line, with no
     margin for the panel gradient shifting under it. */
  color: var(--ink-soft);
}

/* ==========================================================
   4. The fallback Share row
   ==========================================================
   Share now joins the sheet's real action row (see 27-share-links.js), but any
   sheet without a known row still gets one appended. It had no top margin, so
   it sat flush against whatever preceded it. */
.share-only-actions { margin-top: var(--s2); }
