/* ============================================
   مساعد أنس الطبي - تصميم شيك زي واتساب
   Anas Medical Bot - Modern WhatsApp-like Style
   ============================================ */

/* Floating Button */
.floating-bot-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0891B2, #0E7490);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(8, 145, 178, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: none;
    color: white;
    font-size: 28px;
}

.floating-bot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(8, 145, 178, 0.5);
}

/* Bot Widget Container */
.bot-widget-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: #f0f2f5;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    animation: slideInUp 0.3s ease;
}

.bot-widget-container.open {
    display: flex;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header - شيك زي واتساب */
.bot-header {
    background: linear-gradient(135deg, #0891B2, #0E7490);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.bot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bot-header-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.bot-status {
    font-size: 0.7rem;
    margin: 4px 0 0;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #10B981;
    box-shadow: 0 0 5px #10B981;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.bot-header-actions button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.bot-header-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Messages Container - شيك زي واتساب */
.bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-messages::-webkit-scrollbar {
    width: 5px;
}

.bot-messages::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.bot-messages::-webkit-scrollbar-thumb {
    background: #0891B2;
    border-radius: 10px;
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: #0891B2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.user-avatar {
    background: #10B981;
}

.message-content {
    max-width: 75%;
    background: white;
    padding: 10px 14px;
    border-radius: 18px;
    border-top-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #1e293b;
}

.message-content strong {
    color: #0891B2;
}

.message-content a {
    color: #0891B2;
    text-decoration: none;
    border-bottom: 1px dashed #0891B2;
}

.message-time {
    font-size: 0.6rem;
    color: #94a3b8;
    margin-top: 5px !important;
    text-align: left;
}

/* User Message Bubble */
.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #0891B2, #0E7490);
    color: white;
    border-top-left-radius: 4px;
    border-top-right-radius: 18px;
}

.user-message .message-content p {
    color: white;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.user-message .message-avatar {
    order: 2;
}

/* Bot Message Bubble */
.bot-message .message-content {
    background: white;
    border-top-right-radius: 18px;
    border-top-left-radius: 4px;
}

/* Typing Indicator - زي واتساب */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    margin: 5px 0 5px 50px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.typing-indicator span {
    font-size: 0.7rem;
    color: #64748b;
}

/* Quick Actions - أزرار سريعة شيك */
.bot-quick-actions {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

.bot-quick-actions::-webkit-scrollbar {
    height: 3px;
}

.quick-action-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quick-action-btn i {
    font-size: 0.7rem;
    color: #0891B2;
}

.quick-action-btn:hover {
    background: #0891B2;
    color: white;
}

.quick-action-btn:hover i {
    color: white;
}

/* Input Area - شيك */
.bot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.bot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.bot-input:focus {
    outline: none;
    border-color: #0891B2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
    background: white;
}

.bot-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0891B2, #0E7490);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.4);
}

.bot-send-btn:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 480px) {
    .bot-widget-container {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        height: calc(100vh - 120px);
        bottom: 80px;
    }
    
    .floating-bot-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}