/* Ideas: the idea dialog */

.idea-dialog {
  width: min(calc(100% - 32px), 860px);
  overflow: auto;
}

.idea-dialog-shell {
  padding: 34px 36px 30px;
}

.idea-dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.idea-dialog-top h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 4vw, 2.3rem);
  line-height: 1.08;
}

.idea-dialog-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.idea-help-button,
.idea-dialog-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--tool-line);
  border-radius: 13px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 1.45rem;
  line-height: 1;
}

.idea-help-button {
  color: var(--violet-dark);
  background: var(--violet-pale);
  font-size: 1rem;
  font-weight: 950;
}

.idea-help-button[aria-expanded="true"] {
  color: #fff;
  background: var(--violet-fill);
}

.idea-help-button:hover {
  border-color: var(--help-line-hover);
  background: var(--help-hover);
}

.idea-dialog-close:hover {
  color: var(--ink);
  background: var(--violet-pale);
}

.idea-help-note {
  display: grid;
  gap: 6px;
  max-width: 650px;
  padding: 12px 14px;
  margin: 4px 0 18px;
  border-left: 4px solid var(--violet);
  border-radius: 4px 12px 12px 4px;
  color: var(--ink-soft);
  background: var(--context);
  font-size: 0.82rem;
  line-height: 1.45;
}

.idea-help-note p {
  margin: 0;
}

.idea-context-panel {
  margin-top: 14px;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
  background: transparent;
}

.idea-context-panel summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  list-style: none;
  font-size: 0.74rem;
  font-weight: 800;
}

.idea-context-panel summary::-webkit-details-marker {
  display: none;
}

.idea-context-panel summary:hover {
  color: var(--violet-dark);
}

.idea-context-chevron {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 900;
  transition: transform 150ms ease;
}

.idea-context-panel[open] .idea-context-chevron {
  transform: rotate(180deg);
}

.idea-context-body {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--idea-context-line);
  border-radius: 14px;
  background: var(--idea-context);
}

.idea-context-fact,
.idea-context-moment-wrap {
  min-width: 0;
}

.idea-context-fact > span,
.idea-context-moment-wrap > span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.idea-context-fact p {
  margin: 0;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.42;
}

.idea-context-moments {
  display: grid;
  max-height: 230px;
  gap: 7px;
  padding: 2px 4px 2px 2px;
  margin: 0;
  overflow: auto;
  list-style: none;
}

.idea-context-moments li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--idea-moment-line);
  border-radius: 11px;
  background: var(--surface);
}

.idea-context-moments li.is-target {
  border-color: #d8a32b;
  background: var(--idea-target);
  box-shadow: 0 0 0 2px rgba(230, 169, 43, 0.12);
}

.idea-context-number {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  color: var(--violet-dark);
  background: var(--idea-number);
  font-size: 0.72rem;
  font-weight: 900;
}

.idea-context-moments p {
  margin: 2px 0 0;
  font-size: 0.79rem;
  line-height: 1.38;
}

.idea-context-moments li > strong {
  align-self: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--idea-target-ink);
  background: var(--gold-pale);
  font-size: 0.61rem;
  white-space: nowrap;
}

.idea-context-empty {
  margin: 0;
  padding: 10px 11px;
  border: 1px dashed var(--idea-empty-line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 0.79rem;
}

.idea-prompt-label {
  margin: 10px 0 18px;
}

.idea-prompt-label > span {
  font-size: 0.88rem;
}

.idea-prompt-label em {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.idea-prompt-label input:disabled {
  color: var(--ink-soft);
  background: var(--field-disabled);
}

.idea-start-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.idea-results {
  padding-top: 3px;
  border-top: 1px solid var(--line-soft);
}

.idea-results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 17px;
  margin-bottom: 10px;
}

.idea-results-heading h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.idea-results-heading span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.idea-suggestion-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.idea-suggestion-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--suggestion-line);
  border-radius: 15px;
  background: var(--suggestion);
}

.idea-suggestion-card.is-new {
  border-color: var(--suggestion-new-line);
  background: var(--suggestion-new);
  box-shadow: 0 0 0 3px rgba(116, 85, 190, 0.1);
}

.idea-suggestion-copy {
  min-width: 0;
}

.idea-suggestion-copy p {
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.idea-new-badge {
  display: inline-flex;
  padding: 3px 7px;
  margin-bottom: 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--violet-fill);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.idea-suggestion-card .button {
  white-space: nowrap;
}

.idea-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-top: 12px;
  border: 1px dashed var(--thinking-line);
  border-radius: 14px;
  color: var(--violet-dark);
  background: var(--thinking);
}

.idea-thinking-first {
  min-height: 104px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.idea-thinking small {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.idea-thinking-spark {
  color: var(--gold);
  font-size: 1.2rem;
  animation: soft-twinkle 900ms ease-in-out infinite;
}

.idea-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 17px;
  margin-top: 17px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 780px) {
  .idea-dialog-shell {
    padding: 27px 21px;
  }

  .idea-dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
  }

  .idea-dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .idea-dialog-footer .button {
    flex: 1 1 150px;
  }
}

@media (max-width: 500px) {
  .idea-context-moments li {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .idea-context-moments li > strong {
    grid-column: 2;
    justify-self: start;
  }

  .idea-suggestion-card {
    grid-template-columns: 1fr;
  }

  .idea-suggestion-card .button {
    width: 100%;
  }
}
