/* Reflection prompt UI — labels, answer widgets (free / multiple-choice /
   number), the edit rows, the kebab type-picker menu, and MC option editor.
   Extracted from events.css 2026-06-14 to keep that file under the LOC cap. */

.icx-reflection-prompt-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.icx-prompts-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.icx-prompt-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.icx-prompt-label {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  /* Render the prompt question in the goal's STANDARD accent color (the
     dark-mode goal red/blue/etc.) so it reads as a heading against the darker
     accent-tinted tray body — not the pale body-text tint it used to inherit
     (`--intentional-event-text-color`, e.g. #ffe6d9 for red, which looked washed
     out). Falls back to `inherit` outside themed goal trays (e.g. the goals
     dashboard). Light mode overrides to the darker readable variant below. */
  color: var(--intentional-event-accent-color, inherit);
}

body.theme-light .icx-prompt-label {
  /* In light mode the accent itself is too light on the pastel surface, so use
     the goal's dark text color (e.g. #a43827 for red) — still the standard red,
     just the legible-on-light variant. */
  color: var(--intentional-event-text-color, inherit);
}

.icx-prompt-label[data-heading-level="3"] {
  font-size: 14px;
  margin-top: 2px;
}

.icx-prompt-label[data-heading-level="2"] {
  font-size: 17px;
  font-weight: 800;
  margin-top: 4px;
}

.icx-prompt-label[data-heading-level="1"] {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-top: 6px;
}

.icx-prompt-answer {
  min-height: 40px;
}

.icx-prompts-edit {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.icx-prompt-edit-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icx-prompt-edit-input {
  flex: 1 1 auto;
  background: rgba(var(--overlay-rgb), 0.08);
  border: 1px solid rgba(var(--overlay-rgb), 0.18);
  border-radius: 4px;
  color: inherit;
  font: inherit;
  font-size: 12px;
  padding: 3px 6px;
  min-width: 0;
}

.icx-prompt-edit-input:focus {
  outline: none;
  border-color: rgba(var(--overlay-rgb), 0.4);
}

.icx-prompt-edit-remove {
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
}

.icx-prompt-edit-remove:hover {
  opacity: 1;
}

.icx-prompts-add {
  align-self: flex-start;
  background: rgba(var(--overlay-rgb), 0.1);
  border: 1px dashed rgba(var(--overlay-rgb), 0.25);
  color: inherit;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.icx-prompts-add:hover {
  background: rgba(var(--overlay-rgb), 0.16);
}

.icx-prompts-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.icx-prompts-edit-toggle {
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icx-prompts-edit-toggle:hover {
  opacity: 1;
}

.icx-prompts-accept {
  background: rgba(var(--overlay-rgb), 0.18);
  border: 1px solid rgba(var(--overlay-rgb), 0.28);
  color: inherit;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.icx-prompts-accept:hover {
  background: rgba(var(--overlay-rgb), 0.28);
}

/* ---- Question types (free / multiple-choice / number) ---- */

.icx-prompt-edit-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.icx-prompt-type-btn {
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icx-prompt-type-btn:hover {
  opacity: 1;
}

.icx-prompt-type-menu {
  /* Appended to <body> as a position:fixed popup. Without a z-index it paints
     in the root stacking context at level 0, so the grid's event cards
     (z-index 4–6) and the long-term popup (z-index 900) cover it — the menu
     opens but is buried, so the kebab looks dead. Sit above every popup
     (timed-block popup is the highest at 10055). */
  z-index: 10060;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 4px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid rgba(var(--overlay-rgb), 0.16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.icx-prompt-type-menu-item {
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  cursor: pointer;
}

.icx-prompt-type-menu-item:hover {
  background: rgba(var(--overlay-rgb), 0.1);
}

.icx-prompt-type-menu-item.is-active {
  background: rgba(120, 170, 255, 0.22);
  font-weight: 600;
}

.icx-prompt-options-edit {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 14px;
}

.icx-prompt-option-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icx-prompt-option-bullet {
  opacity: 0.5;
  font-size: 11px;
  line-height: 1;
}

.icx-prompt-option-input {
  flex: 1 1 auto;
  background: rgba(var(--overlay-rgb), 0.06);
  border: 1px solid rgba(var(--overlay-rgb), 0.16);
  border-radius: 4px;
  color: inherit;
  font: inherit;
  font-size: 12px;
  padding: 2px 6px;
  min-width: 0;
}

.icx-prompt-option-input:focus {
  outline: none;
  border-color: rgba(var(--overlay-rgb), 0.4);
}

.icx-prompt-option-remove {
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  font-size: 13px;
  padding: 0 3px;
  line-height: 1;
}

.icx-prompt-option-remove:hover {
  opacity: 1;
}

.icx-prompt-option-add {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 2px 0;
}

.icx-prompt-option-add:hover {
  opacity: 1;
}

/* Per-option color control — same look as the long-term-goal `.ltg-color-btn`,
   scaled down to the compact prompt-edit row. Sits just left of the × . */
.icx-prompt-option-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.icx-prompt-option-color-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(var(--overlay-rgb), 0.18);
  background: rgba(var(--overlay-rgb), 0.06);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}

.icx-prompt-option-color-btn.active {
  background: rgba(var(--overlay-rgb), 0.14);
  border-color: rgba(var(--overlay-rgb), 0.32);
}

.icx-prompt-option-color-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(var(--overlay-rgb), 0.28);
  display: block;
}

.icx-prompt-option-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 1px 0 3px 18px;
}

.icx-prompt-option-colors.hidden {
  display: none;
}

.icx-prompt-option-color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  cursor: pointer;
  padding: 0;
}

.icx-prompt-option-color-swatch.selected {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.icx-prompt-mc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.icx-prompt-mc-option {
  /* `--mc-color` is set inline per chip. Unselected: faint tint fill + a thin
     colored border all the way around (flat/modern — no heavy left accent).
     Selected (below): the chip fills solid with its color. Fallbacks keep chips
     looking normal if a color is ever absent. */
  background: color-mix(in srgb, var(--mc-color, transparent) 14%, rgba(var(--overlay-rgb), 0.05));
  border: 1px solid var(--mc-color, rgba(255, 255, 255, 0.22));
  border-radius: 14px;
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  padding: 4px 11px;
  cursor: pointer;
}

.icx-prompt-mc-option:hover {
  background: color-mix(in srgb, var(--mc-color, transparent) 26%, rgba(var(--overlay-rgb), 0.08));
}

.icx-prompt-mc-option.is-selected {
  background: var(--mc-color, rgba(255, 255, 255, 0.9));
  color: #10131a;
  border-color: var(--mc-color, transparent);
  font-weight: 600;
}

.icx-prompt-number-input {
  width: 130px;
  min-height: 0;
  background: rgba(var(--overlay-rgb), 0.08);
  border: 1px solid rgba(var(--overlay-rgb), 0.18);
  border-radius: 4px;
  color: inherit;
  font: inherit;
  font-size: 12px;
  padding: 5px 7px;
}

.icx-prompt-number-input:focus {
  outline: none;
  border-color: rgba(var(--overlay-rgb), 0.4);
}
