/* Capacoty custom report-colour picker — shared styles (Mock A layout).
   Chrome adapts to the host app's theme tokens with light fallbacks. The live
   preview is "paper" (always light). Dynamic colours are applied via the CSSOM
   in JS — this file is static layout only. */

.ccp {
  --ccp-tx: var(--tx, #1f2421);
  --ccp-muted: var(--tx55, #6b716d);
  --ccp-bd: var(--field-bd, var(--bd, rgba(0, 0, 0, 0.16)));
  --ccp-field: var(--field-bg, rgba(0, 0, 0, 0.025));
  display: flex; flex-direction: column; gap: 14px;
  color: var(--ccp-tx);
  container-type: inline-size;   /* inline layout collapses on the picker's own width */
}

/* preset quick-fill chips */
.ccp-presets { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.ccp-presets-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ccp-muted);
}
.ccp-chips { display: inline-flex; gap: 7px; flex-wrap: wrap; }
.ccp-chip {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px var(--ccp-bd);
  cursor: pointer; padding: 0; outline: none;
  transition: transform 0.12s, box-shadow 0.12s;
}
.ccp-chip:hover { transform: scale(1.1); }
.ccp-chip.active {
  box-shadow: 0 0 0 2px var(--card, #fff), 0 0 0 4px var(--ccp-tx);
  transform: scale(1.06);
}

/* inline mode — self-contained 2-column widget (controls | preview) */
.ccp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 250px); gap: 18px; align-items: start; }
.ccp-bodyleft { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ccp-bodyright { min-width: 0; }
@container (max-width: 600px) { .ccp-body { grid-template-columns: 1fr; } }

/* role cards — 2x2 grid */
.ccp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .ccp-cards { grid-template-columns: 1fr; } }
.ccp-card {
  border: 1px solid var(--ccp-bd); border-radius: 11px; padding: 11px;
  display: flex; flex-direction: column; gap: 9px; min-width: 0;
}
.ccp-card-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ccp-card-meta { min-width: 0; }
.ccp-card-name { font-size: 12.5px; font-weight: 600; }
.ccp-card-hint { font-size: 10.5px; color: var(--ccp-muted); line-height: 1.3; }

.ccp-sw {
  width: 38px; height: 38px; padding: 0; border: 1px solid var(--ccp-bd);
  border-radius: 9px; cursor: pointer; background: none; flex-shrink: 0;
}
.ccp-sw::-webkit-color-swatch-wrapper { padding: 3px; }
.ccp-sw::-webkit-color-swatch { border: none; border-radius: 6px; }
.ccp-sw:disabled { opacity: 0.4; cursor: not-allowed; }

.ccp-hex {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; text-transform: uppercase; padding: 7px 9px;
  border: 1px solid var(--ccp-bd); border-radius: 8px;
  background: var(--ccp-field); color: var(--ccp-tx); outline: none;
}
.ccp-hex:focus { border-color: var(--app-bd, #888); }
.ccp-hex:disabled { opacity: 0.45; }

.ccp-inherit {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ccp-muted); cursor: pointer; user-select: none;
}
.ccp-inherit input { accent-color: var(--app, #2f7d52); }

/* saturation */
.ccp-satlabel {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ccp-muted); margin-bottom: 7px;
}
.ccp-seg {
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; padding: 3px; gap: 3px;
  background: var(--ccp-field); border: 1px solid var(--ccp-bd);
  border-radius: 999px;
}
.ccp-seg-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--ccp-muted);
  transition: background 0.12s, color 0.12s;
}
.ccp-seg-btn:hover { color: var(--ccp-tx); }
.ccp-seg-btn.active {
  background: var(--card, #fff); color: var(--ccp-tx);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* live preview — "paper" report mock (hero) */
.ccp-pv-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ccp-muted); margin-bottom: 9px;
}
.ccp-preview {
  border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 10px;
  padding: 16px; background: #fff; color: #1f2421;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  display: flex; flex-direction: column; gap: 11px;
}
.ccp-pv-head { display: flex; flex-direction: column; gap: 8px; }
.ccp-pv-titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ccp-pv-title { font-size: 14.5px; font-weight: 800; line-height: 1.2; }
.ccp-pv-logo { width: 44px; height: 27px; border: 1px dashed #cfd3d6; border-radius: 4px; flex-shrink: 0; }
.ccp-pv-rule { height: 3px; width: 100%; border-radius: 2px; }
.ccp-pv-sec { font-weight: 600; font-size: 11.5px; padding: 6px 10px; border-radius: 5px; }
.ccp-pv-table {
  border: 1.5px solid; border-radius: 7px; overflow: hidden;
  display: flex; flex-direction: column; font-size: 12px;
}
.ccp-pv-th { padding: 6px 10px; font-weight: 600; border-bottom: 1.5px solid; }
.ccp-pv-tr { padding: 6px 10px; }
.ccp-pv-sn { border: 1.5px solid; border-radius: 6px; padding: 8px 10px; font-size: 11.5px; }
