/**
 * AI Chatbot Styles
 * Modern, professional chatbot matching brand colors
 */

/* Chat Button */
.chatbot-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(211, 47, 47, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10003;
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(211, 47, 47, 0.6);
}

.chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #4CAF50;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 10004;
    overflow: hidden;
}

/* Header - Matching branded modal style */
.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, #d32f2f 0%, #000033 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.chatbot-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.chatbot-brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    color: #FFD700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.chatbot-brand-sub {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
    color: white;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.user-message {
    align-self: flex-end;
    align-items: flex-end;
}

.bot-message {
    align-self: flex-start;
    align-items: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Typing Indicator */
.typing-indicator .message-bubble {
    display: flex;
    gap: 4px;
    padding: 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Message Actions */
.message-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.message-action-btn {
    background: white;
    color: #d32f2f;
    border: 2px solid #d32f2f;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.message-action-btn:hover {
    background: #d32f2f;
    color: white;
}

/* Quick Actions */
.chatbot-quick-actions {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-action-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-action-btn:hover {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.quick-action-btn i {
    font-size: 14px;
}

/* Input Area */
.chatbot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #d32f2f;
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chatbot-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .chatbot-header {
        padding: 16px;
    }
    
    .chatbot-logo {
        height: 38px;
    }
    
    .chatbot-brand-name {
        font-size: 0.7rem;
    }
    
    .chatbot-brand-sub {
        font-size: 0.6rem;
    }
}

/* Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}
