/* Chatbot Styles - Ali Çukurlu Dijital Pazarlama */

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C82AEF 0%, #9B1FBD 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(200, 42, 239, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(200, 42, 239, 0.6);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.chatbot-toggle .chat-icon {
    display: block;
}

.chatbot-toggle .close-icon {
    display: none;
}

.chatbot-toggle.active .chat-icon {
    display: none;
}

.chatbot-toggle.active .close-icon {
    display: block;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #C82AEF 0%, #9B1FBD 100%);
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar svg {
    width: 24px;
    height: 24px;
}

.chat-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-minimize {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-minimize:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-minimize svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #F5F5F7;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #C82AEF;
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease;
    max-width: 100%;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
    max-width: 90%;
}

.bot-message .message-content {
    max-width: 85%;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    max-width: 90%;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #C82AEF 0%, #9B1FBD 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.message-content::-webkit-scrollbar {
    width: 4px;
}

.message-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.message-content::-webkit-scrollbar-thumb {
    background: #C82AEF;
    border-radius: 4px;
}

.message-content::-webkit-scrollbar-thumb:hover {
    background: #9B1FBD;
}

.user-message .message-content {
    background: linear-gradient(135deg, #C82AEF 0%, #9B1FBD 100%);
    color: white;
    max-width: 75%;
}

.user-message .message-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
}

.user-message .message-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
}

.user-message .message-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.user-message .message-content p {
    color: white;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #C82AEF;
    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);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Quick Replies */
.chatbot-quick-replies {
    padding: 12px 20px;
    background: white;
    border-top: 1px solid #E0E0E0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.chatbot-quick-replies::-webkit-scrollbar {
    height: 4px;
}

.chatbot-quick-replies::-webkit-scrollbar-thumb {
    background: #C82AEF;
    border-radius: 2px;
}

.quick-reply-btn {
    padding: 8px 14px;
    background: #F5F5F7;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-reply-btn:hover {
    background: #C82AEF;
    color: white;
    border-color: #C82AEF;
}

/* Input Area */
.chatbot-input {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #E0E0E0;
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.chatbot-input input:focus {
    border-color: #C82AEF;
    box-shadow: 0 0 0 3px rgba(200, 42, 239, 0.1);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #C82AEF 0%, #9B1FBD 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(200, 42, 239, 0.4);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Footer */
.chatbot-footer {
    padding: 8px 20px;
    background: #F5F5F7;
    border-radius: 0 0 16px 16px;
    text-align: center;
    font-size: 11px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        max-height: 600px;
    }

    .message-content {
        max-width: 80%;
    }

    .user-message .message-content {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        bottom: 75px;
    }

    .message-content {
        max-width: 85%;
        max-height: 250px;
        font-size: 13px;
    }

    .user-message .message-content {
        max-width: 88%;
    }
}

