/* Chatbot Stilleri */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.chatbot-toggle.active {
    background: #e74c3c;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    overflow: hidden;
}

.chatbot-container.open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.chatbot-container.minimized {
    height: 60px;
}

.chatbot-container.minimized .chatbot-messages,
.chatbot-container.minimized .chatbot-quick-replies,
.chatbot-container.minimized .chatbot-input-container {
    display: none;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-title i {
    font-size: 1.5rem;
}

.chatbot-title h4 {
    margin: 0;
    font-size: 1.1rem;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

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

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

.chatbot-actions {
    display: flex;
    gap: 0.5rem;
}

.chatbot-actions button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.chat-message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlideIn 0.3s ease;
}

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

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: #ffd700;
    color: #333;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    position: relative;
}

.bot-message .message-bubble {
    background: white;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-bubble p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 0.25rem;
    display: block;
}

/* Typing Indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}

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

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

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

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

/* Quick Replies */
.chatbot-quick-replies {
    padding: 0.75rem 1.5rem;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-reply {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
}

.quick-reply:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Input Container */
.chatbot-input-container {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.75rem;
}

#chatbotInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

#chatbotInput:focus {
    outline: none;
    border-color: #667eea;
}

.chatbot-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        bottom: 90px;
        height: calc(100vh - 120px);
        max-height: 600px;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .message-bubble {
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        width: 100%;
        right: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .chatbot-toggle {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-messages {
        padding: 1rem;
    }

    .quick-reply {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}
