/* Ask Atlas slide-in panel. Isolated so it does not touch app.css. */
.ask-atlas-btn {
  height: 36px;
  color: var(--foreground);
  border: 1px solid var(--input);
  background: #fff;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
}
.ask-atlas-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.ask-atlas-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.ask-atlas-btn-icon {
  display: inline-flex;
  color: var(--primary);
}
.ask-atlas-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.ask-atlas-layer.is-open {
  pointer-events: auto;
}
.ask-atlas-backdrop {
  position: absolute;
  inset: 0;
  background: #0c0a0940;
  opacity: 0;
  transition: opacity 200ms ease;
}
.ask-atlas-layer.is-open .ask-atlas-backdrop {
  opacity: 1;
}
.ask-atlas-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px #0c0a0914;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 200ms ease;
}
.ask-atlas-layer.is-open .ask-atlas-panel {
  transform: translateX(0);
}
.ask-atlas-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.ask-atlas-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ask-atlas-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  flex: none;
  object-fit: cover;
}
.ask-atlas-name {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--foreground);
}
.ask-atlas-role {
  margin: 0;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-weight: 600;
}
.ask-atlas-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
}
.ask-atlas-close:hover {
  background: var(--muted);
  color: var(--foreground);
}
.ask-atlas-log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ask-atlas-empty {
  margin: auto;
  color: var(--muted-foreground);
  text-align: center;
  font-size: 13px;
}
.ask-atlas-bubble {
  max-width: 86%;
  padding: 8px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.45;
}
.ask-atlas-bubble.is-user {
  align-self: flex-end;
  background: #e7f6fd;
  color: var(--foreground);
}
.ask-atlas-bubble.is-atlas {
  align-self: flex-start;
  background: var(--muted);
  color: var(--foreground);
}
.ask-atlas-typing {
  flex: none;
  margin: 0 16px 8px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.ask-atlas-typing[hidden] {
  display: none;
}
.ask-atlas-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-foreground);
  animation: ask-atlas-dot 1s ease-in-out infinite;
}
.ask-atlas-typing span:nth-child(2) { animation-delay: .15s; }
.ask-atlas-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ask-atlas-dot {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.ask-atlas-compose {
  flex: none;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.ask-atlas-compose textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
}
.ask-atlas-compose button {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ask-atlas-compose button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  .ask-atlas-backdrop,
  .ask-atlas-panel,
  .ask-atlas-typing span {
    transition: none;
    animation: none;
  }
  .ask-atlas-layer.is-open .ask-atlas-panel {
    transform: none;
  }
  .ask-atlas-panel[hidden] {
    transform: none;
  }
}
