/* Claude update below (color and opacity picker, ported from the Video Room
   Calculator's own popover) */

.cpPopover {
  position: fixed;
  z-index: 100000;
  width: 268px;
  max-width: 92vw;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  padding: 12px;
  font-size: 14px;
  color: var(--text);
  user-select: none;
}

.cpPopover[hidden] { display: none !important; }

.cpHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cpTitle { font-weight: 600; }

.cpClose {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  color: var(--muted);
  width: auto;
}

.cpClose:hover { color: var(--text); }

.cpSV {
  position: relative;
  height: 132px;
  border-radius: 6px;
  cursor: crosshair;
  /* Or a drag on a touchscreen scrolls the page instead of picking. */
  touch-action: none;
}

.cpSVWhite,
.cpSVBlack {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}

.cpSVWhite { background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.cpSVBlack { background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)); }

.cpSVThumb {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cpHue {
  width: 100%;
  margin: 12px 0 4px;
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%,
    #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}

.cpHue::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #888;
  cursor: pointer;
}

.cpHue::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #888;
  cursor: pointer;
}

.cpRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cpLabel {
  min-width: 58px;
  color: var(--muted);
  margin: 0;
}

.cpHex {
  flex: 1 1 auto;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.cpAlpha { flex: 1 1 auto; margin: 0; }

.cpAlphaOut {
  min-width: 3.2em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.cpFoot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.cpFoot button {
  width: auto;
  margin: 0;
  font-size: 13px;
  padding: 6px 10px;
}

.cpDone {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* A checkerboard behind it, or a transparent preview would read as white. */
.cpPreview {
  display: block;
  width: 34px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.cpPreviewWrap {
  margin-left: auto;
  background-image:
    linear-gradient(45deg, #ddd 25%, transparent 25%),
    linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%),
    linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  background-color: #fff;
  border-radius: 4px;
}
/* Claude update end */
