/* ============================================
   AI Chat Component
   ============================================ */

.ai-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ai-drawer-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    flex-shrink: 0;
}

.ai-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    height: calc(100vh - 140px);
}

.ai-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.ai-suggestion-chip {
    cursor: pointer;
    justify-content: flex-start !important;
}

.ai-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.ai-message-user {
    flex-direction: row-reverse;
}

.ai-avatar {
    flex-shrink: 0;
    align-self: flex-end;
}

.ai-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    word-break: break-word;
}

.ai-bubble-user {
    background: var(--mud-palette-secondary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-bubble-assistant {
    background: var(--mud-palette-background-grey);
    border-bottom-left-radius: 4px;
}

.ai-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 18px;
    min-width: 60px;
}

.ai-typing span {
    width: 7px;
    height: 7px;
    background: var(--mud-palette-text-secondary);
    border-radius: 50%;
    animation: ai-bounce 1.2s infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.ai-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    flex-shrink: 0;
}

.ai-fab-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1400;
}

.ai-fab {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4) !important;
}
