/* Chatbot Styles */

.chatbot {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #a855f7;
    color: #d1d1d1;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    background: rgba(168, 85, 247, 0.15);
    border-color: #8b5cf6;
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.chatbot-toggle:active {
    transform: translateY(0);
}

.chatbot-icon-open,
.chatbot-icon-close {
    position: absolute;
    transition: all 0.3s ease;
}

.chatbot-icon-close {
    opacity: 0;
    transform: rotate(-90deg);
}

.chatbot-open .chatbot-icon-open {
    opacity: 0;
    transform: rotate(90deg);
}

.chatbot-open .chatbot-icon-close {
    opacity: 1;
    transform: rotate(0);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.chatbot-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(139, 92, 246, 0.1));
}

.chatbot-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chatbot-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f5f5f5;
    margin: 0;
    letter-spacing: 0.01em;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.chatbot-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: chatbotPulse 2s infinite;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.3);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.5);
}

.chatbot-message {
    display: flex;
    animation: chatbotMessageSlide 0.3s ease-out;
}

.chatbot-message-user {
    justify-content: flex-end;
}

.chatbot-message-bot {
    justify-content: flex-start;
}

.chatbot-message-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-message-user .chatbot-message-bubble {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-message-bot .chatbot-message-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
    border-bottom-left-radius: 4px;
}

.chatbot-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chatbot-quick-action {
    padding: 0.625rem 0.875rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: #a855f7;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.chatbot-quick-action:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    transform: translateY(-1px);
}

.chatbot-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 0.75rem;
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f5f5f5;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

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

.chatbot-input:focus {
    outline: none;
    border-color: #a855f7;
    background: rgba(255, 255, 255, 0.08);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.chatbot-send:active {
    transform: translateY(0);
}

/* Animations */
@keyframes chatbotPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes chatbotMessageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot {
        bottom: 1rem;
        right: 1rem;
    }

    .chatbot-toggle {
        width: 56px;
        height: 56px;
    }

    .chatbot-window {
        width: calc(100vw - 2rem);
        height: 500px;
        bottom: 72px;
        right: 0;
    }
}

@media (max-width: 480px) {
    .chatbot-window {
        height: calc(100vh - 120px);
    }
}
