/* Compact task prompts keep generated media near the task heading. */
body.create-page .task-prompt-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
  max-width: 600px;
}

body.create-page .task-prompt-disclosure .task-prompt {
  max-width: 520px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.create-page .task-prompt-disclosure.is-expanded {
  max-width: none;
}

body.create-page .task-prompt-disclosure.is-expanded .task-prompt {
  max-width: none;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.create-page .task-prompt-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--tap-text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

body.create-page .task-prompt-toggle[hidden] {
  display: none;
}

body.create-page .task-prompt-toggle:hover {
  background: var(--tap-surface-raised);
  color: var(--tap-text);
}

body.create-page .task-prompt-toggle:focus-visible {
  outline: 2px solid var(--tap-text);
  outline-offset: 2px;
}

body.create-page .task-prompt-toggle .ui-icon {
  width: 14px;
  height: 14px;
}

body.create-page .task-prompt-toggle[aria-expanded="true"] .ui-icon {
  transform: rotate(180deg);
}

@media (min-width: 761px) {
  body.create-page .task-card-header,
  body.create-page .task-prompt-disclosure {
    align-items: baseline;
  }
}

@media (max-width: 760px) {
  body.create-page .task-prompt-disclosure {
    flex: none;
    width: 100%;
  }

  body.create-page .task-prompt-toggle {
    min-height: 36px;
  }
}
