/* ============================================
   GÜRKAN KARACA - RAG Chatbot Widget Styles
   ============================================ */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a853 0%, #b8922e 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(212, 168, 83, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(212, 168, 83, 0.55);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    fill: #0a0a0f;
    transition: transform 0.3s ease;
}

.chatbot-toggle.active svg {
    transform: rotate(90deg);
}

/* Pulse animation for attention */
.chatbot-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(212, 168, 83, 0.3);
    animation: chatbot-pulse 2s ease-in-out infinite;
    z-index: -1;
}

.chatbot-toggle.active::before {
    animation: none;
}

@keyframes chatbot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0; }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 96px;
    left: 24px;
    width: 380px;
    max-height: 520px;
    background: #12121a;
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(212, 168, 83, 0.15);
    flex-shrink: 0;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a853, #b8922e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #0a0a0f;
    flex-shrink: 0;
}

.chatbot-header-info {
    flex: 1;
}

.chatbot-header-info h4 {
    color: #f0f0f0;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.chatbot-header-info p {
    color: #8b8b9e;
    font-size: 11px;
    margin: 2px 0 0;
}

.chatbot-header-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    margin-right: 4px;
    display: inline-block;
}

.chatbot-close {
    background: none;
    border: none;
    color: #8b8b9e;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f0f0f0;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 260px;
    max-height: 320px;
    scroll-behavior: smooth;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.2);
    border-radius: 4px;
}

/* Message Bubbles */
.chatbot-message {
    display: flex;
    gap: 8px;
    animation: chatbot-fadeIn 0.3s ease;
}

@keyframes chatbot-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-message.bot {
    align-self: flex-start;
}

.chatbot-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chatbot-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a853, #b8922e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #0a0a0f;
    flex-shrink: 0;
    margin-top: 2px;
}

.chatbot-message.user .chatbot-msg-avatar {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.chatbot-msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-message.bot .chatbot-msg-bubble {
    background: #1e1e30;
    color: #e0e0e0;
    border-bottom-left-radius: 4px;
}

.chatbot-message.user .chatbot-msg-bubble {
    background: linear-gradient(135deg, #d4a853, #c49a3a);
    color: #0a0a0f;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    gap: 8px;
    align-self: flex-start;
}

.chatbot-typing .chatbot-msg-bubble {
    background: #1e1e30;
    padding: 12px 18px;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.chatbot-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d4a853;
    animation: chatbot-typing 1.4s ease-in-out infinite;
}

.chatbot-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatbot-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Quick Actions / Suggestions */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    flex-shrink: 0;
}

.chatbot-suggestion-btn {
    background: rgba(212, 168, 83, 0.1);
    border: 1px solid rgba(212, 168, 83, 0.25);
    color: #d4a853;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.chatbot-suggestion-btn:hover {
    background: rgba(212, 168, 83, 0.2);
    border-color: rgba(212, 168, 83, 0.5);
}

/* Input Area */
.chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(212, 168, 83, 0.12);
    background: #0f0f18;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    max-height: 80px;
    min-height: 38px;
    line-height: 1.4;
}

.chatbot-input::placeholder {
    color: #555;
}

.chatbot-input:focus {
    border-color: rgba(212, 168, 83, 0.4);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d4a853, #b8922e);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(212, 168, 83, 0.3);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-send-btn svg {
    width: 18px;
    height: 18px;
    fill: #0a0a0f;
}

/* Powered by */
.chatbot-footer {
    text-align: center;
    padding: 6px;
    font-size: 9px;
    color: #444;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        left: 8px;
        right: 8px;
        bottom: 90px;
        width: auto;
        max-height: 70vh;
    }

    .chatbot-toggle {
        bottom: 16px;
        left: 16px;
        width: 54px;
        height: 54px;
    }

    .chatbot-messages {
        min-height: 200px;
        max-height: 45vh;
    }
}
