/* Selection highlight reuses `cell-selected` gold glow (board-renderer);
   this file styles the marquee, group-move preview arrows, and landing-tile
   markers. Palette: cyan (#00e5ff) / magenta (#ff3cac) — deliberately distinct
   from the board's green / red / gold / P1-blue / P2-red-orange. */

.marquee-layer {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 6;
}
.marquee-box {
  position: absolute;
  background: rgba(0, 229, 255, 0.16);
  border: 1px dashed rgba(0, 229, 255, 0.95);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

/* Preview arrows + landing-tile markers shown during group-move hover.
   z-index must beat .cell-tooltip (z-index: 50) so landing mark under cursor
   stays visible when its tile tooltip would otherwise pop up. */
.group-arrows-container {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 55;
}
.group-arrows-svg {
  position: absolute; top: 0; left: 0; pointer-events: none;
}

/* Destination-tile fill mounted inside .cell so `inset: 0` pins to cell's
   exact box (browser layout owns alignment; no JS math). Dark tone so the
   landing square reads regardless of terrain; coloured border matches arrow. */
.group-dest-marker {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  pointer-events: none;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.62);
  display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--cell-size) * 0.5);
  font-weight: 700;
  text-shadow: 0 0 4px rgba(0,0,0,0.85);
  z-index: 6;
  animation: group-dest-pulse 1.2s ease-in-out infinite alternate;
}
.group-dest-marker-ok {
  border: 2px solid #00e5ff;
  box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.45),
              0 0 6px rgba(0, 229, 255, 0.55);
  color: #00e5ff;
}
.group-dest-marker-bad {
  border: 2px dashed #ff3cac;
  box-shadow: inset 0 0 10px rgba(255, 60, 172, 0.45),
              0 0 6px rgba(255, 60, 172, 0.55);
  color: #ff3cac;
}
@keyframes group-dest-pulse {
  from { filter: brightness(1); }
  to   { filter: brightness(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .group-dest-marker { animation: none; }
}

/* Coord-row label width — left gutter before play-area column "a". Variable
   on .board-area lets the status bar align with the board without a magic
   number scattered across files. */
.board-area { --board-label-width: 16px; }

/* Persistent group-move status bar — thin strip between player bar and board.
   Zero vertical gap so it reads as a continuation of the player bar;
   indented by the same gutter that precedes board column "a". Flex row so
   live text (left) and rotate-board control (right) share a line; text child
   handles nowrap + ellipsis (bar can't — rotate button must stay visible). */
.group-status-bar {
  box-sizing: border-box;
  margin: 0;
  /* Bar starts where GRID starts (after axis-left column) so row-axis labels
     (numbers in 0°/180°, letters in 90°/270°) read in their own column to
     the left. Right padding is 0 so rotate button sits flush against grid edge. */
  margin-inline-start: var(--board-label-width);
  padding: 4px 0 4px 14px;
  min-height: 34px;
  font-size: 0.82rem;
  line-height: 1.35;
  border-radius: 0;
  background: rgba(20, 20, 20, 0.55);
  color: var(--text-secondary);
  /* No local border — active-player accent comes from .active.p1-bar /
     .active.p2-bar in game-ui.css. */
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.12s, background 0.12s;
}
.group-status-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Beats any italic that might cascade from a bar-level state class. */
  font-style: normal;
}
.group-status-rotate {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  font-style: normal;
}
/* Sized to fit the 34px-min-height bar; wider than deploy variant for a
   more clickable target. rotate-popup keeps its own absolute positioning
   relative to .rotate-board-control so it still opens below the icon. */
.group-status-rotate .rotate-board-control { margin: 0; }
.group-status-rotate .btn-rotate-board {
  width: 38px;
  height: 28px;
  /* Square right side so the chip sits flush against bar's right edge;
     left side keeps a small radius to look intentional. */
  border-radius: 6px 0 0 6px;
}
.group-status-rotate .btn-rotate-board svg { width: 16px; height: 16px; }
/* State classes colour background + text only — left stripe reserved for
   active-player accent, so do not override border-color here. */
.group-status-bar.group-status-idle {
  color: var(--text-muted, #888);
}
.group-status-bar.group-status-hint {
  color: #ddd;
}
.group-status-bar.group-status-ok {
  color: #fff;
  background: rgba(0, 229, 255, 0.16);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 0 #00e5ff;
}
.group-status-bar.group-status-bad {
  color: #fff;
  background: rgba(255, 60, 172, 0.17);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 0 #ff3cac;
}

/* Light theme: base rgba(20,20,20,0.55) reads muddy brown-grey on cream and
   var(--text-muted) idle text gets lost. Lift bg to soft cream + force
   near-black text. Rotate chip becomes filled accent-gold pill so it reads
   as a genuine interactive control rather than a faded outline. */
[data-theme="light"] .group-status-bar {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}
[data-theme="light"] .group-status-bar.group-status-idle,
[data-theme="light"] .group-status-bar.group-status-hint {
  color: var(--text-primary);
}
[data-theme="light"] .group-status-rotate .btn-rotate-board {
  background: var(--accent-gold);
  color: #fff;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-gold) 30%, transparent);
}
[data-theme="light"] .group-status-rotate .btn-rotate-board:hover {
  background: color-mix(in srgb, var(--accent-gold) 88%, black);
  border-color: color-mix(in srgb, var(--accent-gold) 88%, black);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-gold) 45%, transparent);
}
