/*
 * Farron AI is a page, not a drawer: the conversation is the work, so it gets the
 * content column rather than covering it. The card owns the scroll, the composer
 * stays pinned to its bottom edge.
 */
/* Fills the content column: the heading keeps its height, the card takes the rest. */
.fs-assistant-page {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  height: 100%;
  min-height: 0;
}

.fs-assistant {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.fs-assistant__messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
}

.fs-assistant-message {
  max-width: min(72ch, 86%);
  padding: 11px 14px;
  background: var(--fs-color-surface-subtle);
  border: 1px solid var(--fs-color-border-subtle);
  border-radius: var(--fs-radius-lg);
}

.fs-assistant-message--user {
  justify-self: end;
  color: #ffffff;
  background: var(--fs-color-primary);
  border-color: var(--fs-color-primary);
}

.fs-assistant-message span {
  display: block;
  margin-bottom: 4px;
  color: var(--fs-color-text-muted);
  font-size: var(--fs-text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fs-assistant-message--user span {
  color: color-mix(in srgb, #ffffff 76%, transparent);
}

.fs-assistant-message p {
  margin: 0;
  font-size: var(--fs-text-md);
  line-height: 1.5;
  white-space: pre-wrap;
}

.fs-assistant-message--loading p {
  color: var(--fs-color-text-muted);
  font-style: italic;
}

.fs-assistant__composer {
  display: grid;
  gap: 10px;
  padding: 14px 18px 16px;
  background: var(--fs-color-surface);
  border-top: 1px solid var(--fs-color-border-subtle);
}

.fs-assistant__composer-field {
  display: grid;
  gap: 6px;
}

.fs-assistant__composer-label {
  color: var(--fs-color-text-secondary);
  font-size: var(--fs-text-xs);
  font-weight: 600;
}

.fs-assistant__composer textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  color: var(--fs-color-text);
  background: var(--fs-color-field);
  border: 1px solid var(--fs-color-border);
  border-radius: var(--fs-radius-md);
  outline: none;
  font: inherit;
  font-size: var(--fs-text-md);
  resize: vertical;
}

.fs-assistant__composer textarea:focus {
  border-color: var(--fs-color-primary);
  box-shadow: var(--fs-focus-ring);
}

.fs-assistant__composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fs-assistant__hint {
  color: var(--fs-color-text-muted);
  font-size: var(--fs-text-xs);
}

.fs-shell-action--assistant.fs-shell-action--active {
  background: var(--fs-color-primary-subtle);
  border-color: var(--fs-color-primary-line);
}

@media (max-width: 600px) {
  .fs-assistant-page {
    height: auto;
  }

  .fs-assistant {
    min-height: min(560px, 66vh);
  }

  .fs-assistant__messages {
    padding: 14px;
  }

  .fs-assistant-message {
    max-width: 94%;
  }

  .fs-assistant__composer-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .fs-assistant__send {
    width: 100%;
  }
}
