.mat-ai-root { position: relative; z-index: 60; }
.mat-ai-fab {
  position: fixed;
  inset-inline-end: 1.1rem;
  bottom: 1.1rem;
  z-index: 70;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  background: #0b1220;
  color: #e2b13c;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(11,18,32,0.28);
  cursor: pointer;
}
.mat-ai-fab:hover { background: #152238; }
.mat-ai-dock {
  position: fixed;
  inset-inline-end: 1.1rem;
  bottom: 4.4rem;
  width: min(100% - 1.5rem, 380px);
  max-height: min(70vh, 560px);
  background: #fff;
  border: 1px solid #e4e7ee;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(11,18,32,0.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 71;
}
.mat-ai-dock.is-open { display: flex; }
.mat-ai-widget { display: flex; flex-direction: column; height: 100%; min-height: 420px; }
.mat-ai-widget__head {
  background: linear-gradient(145deg, #0b1220, #152238);
  color: #fff;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.2rem;
}
.mat-ai-widget__head span { color: rgba(255,255,255,0.7); font-size: 0.8rem; }
.mat-ai-widget__log {
  flex: 1;
  overflow: auto;
  padding: 0.85rem;
  display: grid;
  gap: 0.65rem;
  background: #f5f6f8;
}
.mat-ai-bubble {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.mat-ai-bubble--user { background: #fff; border: 1px solid #e4e7ee; justify-self: end; max-width: 92%; }
.mat-ai-bubble--bot { background: #0b1220; color: #fff; justify-self: start; max-width: 95%; }
.mat-ai-meta { font-size: 0.8rem; color: #5b6577; }
.mat-ai-widget__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #e4e7ee;
  background: #fff;
}
.mat-ai-widget__form textarea {
  resize: none;
  border: 1px solid #e4e7ee;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
.mat-ai-widget__send {
  border: 0;
  border-radius: 10px;
  background: #e2b13c;
  color: #0b1220;
  font-weight: 700;
  padding: 0 0.9rem;
  cursor: pointer;
}
.mat-ai-panel-inline { margin: 1.5rem 0; }
.mat-ai-panel-inline .mat-ai-widget {
  border: 1px solid #e4e7ee;
  border-radius: 16px;
  overflow: hidden;
  min-height: 480px;
  box-shadow: 0 10px 30px rgba(11,18,32,0.08);
}
@media (max-width: 640px) {
  .mat-ai-dock { inset-inline: 0.75rem; width: auto; bottom: 4.2rem; }
}
