/* Floating Chat Button */
.chatbot-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.chatbot-floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.chatbot-floating-btn:active {
    transform: translateY(0);
}

.chatbot-icon {
    font-size: 20px;
}

.chatbot-label {
    white-space: nowrap;
}

/* Hide floating button when chat is open */
.chatbot-window.open ~ .chatbot-floating-btn,
.chatbot-window.open + .chatbot-floating-btn {
    display: none;
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    border: 2px solid #4a5568;
}

.chatbot-window.open {
    display: flex;
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Messages Container */
.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #fafafa;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

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

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

/* Message Styles */
.chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: messageSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-message {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

/* Message Content */
.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    opacity: 0.8;
    align-self: flex-end;
}

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

/* Typing Indicator */
.typing-indicator {
    opacity: 0.7;
    align-self: flex-start;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #666;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Area */
.chatbot-input-area {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    box-sizing: border-box;
}

.chatbot-text-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chatbot-text-input:focus {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    border-color: #667eea;
}

.chatbot-text-input::placeholder {
    color: #718096;
    font-style: italic;
}

.chatbot-send-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.chatbot-send-btn:active {
    transform: scale(0.95);
}

/* Language Switcher */
.chatbot-language-switcher {
    display: flex;
    gap: 5px;
    margin-left: 15px;
}

.chatbot-lang-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #333;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-lang-btn.active {
    background: #e2e8f0;
    border-color: #cbd5e1;
    font-weight: bold;
}

/* Smart Suggestions */
.smart-suggestions {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-in-out;
}

.suggestions-label {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
}

.suggestions-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smart-suggestion-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.smart-suggestion-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.smart-suggestion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.smart-suggestion-btn:hover::before {
    left: 100%;
}

.smart-suggestion-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Conversation Starters */
.conversation-starters {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border-radius: 12px;
    border: 1px solid #c6f6d5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-in-out;
}

.starters-label {
    font-size: 12px;
    color: #2f855a;
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

.starters-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-starter-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.conversation-starter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.conversation-starter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.conversation-starter-btn:hover::before {
    left: 100%;
}

.conversation-starter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        height: 60vh;
        bottom: 20px;
    }
    
    .chatbot-input-area {
        padding: 10px;
    }
    
    .smart-suggestions,
    .conversation-starters {
        margin: 10px 0;
        padding: 10px;
    }
    
    .smart-suggestion-btn,
    .conversation-starter-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .suggestions-label,
    .starters-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .chatbot-input-area {
        gap: 8px;
        padding: 8px;
    }
    
    .chatbot-text-input {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .chatbot-send-btn {
        width: 36px;
        height: 36px;
    }
    
    .smart-suggestions,
    .conversation-starters {
        margin: 8px 0;
        padding: 8px;
    }
    
    .suggestions-buttons,
    .starters-buttons {
        gap: 6px;
    }
}

/* Disabled state for frozen chatbot */
.chatbot-container.frozen .chatbot-text-input {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-container.frozen .chatbot-send-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-container.frozen .chatbot-lang-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick Reply Buttons */
.quick-replies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 0 10px;
}

.quick-reply-btn {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    color: #4a5568;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-reply-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.quick-reply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced Typing Indicator */
.typing-indicator .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    padding: 12px 16px;
    max-width: 80%;
    align-self: flex-start;
} 