/* Floating Chat Box Q&A - Frontend Styles */

.fcbqa-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Toggle Button */
.fcbqa-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.fcbqa-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.fcbqa-chat-toggle svg {
    width: 28px;
    height: 28px;
}

.fcbqa-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
}

/* Chat Box */
.fcbqa-chat-box {
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

.fcbqa-chat-box.fcbqa-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chat Header */
.fcbqa-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fcbqa-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fcbqa-bot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcbqa-chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.fcbqa-status {
    font-size: 12px;
    opacity: 0.9;
    display: block;
    margin-top: 2px;
}

.fcbqa-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.fcbqa-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fcbqa-toggle-icon {
    font-size: 20px;
    line-height: 1;
}

/* Chat Messages */
.fcbqa-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.fcbqa-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.fcbqa-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.fcbqa-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Message Styles */
.fcbqa-message {
    margin-bottom: 16px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fcbqa-bot-message {
    justify-content: flex-start;
}

.fcbqa-message-content {
    max-width: 80%;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fcbqa-bot-message .fcbqa-message-content {
    background: white;
    border-bottom-left-radius: 4px;
}

.fcbqa-message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Questions List */
.fcbqa-questions-list {
    margin-top: 12px;
}

.fcbqa-question-item {
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.fcbqa-question-item:hover {
    transform: translateX(5px);
}

.fcbqa-question-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
}

.fcbqa-question-item:hover .fcbqa-question-bubble {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateX(5px);
}

/* Answer Container */
.fcbqa-answer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.fcbqa-answer-header {
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.fcbqa-back-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.fcbqa-back-btn:hover {
    background: #f0f0f0;
}

.fcbqa-answer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.fcbqa-answer-content .fcbqa-message {
    margin-bottom: 0;
}

.fcbqa-answer-content .fcbqa-message-content {
    background: white;
    padding: 16px 20px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}

.fcbqa-answer-content .fcbqa-message-content p,
.fcbqa-answer-content .fcbqa-message-content ul,
.fcbqa-answer-content .fcbqa-message-content ol {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.fcbqa-answer-content .fcbqa-message-content ul,
.fcbqa-answer-content .fcbqa-message-content ol {
    margin-left: 20px;
}

.fcbqa-answer-content .fcbqa-message-content p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .fcbqa-chat-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .fcbqa-chat-box {
        width: 100%;
        height: calc(100vh - 100px);
        bottom: 90px;
        right: 0;
        left: 0;
    }
    
    .fcbqa-chat-toggle {
        width: 56px;
        height: 56px;
    }
}

/* Hidden state */
.fcbqa-chat-box.hidden {
    display: none;
}

