/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Courier New', monospace;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(126, 59, 237, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(126, 59, 237, 0.6);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    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.16, 1, 0.3, 1);
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    background: #2d2d2d;
    padding: 15px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-status-dot {
    width: 8px;
    height: 8px;
    background: #27c93f;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.chat-minimize-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.chat-minimize-btn:hover {
    color: #fff;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #1e1e1e;
}

.message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.message.bot {
    align-self: flex-start;
    background: #2d2d2d;
    color: #e0e0e0;
    border-bottom-left-radius: 2px;
    border: 1px solid #333;
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 15px;
    background: #2d2d2d;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 10px 15px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.chat-input:focus {
    border-color: var(--primary);
}

.chat-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.1);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 15px;
    background: #2d2d2d;
    border-radius: 12px;
    width: fit-content;
    border-bottom-left-radius: 2px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(39, 201, 63, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(39, 201, 63, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 60vh;
    }
}