/* /opt/dashboard/public/css/ai_assistant_modal.css */
.ai-modal-overlay { position: fixed; inset: 0; z-index: 2000; display: none; pointer-events: none; }
.ai-modal-overlay.is-open { display: block; }
#ai-assistant-modal .ai-modal {
  position: fixed; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 24px));
  height: min(560px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px);
  pointer-events: auto; overflow: hidden;
}
#ai-assistant-modal .ai-modal-header { grid-template-columns: minmax(0, 1fr) auto; cursor: grab; touch-action: none; user-select: none; }
#ai-assistant-modal .ai-modal-header .sku-modal-titlewrap { max-width: none; }
.ai-modal-header:active { cursor: grabbing; }
.ai-modal-header button { cursor: pointer; touch-action: auto; }
.ai-modal-header-actions { display: flex; align-items: center; gap: 8px; }
#ai-assistant-modal .ai-modal-header .sku-modal-title { display: flex; align-items: center; gap: 8px; }
.ai-modal-title-icon { display: block; flex: none; color: var(--text-main); }
.ai-modal-clear svg { display: block; pointer-events: none; }
.ai-modal-clear:disabled { opacity: .45; cursor: default; }
.ai-modal-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 24px; }
.ai-modal-empty { font-size: 14px; position: absolute; top: 50%; left: 24px; right: 24px; transform: translateY(-50%); color: var(--text-muted, #aaa); text-align: center; line-height: 1.5; }
.ai-modal-empty[hidden] { display: none; }
.ai-modal-thread { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; overscroll-behavior: contain; }
.ai-modal-message { align-self: flex-start; max-width: 86%; width: fit-content; padding: 9px 11px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; background: rgba(255, 255, 255, 0.07); color: rgba(245, 245, 247, 0.92); }
.ai-modal-message--user { align-self: flex-end; background: var(--accent); color: rgba(245, 245, 247, 0.96); }
.ai-modal-message--waiting { opacity: .65; }
.ai-modal-compose { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--border-soft); }
.ai-modal-compose textarea { display: block; width: 100%; height: 72px; resize: none; padding: 9px 11px; color: var(--text-main); background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: 10px; font-family: inherit; font-size: 12px; line-height: 1.4; }
.ai-modal-compose button { align-self: stretch; }
