/* =============================================================================
   colorpicker.css  —  Endeavos Online SOW
   Color picker popup: preset swatches grid, standard colour row, RGB inputs.
   The popup appears as a sibling of #mat-dialog, positioned at the same
   coordinates. It hides the dialog while open, then restores it on OK.
============================================================================= */

/* ── Color picker popup ───────────────────────────────────────────────────── */
#color-popup {
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  z-index: 26;                    /* one above mat-dialog (z:25) */
  background: #fff;
  border: 1.5px solid rgba(232,116,30,0.4);
  border-radius: 12px;
  padding: 16px 18px;
  width: 310px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  max-height: calc(100% - 40px);
  overflow-y: auto;
  display: none;                  /* shown only when swatch is clicked */
}

/* ── Colour swatch cells ──────────────────────────────────────────────────── */
.cp-swatch {
  width: 20px; height: 20px;
  border-radius: 3px;
  border: 1.5px solid rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .1s, border-color .1s;
  flex-shrink: 0;
}
.cp-swatch:hover {
  transform: scale(1.25);
  border-color: rgba(0,0,0,0.35);
  z-index: 1;
  position: relative;
}
.cp-swatch.selected {
  border: 2px solid var(--orange);
  transform: scale(1.15);
}

/* Show spin buttons on number inputs for R/G/B */
input[type=number]::-webkit-inner-spin-button { opacity: 1; }
