/* ==========================================================
   CHATBOT.CSS - BLOOM REALTY ANALYST AI
   Standalone styles for the floating chatbot widget.
   Depends on: variables from style.css
========================================================== */

/* 1. Toggler Button */
@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(197, 160, 89, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
    }
}

.chatbot-toggler:hover {
    transform: scale(1.1);
    background-color: var(--bloom-gold, #c5a059);
    color: #000;
    /* Hover effect overrides pulse temporarily or combines with it */
    animation: none;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.6);
}

.chatbot-toggler {
    position: fixed;
    bottom: -60px;
    right: 70px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bloom-black, #0a0a0a);
    border: 1px solid var(--bloom-gold, #c5a059);
    color: var(--bloom-gold, #c5a059);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    /* Pulse Animation */
    animation: pulse-gold 2s infinite;
}

/* 2. Chat Window Structure */
.chatbot-window {
    position: fixed;
    bottom: -60px;
    right: 150px;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 120px);
    /* Prevents overlapping the top header area */
    background-color: #000;
    border: 1px solid var(--bloom-gold, #c5a059);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.chatbot-window.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.chatbot-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h5 {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--bloom-gold, #c5a059);
    object-fit: cover;
    background-image: url('../images/heros/home-cityscape-singapore-small.jpg');
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.chatbot-body {
    flex-grow: 1;
    background-color: #0a0a0a;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Message Bubbles Typography */
.chatbot-body .d-flex>div {
    font-size: 0.95rem !important;
    line-height: 1.5;
}

.chatbot-footer {
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.chat-options button {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.btn-outline-gold {
    border-color: #c5a059;
    color: #c5a059;
}

.btn-outline-gold:hover {
    background-color: #c5a059;
    color: #000;
}

.chat-options {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-footer textarea {
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0.75rem;
    font-size: 0.9rem;
    resize: none;
    flex: 1;
}

.chatbot-footer textarea:focus {
    outline: none;
    border-color: #c5a059;
}

.chatbot-send-btn {
    background: none;
    border: 1px solid #333;
    color: #c5a059;
    border-radius: 4px;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-send-btn:hover {
    background: #c5a059;
    color: #000;
    border-color: #c5a059;
}

/* 5. Scrollbar */
.chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* 6. Responsive Behavior */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: calc(100% - 80px);
        /* Leaves space for site header */
        max-height: none;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--bloom-gold, #c5a059);
        z-index: 10000;
    }

    .chatbot-toggler {
        bottom: 20px;
        right: 20px;
    }
}