/* assets/css/style.css */

/* --- 1. IMPORT FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Mulish:wght@600;700&display=swap');

/* --- Main Container --- */
.vfc-chat-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    font-family: -apple-system, BlinkMacSystemFont, "Mulish", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Chat History Area --- */
.vfc-chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth; 
}

/* Scrollbar styling */
.vfc-chat-messages::-webkit-scrollbar { width: 6px; }
.vfc-chat-messages::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 4px; }

/* --- Message Bubbles --- */
.vfc-chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
    /* Fade in animation */
    animation: vfc-fade-in 0.2s ease-out;
}

@keyframes vfc-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.vfc-chat-message-user {
    align-self: flex-end;
    background-color: #417E90;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.vfc-chat-message-assistant {
    align-self: flex-start;
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* --- Input Area --- */
.vfc-chat-controls {
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vfc-chat-input {
    width: 100%;
    min-height: 50px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    color: #1f2937;
}

.vfc-chat-input:focus {
    border-color: #417E90;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.vfc-chat-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* --- Footer & Buttons --- */
.vfc-chat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Spacer to push button right since checkbox is gone */
.vfc-spacer {
    flex-grow: 1;
}

.vfc-chat-send-btn {
    background-color: #24405A;
    color: #ffffff;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vfc-chat-send-btn:hover { background-color: #374151; }
.vfc-chat-send-btn:disabled { background-color: #9ca3af; cursor: not-allowed; }

.vfc-chat-status {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin-top: 4px;
    height: 14px; /* Fix height to prevent jumping */
}

/* --- Typing Animation --- */
.vfc-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    width: fit-content;
    margin-bottom: 8px;
}

.vfc-dot {
    width: 6px;
    height: 6px;
    background-color: #6b7280;
    border-radius: 50%;
    animation: vfc-bounce 1.4s infinite ease-in-out both;
}

.vfc-dot:nth-child(1) { animation-delay: -0.32s; }
.vfc-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes vfc-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}