/* WhatsApp Butonu ve Chatbot Stilleri */

/* Floating Butonlar Container - Tüm butonları hizalamak için */
.floating-buttons-container {
    position: fixed;
    right: 20px;
    bottom: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    pointer-events: none;
}

.floating-buttons-container > * {
    pointer-events: auto;
}

/* WhatsApp Floating Button - Ortak Stil */
.whatsapp-float,
#chatbot-toggle,
.whatsapp-btn,
.ai-bot-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    right: 20px !important;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
}

.whatsapp-float i,
#chatbot-toggle i,
.whatsapp-btn i,
.ai-bot-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: inherit;
}

/* WhatsApp İkonu - En Altta */
.whatsapp-float,
.whatsapp-btn {
    bottom: 25px;
    background-color: #25d366 !important;
    color: #FFF !important;
}

.whatsapp-float:hover,
.whatsapp-btn:hover {
    background-color: #20ba5a !important;
    transform: scale(1.1);
    box-shadow: 3px 3px 5px #666;
}

/* AI Bot İkonu - WhatsApp'ın Üstünde */
/* Butonlar arasında eşit boşluk: 25px (WhatsApp bottom) + 60px (WhatsApp yüksekliği) + 15px (boşluk) = 100px */
#chatbot-toggle,
.ai-bot-btn {
    bottom: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #FFF !important;
}

#chatbot-toggle:hover,
.ai-bot-btn:hover {
    transform: scale(1.1);
    box-shadow: 3px 3px 5px #666;
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-container.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.chatbot-message.bot .chatbot-message-content {
    background: #e5e5e5;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chatbot-message.user .chatbot-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.chatbot-message.user .chatbot-avatar {
    margin-right: 0;
    margin-left: 10px;
    background: #25d366;
}

/* Chatbot Input */
.chatbot-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #e5e5e5;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.chatbot-send:hover {
    transform: scale(1.1);
}

.chatbot-send:active {
    transform: scale(0.95);
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    gap: 5px;
    padding: 12px 16px;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-float,
    #chatbot-toggle,
    .whatsapp-btn,
    .ai-bot-btn {
        width: 55px;
        height: 55px;
        right: 20px !important;
        font-size: 26px;
    }
    
    /* Butonlar arasında eşit boşluk: 20px (WhatsApp bottom) + 55px (WhatsApp yüksekliği) + 15px (boşluk) = 90px */
    .whatsapp-float,
    .whatsapp-btn {
        bottom: 20px;
    }
    
    /* Chatbot: 20px + 55px + 15px = 90px, ama 85px kullanıyoruz çünkü orijinal tasarım böyle */
    #chatbot-toggle,
    .ai-bot-btn {
        bottom: 90px; /* 20px + 55px + 15px = 90px (eşit boşluk için) */
    }
    
    .scrollToTop {
        right: 20px !important;
    }

    .chatbot-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        bottom: 150px;
        right: 10px;
        left: 10px;
        border-radius: 15px;
        max-width: none;
    }

    .chatbot-header {
        padding: 12px 15px;
        border-radius: 15px 15px 0 0;
    }

    .chatbot-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float,
    #chatbot-toggle,
    .whatsapp-btn,
    .ai-bot-btn {
        width: 50px;
        height: 50px;
        right: 15px !important;
        font-size: 24px;
    }
    
    /* Butonlar arasında eşit boşluk: 15px (WhatsApp bottom) + 50px (WhatsApp yüksekliği) + 15px (boşluk) = 80px */
    .whatsapp-float,
    .whatsapp-btn {
        bottom: 15px;
    }
    
    /* Chatbot: 15px + 50px + 15px = 80px (eşit boşluk için) */
    #chatbot-toggle,
    .ai-bot-btn {
        bottom: 80px; /* 15px + 50px + 15px = 80px (eşit boşluk için) */
    }
    
    .scrollToTop {
        right: 15px !important;
    }

    .chatbot-container {
        width: calc(100vw - 16px);
        height: calc(100vh - 100px);
        bottom: 140px;
        right: 8px;
        left: 8px;
        max-width: none;
    }
}
