/* Fleet command battle HUD. Loaded after the legacy battle and fleet styles. */
@font-face {
  font-family: Rajdhani;
  src: url('../assets/fonts/Rajdhani-SemiBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Rajdhani;
  src: url('../assets/fonts/Rajdhani-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

#battle-screen {
  --battle-ink: #07131c;
  --battle-surface: var(--ui-panel, #0b1b27);
  --battle-raised: var(--ui-panel-raised, #102b38);
  --battle-line: var(--ui-line, #244855);
  --battle-line-strong: var(--ui-line-strong, #397b8b);
  --battle-cyan: var(--ui-cyan, #63e5ef);
  --battle-muted: var(--ui-muted, #91acba);
  --battle-heading: var(--ui-heading, 'GFA Command', Rajdhani, 'Segoe UI', sans-serif);
  color: #e5f3f5;
  font-family: Rajdhani, 'Segoe UI', sans-serif;
}

#battle-screen h1,
#battle-screen h2,
#battle-screen h3,
#battle-screen .eyebrow,
#battle-screen .panel-heading > span,
#battle-screen .hud-select-label,
#battle-screen .inspection-team {
  font-family: var(--battle-heading);
}

#battle-screen h1,
#battle-screen h2,
#battle-screen h3 {
  color: #e5f5f7;
  letter-spacing: .035em;
}

#battle-screen .eyebrow {
  color: var(--battle-cyan);
  letter-spacing: .16em;
}

#battle-screen .subtle,
#battle-screen .panel-heading > span,
#battle-screen .hud-select-label,
#battle-screen .inspection-team,
#battle-screen .activated-group small,
#battle-screen .map-options,
#battle-screen .movement-hud > small,
#battle-screen .movement-hud label,
#battle-screen .board-caption,
#battle-screen .context-hint {
  color: var(--battle-muted);
}

#battle-screen .battle-heading {
  position: relative;
  padding: 12px 16px;
  border: 1px solid var(--battle-line);
  border-left: 2px solid var(--battle-cyan);
  background: linear-gradient(105deg, #0a1a24, #0b1b27 58%, #0b202b);
}

#battle-screen .battle-heading::after,
#battle-screen .panel-heading::after,
#battle-screen .board-toolbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 54px;
  height: 2px;
  background: var(--battle-cyan);
  content: '';
  opacity: .65;
  pointer-events: none;
}

#battle-screen .battle-heading h1 {
  font-family: var(--battle-heading);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: .025em;
}

#battle-screen .battle-heading-right {
  gap: 8px;
}

#battle-screen .decision-indicator {
  color: var(--battle-cyan);
  border-right-color: currentColor;
}

#battle-screen .decision-indicator small {
  color: var(--battle-muted);
  font-family: var(--battle-heading);
  letter-spacing: .15em;
}

#battle-screen .scoreboard {
  gap: 16px;
  padding: 6px 12px;
  border: 1px solid var(--battle-line);
  background: #07151e;
}

#battle-screen .score {
  gap: 9px;
}

#battle-screen .score strong {
  color: #f0fbfc;
  font-family: var(--battle-heading);
  font-size: 30px;
  line-height: 1;
}

#battle-screen .score span {
  font-family: var(--battle-heading);
  font-size: 14px;
  line-height: 1.05;
}

#battle-screen .score small,
#battle-screen .score-divider {
  color: var(--battle-muted);
  font-family: var(--battle-heading);
  letter-spacing: .09em;
}

#battle-screen .table-layout {
  gap: 12px;
}

#battle-screen .tactical-sidebar,
#battle-screen .board-panel,
#battle-screen .log-panel {
  border: 1px solid var(--battle-line);
  border-radius: 2px;
  background: var(--battle-surface);
  box-shadow: inset 0 1px 0 #63e5ef0b;
}

#battle-screen .tactical-sidebar {
  scrollbar-color: var(--battle-line-strong) var(--battle-ink);
  scrollbar-width: thin;
}

#battle-screen .panel-heading,
#battle-screen .board-toolbar {
  position: relative;
  border-color: var(--battle-line);
  background: linear-gradient(100deg, #0d2530, #0b1b27 75%);
}

#battle-screen .panel-heading h2 {
  color: #e5f5f7;
  font-size: 20px;
  line-height: 1.08;
}

#battle-screen .panel-heading > span {
  font-size: 12px;
  letter-spacing: .1em;
}

#battle-screen .activated-group {
  border-bottom: 1px solid #24485599;
}

#battle-screen .activated-group strong {
  font-family: var(--battle-heading);
  font-size: 18px;
  letter-spacing: .025em;
}

#battle-screen .activated-group small {
  font-size: 13px;
}

#battle-screen .hud-select-label {
  font-size: 13px;
  letter-spacing: .08em;
}

#battle-screen button,
#battle-screen select,
#battle-screen input:not([type='range']):not([type='checkbox']) {
  border-color: var(--battle-line-strong);
  border-radius: 2px;
  background-color: #0d2430;
  color: #e5f3f5;
}

#battle-screen button:hover:not(:disabled),
#battle-screen select:hover {
  border-color: var(--battle-cyan);
  background-color: #12313c;
}

#battle-screen button:focus-visible,
#battle-screen select:focus-visible,
#battle-screen input:focus-visible {
  outline: 2px solid var(--battle-cyan);
  outline-offset: 2px;
}

#battle-screen .primary {
  border-color: var(--battle-cyan);
  background: #16414a;
  color: #eaffff;
}

#battle-screen .primary:hover:not(:disabled) {
  border-color: #a3faff;
  background: #1c5962;
  color: #fff;
}

#battle-screen #hud-section {
  background-color: #081720;
  font-family: var(--battle-heading);
  font-size: 15px;
}

#battle-screen #orders-tab,
#battle-screen #inspection-tab,
#battle-screen #ground-tab {
  border-top: 1px solid #24485599;
}

#battle-screen .command-block {
  border-color: #24485599;
}

#battle-screen .command-block h3,
#battle-screen #ship-details h3,
#battle-screen #ground-panel h3 {
  color: var(--battle-cyan);
  font-family: var(--battle-heading);
  font-size: 18px;
  letter-spacing: .025em;
}

#battle-screen .command-block p,
#battle-screen .command-block .field-label,
#battle-screen .command-block label,
#battle-screen .ship-card,
#battle-screen .ground-panel {
  color: #c5d9de;
}

#battle-screen .command-block p,
#battle-screen .ship-card .subtle {
  line-height: 1.48;
}

#battle-screen .command-block button,
#battle-screen .command-block select,
#battle-screen .hangar-card,
#battle-screen .target-row,
#battle-screen .weapon-choice,
#battle-screen .movement-hud button,
#battle-screen .board-actions button,
#battle-screen .board-actions select {
  border-color: var(--battle-line);
  background-color: #0b202b;
}

#battle-screen .command-block button:hover:not(:disabled),
#battle-screen .hangar-card:hover:not(:disabled),
#battle-screen .target-row:hover:not(:disabled),
#battle-screen .weapon-choice:hover:not(:disabled) {
  border-color: var(--battle-cyan);
  background-color: #12313c;
}

#battle-screen .hangar-card.chosen,
#battle-screen .weapon-choice.current {
  border-color: var(--battle-cyan);
  background-color: #103640;
  box-shadow: inset 2px 0 0 var(--battle-cyan);
}

#battle-screen .hangar-card small,
#battle-screen .hangar-company small,
#battle-screen .weapon-choice small,
#battle-screen .board-actions .board-weapon small {
  color: var(--battle-muted);
}

#battle-screen .ship-card h3 {
  margin: 4px 0;
  font-size: 23px;
}

#battle-screen .ship-card .ship-class,
#battle-screen .field-label {
  color: var(--battle-muted);
}

#battle-screen .stat {
  border-color: var(--battle-line);
  background: #081720;
}

#battle-screen .stat strong {
  color: #e5f5f7;
  font-family: var(--battle-heading);
}

#battle-screen .stat span {
  color: var(--battle-muted);
  font-family: var(--battle-heading);
  letter-spacing: .09em;
}

#battle-screen .weapon-list li {
  border-color: #24485599;
}

#battle-screen .weapon-list li span {
  color: var(--battle-muted);
}

#battle-screen .appearance-panel {
  border-color: var(--battle-line);
  background: #091923;
}

#battle-screen .appearance-panel h3 {
  color: var(--battle-cyan);
  font-size: 18px;
  letter-spacing: .08em;
}

#battle-screen .appearance-panel .map-options {
  color: #c5d9de;
  font-size: 13px;
  gap: 10px 8px;
}

#battle-screen .appearance-panel input[type='checkbox'],
#battle-screen .movement-hud input[type='range'] {
  accent-color: var(--battle-cyan);
}

#battle-screen .appearance-panel select {
  border-color: var(--battle-line-strong);
  background-color: #07151e;
  font-family: Rajdhani, 'Segoe UI', sans-serif;
  font-size: 13px;
}

#battle-screen .zoom-controls {
  display: flex;
  gap: 5px;
}

#battle-screen .zoom-controls button {
  min-height: 36px;
  padding: 6px 9px;
  font-family: var(--battle-heading);
  font-size: 16px;
}

#battle-screen .board-toolbar {
  border-bottom-color: var(--battle-line);
}

#battle-screen .board-toolbar #board-status {
  color: #d6e9ed;
  font-size: 14px;
}

#battle-screen .board-wrap {
  background: #050e14;
}

#battle-screen .battle-title-hud {
  padding-top: 8px;
  padding-bottom: 10px;
  border: 1px solid var(--battle-line-strong);
  border-top: 0;
  border-radius: 0 0 2px 2px;
  background: #081923f5;
  box-shadow: 0 3px 10px #0005;
}

#battle-screen .battle-title-hud h2 {
  font-family: var(--battle-heading);
  font-size: 19px;
}

#battle-screen .battle-title-hud .phase-pill {
  border: 1px solid var(--battle-line-strong);
  background: #102b38;
  color: var(--battle-cyan);
  font-family: var(--battle-heading);
  letter-spacing: .04em;
}

#battle-screen .battle-title-hud .token-result {
  color: var(--battle-cyan);
}

#battle-screen .movement-hud {
  width: 290px;
  padding: 12px;
  border: 1px solid var(--battle-line-strong);
  border-radius: 2px;
  background: #081923f5;
  box-shadow: 0 4px 14px #0006;
}

#battle-screen .movement-hud h3 {
  color: var(--battle-cyan);
  font-size: 19px;
}

#battle-screen .movement-hud label {
  color: #d1e4e8;
}

#battle-screen .movement-compass button {
  padding: 6px 4px;
  border-color: var(--battle-line);
  font-family: var(--battle-heading);
}

#battle-screen .movement-compass button[aria-pressed='true'] {
  border-color: var(--battle-cyan);
  background: #12404a;
  color: #eaffff;
  box-shadow: inset 0 -2px 0 var(--battle-cyan);
}

#battle-screen .movement-buttons .primary {
  background: #16414a;
}

#battle-screen .movement-hud p[role='status'] {
  color: var(--battle-cyan);
}

#battle-screen .board-actions {
  border-color: var(--battle-line-strong);
  background: #0b202b;
}

#battle-screen .board-actions strong {
  color: #e7f6f8;
  font-family: var(--battle-heading);
  font-size: 14px;
}

#battle-screen .board-actions p,
#battle-screen .board-actions .board-weapon small {
  color: var(--battle-muted);
}

#battle-screen .board-actions .board-feedback {
  border-color: #397b8b;
  background: #10343c;
  color: #dffcff;
}

#battle-screen .board-actions .board-feedback.failed {
  border-color: #8f5558;
  background: #321f27;
  color: #ffd8d5;
}

#battle-screen .context-hint {
  border-color: var(--battle-line);
  background: #091923;
}

#battle-screen .board-caption {
  border-color: var(--battle-line);
  background: #091923;
  line-height: 1.35;
}

#battle-screen .token-result {
  color: var(--battle-cyan);
}

#battle-screen .log-panel {
  margin-top: 12px;
}

#battle-screen .log-panel .panel-heading h2 {
  font-size: 19px;
}

#battle-screen .log-panel .panel-heading > span {
  color: var(--battle-muted);
  font-family: var(--battle-heading);
  letter-spacing: .12em;
}

#battle-screen #battle-log {
  scrollbar-color: var(--battle-line-strong) var(--battle-ink);
  scrollbar-width: thin;
}

#battle-screen #battle-log li {
  border-color: #24485580;
  color: #c9dce0;
  font-size: 14px;
  line-height: 1.42;
}

#battle-screen #battle-log li:first-child {
  background: #102b38;
  color: #effbfc;
}

#battle-screen #battle-log .log-index {
  color: var(--battle-cyan);
  font-family: var(--battle-heading);
}

/* Restyle the existing in-world command choices without changing SVG geometry. */
#battle-screen .bf-command-order rect {
  fill: #091923f5;
  stroke: #63e5ef;
}

#battle-screen .bf-command-order:hover rect,
#battle-screen .bf-command-order:focus rect {
  fill: #123541;
  stroke: #b8fbff;
}

#battle-screen text.bf-command-order-label {
  fill: #e0fbfd;
  font-family: Rajdhani, 'Segoe UI', sans-serif;
  font-weight: 600;
}

#battle-screen text.bf-command-feedback {
  fill: #8df0d1;
  font-family: Rajdhani, 'Segoe UI', sans-serif;
}

#battle-screen text.bf-command-feedback.is-failed {
  fill: #ffaaa3;
}

#battle-screen .bf-command-order.is-disabled {
  opacity: .45;
}

@media (min-width: 1600px) {
  #battle-screen .table-layout {
    gap: 14px;
  }
}

@media (max-width: 700px) {
  #battle-screen .battle-heading {
    padding: 10px 11px;
  }

  #battle-screen .battle-heading h1 {
    font-size: 27px;
  }

  #battle-screen .scoreboard {
    gap: 7px;
    padding: 5px 7px;
  }

  #battle-screen .score strong {
    font-size: 25px;
  }

  #battle-screen .score span {
    font-size: 11px;
  }

  #battle-screen .score small {
    font-size: 10px;
  }

  #battle-screen .movement-hud {
    width: min(230px, calc(100% - 12px));
    right: 6px;
    bottom: 6px;
    padding: 9px;
  }

  #battle-screen .movement-hud h3 {
    font-size: 17px;
  }

  #battle-screen .movement-compass {
    gap: 2px;
  }

  #battle-screen .movement-compass button {
    padding: 6px 2px;
    font-size: 17px;
  }

  #battle-screen .movement-compass small {
    font-size: 9px;
  }

  #battle-screen .appearance-panel .map-options {
    gap: 9px 7px;
  }
}

@media (max-width: 420px) {
  #battle-screen .battle-heading {
    align-items: center;
    gap: 8px;
  }

  #battle-screen .battle-heading-right {
    align-items: flex-end;
  }

  #battle-screen .battle-heading h1 {
    font-size: 24px;
  }

  #battle-screen .battle-heading .eyebrow {
    font-size: 8px;
  }

  #battle-screen .scoreboard {
    gap: 5px;
  }

  #battle-screen .score-divider {
    font-size: 8px;
  }

  #battle-screen .battle-title-hud {
    max-width: calc(100% - 12px);
    padding-right: 8px;
    padding-left: 8px;
  }

  #battle-screen .battle-title-hud h2 {
    font-size: 15px;
  }
}

#battle-screen .movement-compass button:disabled{opacity:.3;filter:grayscale(1);cursor:not-allowed}
