/* Focused contextual assistant surfaces; inherits Rivetpath's light/dark tokens. */
.copilot-dialog {
  width: min(740px, calc(100vw - 28px));
}
.copilot-dialog .modal-header .eyebrow {
  font-size: 12px;
}
.copilot-dialog .modal-header > .icon-btn {
  font-size: 24px;
  line-height: 1;
}
.copilot-dialog .modal-body {
  scroll-padding: 16px;
}
.copilot-dialog .copilot-boundary {
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.copilot-dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.65;
  padding: 14px;
}
.copilot-dialog .copilot-sources > .btn {
  margin-top: 12px;
}
.copilot-dialog .ai-result {
  max-height: 300px;
  overflow: auto;
  overscroll-behavior: contain;
}
.copilot-dialog .ai-result-text {
  font-size: 14px;
  line-height: 1.7;
}
.copilot-dialog .actions {
  flex-wrap: wrap;
}
.copilot-dialog .modal-footer > span {
  margin-right: auto;
  color: var(--muted);
}
.contextual-entry {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}
.contextual-entry:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.contextual-entry:active {
  transform: translateY(0);
}
@media (max-width: 600px) {
  .copilot-dialog {
    max-height: calc(100dvh - 20px);
    margin: 10px auto;
  }
  .copilot-dialog .modal-header,
  .copilot-dialog .modal-body,
  .copilot-dialog .modal-footer {
    padding: 16px;
  }
  .copilot-dialog .modal-header h2 {
    font-size: 21px;
  }
  .copilot-dialog .modal-footer {
    flex-wrap: wrap;
  }
  .copilot-dialog .modal-footer > span {
    width: 100%;
  }
  .copilot-dialog pre {
    max-height: 160px;
    font-size: 13px;
  }
  .copilot-dialog textarea {
    min-height: 132px;
    font-size: 16px;
  }
  .copilot-dialog .btn,
  .copilot-dialog .ai-retry-button {
    min-height: 42px;
  }
  .copilot-dialog .service-note {
    font-size: 12px;
    line-height: 1.7;
  }
}
@media (prefers-reduced-motion: reduce) {
  .contextual-entry {
    transition: none;
  }
  .contextual-entry:hover {
    transform: none;
  }
}
