/* Chatbot UI styles - Moments to Frames Studio */

:root {
    --chat-bg: #fdfdf9;
    /* off-white / cream */
    --chat-primary: #e6dac3;
    /* warm beige / sand tone */
    --chat-secondary: #f4e1e1;
    /* soft blush */
    --chat-text: #333333;
    /* charcoal gray */
    --chat-accent: #dca3a3;
    /* muted blush (darker blush for buttons and borders) */
    --chat-font-heading: 'Playfair Display', serif;
    --chat-font-body: 'Lora', serif;
}

/* Chatbot Floating Button */
#chatbot-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--chat-primary);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#chatbot-toggle-btn:hover {
    transform: scale(1.05);
    background-color: var(--chat-accent);
}

#chatbot-toggle-btn svg {
    width: 30px;
    height: 30px;
    fill: var(--chat-text);
}

/* Chatbot Window */
#chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-height: 500px;
    background-color: var(--chat-bg);
    border: 1px solid var(--chat-primary);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
    /* hidden by default */
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    font-family: var(--chat-font-body);
    color: var(--chat-text);
}

#chatbot-container.open {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
#chatbot-header {
    background-color: var(--chat-primary);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--chat-secondary);
}

#chatbot-header h3 {
    margin: 0;
    font-family: var(--chat-font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--chat-text);
    letter-spacing: 0.5px;
}

#chatbot-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--chat-text);
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#chatbot-close-btn:hover {
    opacity: 1;
}

/* Chatbot Body/Messages */
#chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 250px;
    max-height: 350px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 8px;
    word-wrap: break-word;
}

.chat-message.bot {
    align-self: flex-start;
    background-color: var(--chat-secondary);
    border-bottom-left-radius: 2px;
}

/* List Styling Inside Messages */
.chat-message ul {
    margin: 5px 0;
    padding-left: 20px;
}

.chat-message li {
    margin-bottom: 4px;
}

.chat-message.user {
    align-self: flex-end;
    background-color: var(--chat-primary);
    border-bottom-right-radius: 2px;
}

.chat-message.system {
    align-self: center;
    background-color: transparent;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    padding: 5px 10px;
}

/* Quick Replies */
.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.quick-reply-btn {
    background-color: #fff;
    border: 1px solid var(--chat-accent);
    color: var(--chat-text);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-family: var(--chat-font-body);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background-color: var(--chat-accent);
    color: #fff;
}

/* External Link Buttons inside messages */
.chat-action-btn {
    display: inline-block;
    background-color: var(--chat-accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    font-family: var(--chat-font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.chat-action-btn:hover {
    opacity: 0.9;
    color: #fff;
}

/* Chatbot Input Area */
#chatbot-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--chat-primary);
    background-color: #fff;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-family: var(--chat-font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: var(--chat-accent);
}

#chatbot-send-btn {
    background: none;
    border: none;
    color: var(--chat-accent);
    margin-left: 10px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

#chatbot-send-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Scrollbar styles */
#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

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

#chatbot-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #chatbot-container {
        right: 15px;
        left: 15px;
        bottom: 90px;
        width: auto;
        max-height: 60vh;
    }

    #chatbot-toggle-btn {
        right: 15px;
        bottom: 15px;
    }
}