.ai-toolbar-drawer {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

.ai-toolbar-toggle-fab {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 3000;
  box-shadow: 0 6px 32px rgba(0,0,0,.22);
  border-radius: 50%;
  transition: box-shadow .2s, background .2s;
}

.ai-toolbar-toggle-fab:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.28);
}

.ai-messages { max-height: 50vh; overflow: auto; }
.ai-msg { padding: .5rem .75rem; margin-bottom: .5rem; border-radius: var(--mud-default-borderradius); }
.ai-user { background: var(--mud-palette-surface); }
.ai-assistant { background: var(--mud-palette-primary); color: var(--mud-palette-primary-contrast-text, #fff); }
.ai-msg .ai-role { opacity: .6; }
.ai-msg .ai-msg-text { white-space: pre-wrap; }

.ai-toolbar-mud-standard {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  box-shadow: 0 10px 36px rgba(0,0,0,.20);
}

.ai-toolbar-header-mud {
  padding: 16px 20px;
  background: var(--mud-palette-background);
  border-bottom: 1px solid var(--mud-palette-lines-default);
}

.ai-toolbar-content-mud {
  background: var(--mud-palette-background);
}

.ai-toolbar-context-panel-mud .mud-expansion-panel-header {
  background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}

.ai-pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-messages-modern-mud { max-height: 52vh; overflow: auto; }
.ai-msg-modern-mud { padding: .75rem 1rem; margin-bottom: .75rem; border-radius: 12px; }
.ai-user-modern-mud { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); }
.ai-assistant-modern-mud { background: var(--mud-palette-primary); color: var(--mud-palette-primary-contrast-text, #fff); }
.ai-role-modern-mud { opacity: .7; }
.ai-msg-text-modern-mud { white-space: pre-wrap; }

/* Compact messages */
.ai-compact { padding: .5rem .75rem !important; }
.ai-toolbar-input-mud textarea { font-size: .95rem; }

/* Floating FAB styling (optional) */
.ai-toolbar-toggle-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 3000;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  border-radius: 50%;
  transition: box-shadow .2s, background .2s;
}
.ai-toolbar-toggle-fab:hover {
  box-shadow: 0 14px 42px rgba(0,0,0,.32);
}

/* Logs styling */
.ai-logs {
  background: var(--mud-palette-surface);
  border: 1px solid var(--mud-palette-lines-default);
  border-radius: 12px;
}
.ai-logs .ai-logs-entry { font-size: .85rem; padding: 2px 0; }
.ai-logs .ai-logs-entry .lvl { display:inline-block; min-width:48px; text-align:center; border-radius:8px; padding:2px 6px; margin-right:6px; }
.ai-logs .lvl-INFO { background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); color: var(--mud-palette-text-primary); }
.ai-logs .lvl-DEBUG { background: color-mix(in srgb, var(--mud-palette-secondary) 12%, transparent); color: var(--mud-palette-text-secondary); }
.ai-logs .lvl-ERROR { background: color-mix(in srgb, var(--mud-palette-error) 18%, transparent); color: var(--mud-palette-error); }
