/* Chatbot Float Button - Sol tarafta üstte */
.chatbot-float {
    position: fixed;
    bottom: 90px; /* WhatsApp'ın üstünde */
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff7e00 0%, #ff6b00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 126, 0, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: chatbotPulse 2s infinite;
}

.chatbot-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 126, 0, 0.6);
}

.chatbot-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Chatbot pulse animation */
@keyframes chatbotPulse {
    0% {
        box-shadow: 0 4px 12px rgba(255, 126, 0, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 126, 0, 0.7);
    }
    100% {
        box-shadow: 0 4px 12px rgba(255, 126, 0, 0.4);
    }
}

/* WhatsApp Float Button - Sol tarafta chatbot'un altında */
.whatsapp-float {
    position: fixed;
    bottom: 20px; /* Chatbot'un altında */
    left: 20px; /* Sol taraf, chatbot ile aynı hizada */
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* WhatsApp pulse animation */
@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

/* Chatbot Container - Sol tarafta açılır */
.chatbot-container {
    position: fixed;
    bottom: 160px; /* Her iki butonun da üstünde */
    left: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpLeft 0.3s ease-out;
}

.chatbot-container.active {
    display: flex;
}

@keyframes slideUpLeft {
    from {
        opacity: 0;
        transform: translateY(20px) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Chatbot Header - Turuncu tema */
.chatbot-header {
    background: linear-gradient(135deg, #ff7e00 0%, #ff6b00 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.online-status {
    font-size: 12px;
    opacity: 0.9;
    font-weight: normal;
    animation: onlineBlink 2s infinite;
}

@keyframes onlineBlink {
    0%, 50% { opacity: 0.9; }
    25% { opacity: 1; }
    75% { opacity: 0.7; }
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.bot .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-bubble {
    background: #ff7e00;
    color: white;
    border-bottom-right-radius: 5px;
}

/* Quick Replies */
.quick-replies {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-reply-btn {
    background: #fff5e6;
    border: 1px solid #ff7e00;
    color: #ff7e00;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply-btn:hover {
    background: #ff7e00;
    color: white;
    border-color: #ff7e00;
}

/* Chat Input */
.chatbot-input {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: white;
}

.input-group {
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

.chatbot-input input:focus {
    border-color: #ff7e00;
    box-shadow: 0 0 0 3px rgba(255, 126, 0, 0.1);
}

.send-btn {
    background: #ff7e00;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: #ff6b00;
}

.send-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #ff7e00;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* WhatsApp Direct Link Button - Back to Top ile çakışmayı önlemek için */
.whatsapp-direct {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 998;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.whatsapp-direct:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* Mobile responsive - Sol taraf düzenlemesi */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 150px; /* Mobilde daha yukarıda */
        left: 20px;
        right: 20px;
        max-width: 350px;
    }
    
    .chatbot-float {
        bottom: 80px; /* Mobilde daha yakın */
        left: 15px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float {
        bottom: 15px; /* En altta */
        left: 15px; /* Sol tarafta */
        width: 55px;
        height: 55px;
    }
}

/* Tablet responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .chatbot-container {
        width: 320px;
        height: 480px;
        bottom: 170px;
    }
    
    .chatbot-float {
        bottom: 85px;
        width: 58px;
        height: 58px;
    }
    
    .whatsapp-float {
        bottom: 18px;
        left: 18px;
        width: 58px;
        height: 58px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 30px);
        height: 65vh;
        left: 15px;
        right: 15px;
        bottom: 140px;
    }
    
    .chatbot-float {
        width: 50px;
        height: 50px;
        bottom: 75px;
        left: 10px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 10px;
        left: 10px;
    }
}

/* Landscape mode optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .chatbot-container {
        height: 80vh;
        width: 300px;
        bottom: 120px;
    }
    
    .chatbot-float {
        width: 45px;
        height: 45px;
        bottom: 60px;
        left: 10px;
    }
    
    .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 10px;
        left: 10px;
    }
}

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ff7e00;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #ff6b00;
} 