/* ── AI Shortcut Button ── */
.ai-shortcut-btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ai-shortcut-btn:hover {
    transform: scale(1.1) !important;
}

/* ─── AI Drawer Header ─── */
.ai-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    border-radius: 0 !important;
    padding: 1.75rem 2rem !important;
    border-bottom: none !important;
}
.ai-avatar {
    width: 54px; height: 54px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.ai-status-dot {
    position: absolute; bottom: -2px; right: -2px;
    width: 14px; height: 14px;
    background: #22c55e;
    border-radius: 50%;
    border: 2.5px solid white;
}

/* Fixed Header Buttons */
.ai-header-btn {
    background: transparent !important;
    border: none !important;
    transition: all 0.2s ease;
}
.ai-header-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}
.ai-header-btn i {
    color: white !important;
    opacity: 1 !important;
}

/* ─── Messages Area ─── */
.ai-messages-area {
    overflow-y: auto;
    scroll-behavior: smooth;
    background: #f8fafc;
}
.ai-message-row {
    display: flex; margin-bottom: 1.5rem;
}
.ai-row-bot { justify-content: flex-start; }
.ai-row-user { justify-content: flex-end; }

.ai-bubble { display: flex; flex-direction: column; max-width: 90%; }
.ai-bubble-inner {
    padding: 1rem 1.5rem;
    border-radius: 20px;
    font-size: 1.2rem !important;
    line-height: 1.62;
    font-weight: 500;
    word-break: break-word;
}
.ai-bubble-bot .ai-bubble-inner {
    background: white;
    color: #1e293b;
    border-radius: 4px 20px 20px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
.ai-bubble-user .ai-bubble-inner {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-radius: 20px 4px 20px 20px;
    box-shadow: 0 4px 15px rgba(124,58,237,0.25);
}
.ai-time {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 8px;
    padding: 0 8px;
}

/* ─── Typing Indicator ─── */
.ai-typing-dots {
    display: flex; gap: 6px; padding: 0.75rem 0.5rem;
    align-items: center;
}
.ai-typing-dots span {
    width: 10px; height: 10px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: ai-bounce 1.2s infinite;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* ─── Chips / Suggestions ─── */
.ai-chip {
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 25px;
    padding: 0.6rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.ai-chip:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.25);
}

/* ─── Input ─── */
.ai-input-area {
    border-top: 1px solid #e2e8f0 !important;
    background: white;
    padding: 1.5rem !important;
}
.ai-input-wrapper {
    display: flex; align-items: flex-end; gap: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}
.ai-input-wrapper:focus-within { border-color: #7c3aed; background: white; box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1); }
.ai-textarea {
    flex: 1; border: none; background: transparent;
    resize: none; outline: none;
    font-size: 1.2rem !important;
    color: #1e293b;
    max-height: 180px; line-height: 1.5;
    font-weight: 500;
}
.ai-send-btn {
    width: 48px; height: 48px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}
.ai-send-btn:hover { transform: scale(1.1); box-shadow: 0 6px 16px rgba(124,58,237,0.4); }

/* ─── RTL Support ─── */
[dir="rtl"] .ai-bubble-bot .ai-bubble-inner { border-radius: 20px 4px 20px 20px; }
[dir="rtl"] .ai-bubble-user .ai-bubble-inner { border-radius: 4px 20px 20px 20px; }
[dir="rtl"] .ai-row-user .ai-time { text-align: left; }
