/* ========================================
   1=GE Chatbot Styles
   ======================================== */

/* Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #0EA5E9);
    border: none;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    font-size: 1.75rem;
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    animation: pulse-glow 2s ease-in-out infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

.chatbot-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(16, 185, 129, 0.7);
    }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: 70vh;
    background: rgba(20, 20, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
}

.chatbot-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-title {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.chatbot-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-close:hover {
    background: rgba(239, 68, 68, 0.5);
}

/* Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chatbot-message {
    max-width: 85%;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-line;
}

.chatbot-message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.chatbot-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #10B981, #0EA5E9);
    color: #fff;
}

/* Input Area */
.chatbot-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.chatbot-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chatbot-input:focus {
    border-color: var(--color-primary, #10B981);
    background: rgba(255, 255, 255, 0.12);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #0EA5E9);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.05);
}

/* Light Theme */
[data-theme="light"] .chatbot-window {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .chatbot-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(14, 165, 233, 0.1));
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .chatbot-title {
    color: #1a1a2e;
}

[data-theme="light"] .chatbot-message.bot {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

[data-theme="light"] .chatbot-input-area {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .chatbot-input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1a1a2e;
}

[data-theme="light"] .chatbot-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 60vh;
    }

    .chatbot-toggle {
        bottom: 80px;
        right: 15px;
        width: 54px;
        height: 54px;
    }
}

/* Typing Indicator */
.chatbot-message.typing {
    display: flex;
    gap: 4px;
    padding: 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary, #10B981);
    border-radius: 50%;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

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

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

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}