/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 100px; /* Sosyal butonlardan uzaklaştır */
    z-index: 40; /* Sticky social'den daha düşük z-index */
    font-family: 'Poppins', sans-serif;
}

/* Chat Button */
.chatbot-button {
    position: relative;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #60C5D1 0%, #2c7fb8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(96, 197, 209, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: visible;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(96, 197, 209, 0.6);
}

.chatbot-button i {
    font-size: 24px;
    color: white;
    transition: transform 0.3s ease;
}

.chatbot-button:hover i {
    transform: scale(1.1);
}

/* Notification Badge */
.chatbot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
    border: 3px solid white;
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 384px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chatbot-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #60C5D1 0%, #2c7fb8 100%);
    padding: 16px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chatbot-header-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.chatbot-header-info p {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages */
.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Welcome Message */
.chatbot-welcome {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.chatbot-welcome p {
    margin: 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
}

/* Quick Replies */
.chatbot-quick-replies {
    margin-top: 16px;
}

.chatbot-quick-reply {
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-quick-reply:hover {
    background: #e0f7fa;
    border-color: #60C5D1;
    transform: translateX(4px);
}

.chatbot-quick-reply:last-child {
    margin-bottom: 0;
}

.chatbot-quick-reply-icon {
    font-size: 16px;
    color: #60C5D1;
    flex-shrink: 0;
}

.chatbot-quick-reply-text {
    font-size: 14px;
    font-weight: 500;
    color: #2c7fb8;
    margin: 0;
}

/* Chat Footer */
.chatbot-footer {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.chatbot-whatsapp-btn {
    width: 100%;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.chatbot-whatsapp-btn:hover {
    background: #20b954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.chatbot-whatsapp-btn i {
    font-size: 18px;
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 60px;
}

.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.chatbot-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.chatbot-typing-dot: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;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 80px; /* Sticky social için yer bırak */
        right: 16px;
    }

    .chatbot-button {
        width: 56px;
        height: 56px;
    }

    .chatbot-button i {
        font-size: 20px;
    }

    .chatbot-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }

    .chatbot-window {
        width: calc(100vw - 32px);
        height: 450px;
        bottom: 70px;
        right: -8px;
    }

    .chatbot-header {
        padding: 12px;
    }

    .chatbot-header-info h3 {
        font-size: 16px;
    }

    .chatbot-header-info p {
        font-size: 11px;
    }

    .chatbot-messages {
        padding: 12px;
    }

    .chatbot-welcome {
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .chatbot-welcome p {
        font-size: 13px;
    }

    .chatbot-quick-reply {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .chatbot-quick-reply-text {
        font-size: 13px;
    }

    .chatbot-footer {
        padding: 12px;
    }

    .chatbot-whatsapp-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 70px;
        right: 12px;
    }

    .chatbot-button {
        width: 52px;
        height: 52px;
    }

    .chatbot-button i {
        font-size: 18px;
    }

    .chatbot-window {
        width: calc(100vw - 24px);
        height: 400px;
    }
}

/* RTL Support */
[dir="rtl"] .chatbot-widget {
    right: auto;
    left: 24px;
}

[dir="rtl"] .chatbot-window {
    right: auto;
    left: 0;
}

[dir="rtl"] .chatbot-quick-reply:hover {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    [dir="rtl"] .chatbot-widget {
        right: auto;
        left: 16px;
    }
}

@media (max-width: 480px) {
    [dir="rtl"] .chatbot-widget {
        right: auto;
        left: 12px;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Hide/Show Animation */
.chatbot-window.hidden {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    visibility: hidden;
}

.chatbot-window.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Focus States */
.chatbot-button:focus {
    outline: 2px solid #60C5D1;
    outline-offset: 2px;
}

.chatbot-quick-reply:focus {
    outline: 2px solid #60C5D1;
    outline-offset: 2px;
}

.chatbot-whatsapp-btn:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    .chatbot-window {
        background: #1f2937;
        color: white;
    }

    .chatbot-messages {
        background: #111827;
    }

    .chatbot-welcome {
        background: #374151;
        color: white;
    }

    .chatbot-welcome p {
        color: #e5e7eb;
    }

    .chatbot-quick-reply {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }

    .chatbot-quick-reply:hover {
        background: #4b5563;
        border-color: #60C5D1;
    }

    .chatbot-quick-reply-text {
        color: #60C5D1;
    }

    .chatbot-footer {
        border-color: #4b5563;
        background: #374151;
    }
}
