/* Widget 62: plan builder (content-intelligence/planner_widget.py, inc/planner.php,
   assets/js/planner.js; owner, 2026-10-09). Without JavaScript the reader sees each group's options
   as a list; with it, each group is a fieldset of chips (the pick widget's tokens) and the plan appears
   in a box under the button. Chips keep their size when selected; pills never wrap. */

.hc-prose .hc-plan__intro {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--hc-body);
}

.hc-prose .hc-plan__lists .hc-plan__legend {
  margin: 14px 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--hc-text);
}

.hc-prose .hc-plan__opts {
  margin: 0 0 8px;
  padding-left: 1.2em;
}

.hc-prose .hc-plan__group {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  min-width: 0;
}

.hc-prose .hc-plan__group .hc-plan__legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--hc-text);
}

.hc-prose .hc-plan__hint {
  font-weight: 400;
  font-size: 13px;
  color: var(--hc-muted);
}

.hc-prose .hc-plan__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hc-prose .hc-plan__chip {
  position: relative;
  padding: 8px 14px;
  border: 1px solid var(--hc-chip-line);
  border-radius: 999px;
  background: var(--hc-chip);
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--hc-text);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

/* the native radio or checkbox stays in the page for keyboards and screen readers, under the chip */
.hc-prose .hc-plan__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.hc-prose .hc-plan__chip:has(.hc-plan__input:checked) {
  border-color: var(--hc-chip-on-line);
  background: var(--hc-chip-on-bg);
  color: var(--hc-chip-on-fg);
}

.hc-prose .hc-plan__chip:has(.hc-plan__input:focus-visible) {
  outline: 2px solid var(--hc-focus);
  outline-offset: 2px;
}

.hc-prose .hc-plan__build {
  margin-top: 4px;
}

.hc-prose .hc-plan__need {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--hc-accent);
}

.hc-prose .hc-plan__plan {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--hc-chip);
  border: 1px solid var(--hc-chip-line);
}

.hc-prose .hc-plan__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hc-muted);
}

.hc-prose .hc-plan__line {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--hc-text);
}

.hc-prose .hc-plan__line--note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--hc-body);
}

.hc-prose .hc-plan__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}

.hc-prose .hc-plan__actions[hidden] {
  display: none;
}

.hc-prose .hc-plan__action {
  padding: 8px 16px;
  border: 1px solid var(--hc-chip-line);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--hc-text);
  cursor: pointer;
}

.hc-prose .hc-plan__action:focus-visible {
  outline: 2px solid var(--hc-focus);
  outline-offset: 2px;
}

.hc-prose .hc-plan__status {
  margin: 0;
  font-size: 14px;
  color: var(--hc-muted);
}

.hc-prose .hc-plan__note,
.hc-prose .hc-plan__privacy {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hc-muted);
}

.hc-plan__copybuf {
  position: fixed;
  top: 0;
  left: -9999px;
}

/* with the script: the lists give way to the form; once built, the note sits inside the plan */
.hc-prose .hc-plan.is-live .hc-plan__lists,
.hc-prose .hc-plan.is-built .hc-plan__note {
  display: none;
}
