/* Assistant styles. */

.ai-btn {
  border: 1px solid var(--green);
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
  padding: 10px 15px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.analysis-modal {
  width: min(820px, calc(100% - 28px));
  max-height: 88vh;
}
.analysis-modal-inner {
  padding: 26px;
}
.analysis-loading {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
}
.analysis-loading span {
  font-size: 32px;
  color: var(--green);
  animation: aiPulse 1.3s ease-in-out infinite;
}
.analysis-loading b {
  color: var(--text);
}
.analysis-loading small {
  font-size: 11px;
}
.analysis-result {
  padding: 4px 4px 20px;
  max-height: 65vh;
}
.analysis-result:empty {
  display: none;
}
.analysis-disclaimer {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--muted);
  font-size: 10px;
}
@keyframes aiPulse {
  50% {
    opacity: 0.35;
    transform: scale(0.86);
  }
}

.analysis-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}
.agent-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.agent-head-actions > button:first-child {
  border: 0;
  background: var(--surface2);
  color: var(--green);
  border-radius: 9px;
  padding: 7px 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.agent-quick-actions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.agent-quick-actions button {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--muted);
  border-radius: 18px;
  padding: 7px 11px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.agent-quick-actions button:hover {
  border-color: var(--green);
  color: var(--green);
}
.agent-messages {
  height: 52vh;
  min-height: 300px;
  overflow-y: auto;
  padding: 16px 4px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.agent-welcome {
  margin: auto;
  text-align: center;
  color: var(--muted);
  max-width: 360px;
}
.agent-welcome > span {
  display: block;
  color: var(--green);
  font-size: 32px;
}
.agent-welcome b {
  display: block;
  color: var(--text);
  margin: 8px;
}
.agent-welcome p {
  font-size: 12px;
  line-height: 1.7;
}
.agent-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.agent-message > span {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
}
.agent-message.assistant > div {
  max-width: calc(100% - 38px);
  padding: 2px 0;
}
.agent-message.assistant .markdown-body {
  font-size: 13px;
  line-height: 1.7;
}
.agent-message.assistant .markdown-body h1 {
  font-size: 20px;
}
.agent-message.assistant .markdown-body h2 {
  font-size: 16px;
  margin-top: 20px;
}
.agent-message.user {
  justify-content: flex-end;
}
.agent-message.user > div {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 14px 14px 4px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
}
.agent-thinking {
  color: var(--muted);
  font-size: 12px;
}
.agent-thinking > span {
  animation: aiPulse 1.3s ease-in-out infinite;
}
.agent-error {
  align-self: center;
  color: var(--orange);
  background: var(--orange-soft);
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 11px;
}
.agent-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  padding: 12px 0;
}
.agent-form textarea {
  resize: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.5;
  outline: none;
}
.agent-form textarea:focus {
  border-color: var(--green);
}
.agent-form button {
  align-self: stretch;
}
.agent-form button:disabled {
  opacity: 0.5;
  cursor: wait;
}
