/* ==========================================
   AI CHATBOT STYLES - LUXURY GOLD/BLACK THEME
   ========================================== */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 2px solid var(--gold-highlight);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    animation: pulse 2s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(201, 169, 97, 0.6);
}

.chatbot-toggle svg {
    width: 30px;
    height: 30px;
    fill: var(--text-light);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(201, 169, 97, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(201, 169, 97, 0.7);
    }
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background-color: var(--bg-dark);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(201, 169, 97, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.chatbot-container.active {
    transform: scale(1);
    opacity: 1;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold-highlight);
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--text-light);
}

.chatbot-avatar svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.chatbot-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    letter-spacing: 0.5px;
}

.chatbot-title p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    margin-top: 2px;
}

.chatbot-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

.chatbot-close svg {
    width: 20px;
    height: 20px;
    fill: var(--text-light);
}

/* Chatbot Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: linear-gradient(to bottom, var(--bg-dark), var(--bg-section));
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlideIn 0.3s ease;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 2px solid var(--gold-highlight);
}

.message.user .message-avatar {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
}

.message-avatar svg {
    width: 18px;
    height: 18px;
    fill: var(--text-light);
}

.message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-bubble {
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 85%;
    word-wrap: break-word;
}

.message.bot .message-bubble {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(212, 175, 55, 0.1));
    border: 1px solid var(--border-gold);
    color: var(--text-light);
    border-radius: 12px 12px 12px 4px;
}

.message.user {
    flex-direction: row-reverse;
}

.message.user .message-content {
    align-items: flex-end;
}

.message.user .message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 12px 12px 4px 12px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-gray);
    padding: 0 0.5rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: typing 1.4s infinite;
}

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

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

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

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quick-reply-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.quick-reply-btn:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.3);
}

/* Chatbot Input Area */
.chatbot-input-area {
    padding: 1.25rem;
    background: var(--bg-section);
    border-top: 1px solid var(--border-gold);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0.875rem 1.25rem;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.chatbot-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.chatbot-input::placeholder {
    color: var(--text-gray);
}

.chatbot-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.4);
}

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

.chatbot-send-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-light);
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-gray);
}

.welcome-message h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.welcome-message p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 90px;
        right: 20px;
        left: 20px;
        width: auto;
        max-width: none;
        height: 500px;
    }

    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .chatbot-toggle svg {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 80px;
        height: 450px;
    }

    .chatbot-header {
        padding: 1rem;
    }

    .chatbot-messages {
        padding: 1rem;
    }

    .message-bubble {
        font-size: 0.9rem;
        max-width: 90%;
    }

    .chatbot-input-area {
        padding: 1rem;
    }
}
