/* =====================================================
   EverBlue Chatbot Widget
   ===================================================== */

.chatbot-float {
    position: fixed;
    bottom: 92px;
    inset-inline-end: 24px;
    width: 58px; height: 58px;
    background: linear-gradient(135deg, var(--blue), var(--navy));
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 26px;
    box-shadow: var(--shadow-lg);
    z-index: 998;   /* نفس ترتيب زر الواتساب (كان 999 فكان بيظهر فوق قائمة الموبايل لوحده) */
    cursor: pointer;
    transition: var(--transition);
}
.chatbot-float:hover { transform: scale(1.08); }

.chatbot-window {
    position: fixed;
    bottom: 92px;
    inset-inline-end: 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: calc(100vh - 140px);
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.chatbot-window.open { display: flex; }

.chatbot-header {
    background: linear-gradient(135deg, var(--blue), var(--navy));
    color: var(--white);
    padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.chatbot-header h4 { margin: 0; font-size: 15px; }
.chatbot-header span { font-size: 12px; opacity: .85; display: block; margin-top: 2px; }
.chatbot-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: var(--white);
    width: 28px; height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #F4F6F9;
}

.chatbot-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.7;
}
.chatbot-msg.bot {
    background: var(--white);
    color: var(--navy);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[dir="rtl"] .chatbot-msg.bot { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }

.chatbot-msg.user {
    background: var(--blue);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
[dir="rtl"] .chatbot-msg.user { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }

.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 10px;
    background: #F4F6F9;
}
.chatbot-chip {
    background: var(--white);
    border: 1px solid #E1E6EC;
    color: var(--navy);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}
.chatbot-chip:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

.chatbot-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #EDEFF2;
    background: var(--white);
}
.chatbot-input-row input {
    flex: 1;
    border: 1px solid #E1E6EC;
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 13.5px;
    outline: none;
    font-family: inherit;
}
.chatbot-input-row input:focus { border-color: var(--blue); }
.chatbot-send {
    background: var(--blue);
    color: var(--white);
    border: none;
    width: 38px; height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    /* أزرار أصغر على الموبايل: واتساب 14px ← شات 70px ← تليجرام 126px (تفاصيلها في main.css) */
    .chatbot-float { width: 48px; height: 48px; font-size: 22px; bottom: 70px; inset-inline-end: 14px; }
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 24px);
        inset-inline-end: 12px;
        bottom: 70px;
    }
    /* الزرار ده لازم يفضل بنفس المحاذاة الأفقية بالظبط بتاعة زرار الواتس أب (.whatsapp-float في main.css
       بيفضل عند 24px مفيهوش أي تعديل للموبايل) عشان الزرارين يطلعوا فوق بعض بالظبط زي الكمبيوتر */
}
