/* Smart Assistant Widget Styles */
#smart-assistant-widget {
    position: fixed;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Chat Button */
.smart-assistant-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.smart-assistant-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.smart-assistant-btn.right {
    bottom: 20px;
    right: 20px;
}

.smart-assistant-btn.left {
    bottom: 20px;
    left: 20px;
}

.smart-assistant-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Chat Window */
.smart-assistant-window {
    position: fixed;
    width: 380px;
    max-width: 90vw;
    height: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.smart-assistant-window.right {
    bottom: 90px;
    right: 20px;
}

.smart-assistant-window.left {
    bottom: 90px;
    left: 20px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.smart-assistant-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.smart-assistant-header-content h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.smart-assistant-header-content p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.smart-assistant-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.smart-assistant-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Body */
.smart-assistant-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.smart-assistant-body::-webkit-scrollbar {
    width: 6px;
}

.smart-assistant-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.smart-assistant-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.smart-assistant-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Messages */
.smart-assistant-message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-assistant-message.bot {
    justify-content: flex-start;
}

.smart-assistant-message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.smart-assistant-message.bot .message-content {
    background: white;
    border: 1px solid #e0e0e0;
    border-bottom-right-radius: 4px;
}

.smart-assistant-message.user .message-content {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-bottom-left-radius: 4px;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

/* Question Types */
.smart-assistant-question-types {
    margin-top: 20px;
}

.question-type-btn {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    text-align: right;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
}

.question-type-btn:hover {
    border-color: #25D366;
    background: #f0fff4;
    transform: translateX(-5px);
}

.question-type-btn i {
    margin-left: 10px;
    color: #25D366;
}

/* Answers */
.smart-assistant-answers {
    margin-top: 20px;
}

.answer-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.answer-question {
    font-weight: 600;
    color: #25D366;
    margin-bottom: 10px;
    font-size: 15px;
}

.answer-text {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.back-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #e0e0e0;
}

/* Welcome Message */
.smart-assistant-welcome {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .smart-assistant-window {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
    }
    
    .smart-assistant-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* RTL Support */
[dir="rtl"] .smart-assistant-message.bot {
    justify-content: flex-end;
}

[dir="rtl"] .smart-assistant-message.user {
    justify-content: flex-start;
}

[dir="rtl"] .question-type-btn {
    text-align: left;
}

[dir="rtl"] .question-type-btn:hover {
    transform: translateX(5px);
}

[dir="rtl"] .question-type-btn i {
    margin-left: 0;
    margin-right: 10px;
}

