/* WPF-879: the hangar's ship-colour picker (index.html #hangar-paint, ui/hangar-paint.js), a dark card over the stage's
   bottom-right corner (bottom edge on a phone), clear of the header. Each swatch's colour is --swatch, set by the script
   through the CSSOM (CSP forbids inline style attributes). The radio fills its swatch, invisible, so a click, a tap and
   the arrow keys all work natively; the ring shows the chosen colour and keyboard focus. */
.hangar-paint { position: absolute; z-index: 2; right: 18px; bottom: 18px; width: 300px; padding: 12px 14px; border: 1px solid #3d5874; border-radius: 4px; background: rgba(8, 17, 27, .86); color: #e6f2ff; }
.hangar-paint h2 { margin: 0 0 8px; color: #f6d875; font: 800 14px/1.1 system-ui, sans-serif; letter-spacing: .02em; }
.hangar-paint fieldset { margin: 0 0 8px; padding: 0; border: 0; }
.hangar-paint legend { margin-bottom: 4px; padding: 0; color: #b4cee8; font: 700 11px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.paint-swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.paint-swatch { position: relative; width: 22px; height: 22px; border: 2px solid #142434; border-radius: 50%; background: var(--swatch, #fff); box-shadow: 0 0 0 1px #4a6683; cursor: pointer; }
/* Plain: the skin as painted, shown as a white swatch with a slash */
.paint-swatch-none { background: linear-gradient(135deg, transparent 45%, #c0506e 45% 55%, transparent 55%), #f4f7fb; }
.paint-swatch input { position: absolute; inset: -2px; width: auto; height: auto; min-height: 0; margin: 0; border-radius: 50%; opacity: 0; cursor: pointer; }
.paint-swatch:has(input:checked) { box-shadow: 0 0 0 2px #f6d875; }
.paint-swatch:has(input:focus-visible) { outline: 2px solid #9ed2ff; outline-offset: 3px; }
.hangar-paint-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 4px; }
.hangar-paint-actions button { min-height: 32px; padding: 0 12px; border: 1px solid #397ac5; border-radius: 3px; background: #286dbb; color: #fff; font: 800 12px/1 system-ui, sans-serif; cursor: pointer; }
.hangar-paint-actions button:hover:not(:disabled) { background: #3987dd; }
.hangar-paint-actions button:disabled { border-color: #3d5874; background: #1b2d40; color: #8eacc9; cursor: default; }
.hangar-paint-actions p { min-width: 0; margin: 0; color: #9dd5ff; font: 600 11px/1.25 system-ui, sans-serif; }
.hangar-paint-actions p.error { color: #ffb4bf; }

@media (max-width: 720px) {
  .hangar-paint { right: 12px; bottom: 12px; left: 12px; width: auto; padding: 10px 12px; }
  .paint-swatches { gap: 6px; }
  .paint-swatch { width: 26px; height: 26px; }
}
