/* ============================================= */
/* CHATBOT WIDGET STYLES                         */
/* ============================================= */

.chatbot-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: #0b0b0b;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.chatbot-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-widget.minimized {
    height: 70px;
    overflow: hidden;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(145deg, #CC9E36 10%, #FFFF9F 80%, #CCA13B 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 42px;
    height: 42px;
    background: #0b0b0b;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chatbot-avatar i {
    font-size: 1.5rem;
    color: #FFD76A;
}

.chatbot-header-info h4 {
    color: #0b0b0b;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.chatbot-header-info p {
    color: #1a1a1a;
    font-size: 0.75rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-header-actions {
    display: flex;
    gap: 8px;
}

.chatbot-btn-minimize,
.chatbot-btn-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #0b0b0b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.chatbot-btn-minimize:hover,
.chatbot-btn-close:hover {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #0b0b0b;
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

/* Message Styles */
.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.message-avatar i {
    font-size: 1.1rem;
    color: #d4af37;
}

.user-message .message-avatar {
    background: linear-gradient(145deg, #CC9E36, #CCA13B);
    border: none;
}

.user-message .message-avatar i {
    color: #0b0b0b;
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 14px 16px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 85%;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(145deg, #CC9E36 10%, #FFFF9F 80%, #CCA13B 100%);
    color: #0b0b0b;
    border-top-left-radius: 18px;
    border-top-right-radius: 4px;
}

.message-content p {
    margin: 0 0 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 8px 0;
    padding-left: 0;
    list-style: none;
}

.message-content li {
    margin-bottom: 4px;
}

/* Typing Indicator */
.typing-indicator {
    padding: 0 20px;
}

.message-content.typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px;
}

.message-content.typing span {
    width: 8px;
    height: 8px;
    background: #d4af37;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.message-content.typing span:nth-child(2) { animation-delay: 0.2s; }
.message-content.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Chatbot Input Area */
.chatbot-input-area {
    padding: 16px 20px;
    background: #0b0b0b;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 14px 18px;
    border-radius: 30px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.chatbot-input:focus {
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.05);
}

.chatbot-input::placeholder {
    color: #888;
}

.chatbot-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #CC9E36 10%, #FFFF9F 80%, #CCA13B 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn i {
    font-size: 1.2rem;
    color: #0b0b0b;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Chatbot Footer */
.chatbot-footer {
    padding: 8px 20px 12px;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.chatbot-footer p {
    color: #666;
    font-size: 0.7rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.chatbot-footer i {
    color: #d4af37;
    font-size: 0.8rem;
}

/* Floating AI Button (in footer) */
.floating-ai {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.ai-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(145deg, #CC9E36 10%, #FFFF9F 80%, #CCA13B 100%);
    padding: 14px 24px;
    border-radius: 60px;
    text-decoration: none;
    color: #0b0b0b;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4), 0 0 20px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 245, 200, 0.6);
    cursor: pointer;
    border: none;
}

.ai-button i {
    font-size: 1.4rem;
}

.ai-button:hover {
    background: #c9a227;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 30px -5px #cc9e36, 0 0 30px #f5d76e;
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 90px;
        right: 15px;
        width: calc(100vw - 30px);
        height: 550px;
    }

    .floating-ai {
        bottom: 20px;
        right: 20px;
    }

    .ai-button span {
        display: none;
    }

    .ai-button {
        width: 55px;
        height: 55px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .ai-button i {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 80px;
        right: 10px;
        width: calc(100vw - 20px);
        height: 500px;
    }
}