:root {
    --tmx-primary: #4F46E5;
    --tmx-primary-hover: #4338CA;
    --tmx-bg: #ffffff;
    --tmx-text: #1F2937;
    --tmx-text-light: #6B7280;
    --tmx-border: #E5E7EB;
    --tmx-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --tmx-radius: 16px;
    --tmx-font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* 1. Embedded Initial Input */
#tmx-chatbot-embedded-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-family: var(--tmx-font);
}

.tmx-chatbot-input-area {
    display: flex;
    gap: 12px;
    position: relative;
    align-items: center;
}

#tmx-chatbot-initial-input,
#tmx-chatbot-modal-input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--tmx-border);
    border-radius: 30px;
    outline: none;
    font-family: var(--tmx-font);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #F9FAFB;
}

#tmx-chatbot-initial-input:focus,
#tmx-chatbot-modal-input:focus {
    border-color: var(--tmx-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background-color: white;
}

#tmx-chatbot-initial-send,
#tmx-chatbot-modal-send {
    background-color: var(--tmx-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#tmx-chatbot-initial-send:hover,
#tmx-chatbot-modal-send:hover {
    background-color: var(--tmx-primary-hover);
    transform: scale(1.05);
}

/* 2. Modal Overlay & Container */
.tmx-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tmx-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.tmx-modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    background-color: white;
    border-radius: var(--tmx-radius);
    box-shadow: var(--tmx-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tmx-fade-in-up 0.3s ease-out;
}

@keyframes tmx-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
#tmx-chatbot-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tmx-text-light);
    z-index: 10;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

#tmx-chatbot-modal-close:hover {
    background-color: #F3F4F6;
    color: var(--tmx-text);
}

/* Conversation Area */
#tmx-chatbot-conversation {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    padding-bottom: 100px;
    /* Space for footer */
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Q&A Pairs */
.tmx-qa-pair {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: tmx-fade-in 0.5s ease-out;
}

@keyframes tmx-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tmx-question {
    font-size: 1.5rem;
    /* ~24px */
    font-weight: 700;
    color: var(--tmx-text);
    margin: 0;
    line-height: 1.3;
}

.tmx-answer {
    font-size: 20px;
    /* Requested size */
    line-height: 1.6;
    color: var(--tmx-text);
}

/* Footer (Fixed Input) */
.tmx-modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    background-color: white;
    border-top: 1px solid var(--tmx-border);
}

/* Skeleton Loader */
.tmx-skeleton-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.tmx-skeleton-line {
    height: 16px;
    background-color: #E5E7EB;
    border-radius: 8px;
    animation: tmx-pulse 1.5s infinite ease-in-out;
}

@keyframes tmx-pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Scrollbar */
#tmx-chatbot-conversation::-webkit-scrollbar {
    width: 8px;
}

#tmx-chatbot-conversation::-webkit-scrollbar-track {
    background: transparent;
}

#tmx-chatbot-conversation::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
    border-radius: 4px;
}