/*
  styles/research_post.css
  v5 - Reverted to a simple, widget-only chatbot view as requested.
*/

/* --- 1. Base Layout & Reading Experience --- */
.research-container {
    padding: 2rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.paper-column {
    width: 100%;
}

/* --- 2. WIDGET-LIKE Chatbot State --- */
.chatbot-column {
    position: sticky;
    bottom: 2rem;
    max-width: 700px;
    margin: 2rem auto 0 auto;
    z-index: 1000;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.chatbot-column.loaded {
    transform: translateY(0);
}

.chatbot-column:not(.chatbot-active):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

#chat-box {
    border: none;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

/* Chat log is now toggled with the .chatbot-active class */
#chat-log {
    display: none; /* Hidden by default */
    max-height: 50vh;
    overflow-y: auto;
    padding: 15px;
    line-height: 1.6;
}

.chatbot-active #chat-log {
    display: block; /* Shown when chatbot is active */
}

#chat-input {
    border: none;
    padding: 16px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    background: transparent;
    border-top: 1px solid #eee;
    transition: background-color 0.2s ease;
}

#chat-input:disabled {
    background-color: #f1f1f1;
    cursor: not-allowed;
}

/* --- 3. Mobile Responsiveness --- */
@media (max-width: 768px) {
    .research-container {
        padding: 1.5rem 1rem;
    }
    
    .chatbot-column {
        bottom: 1rem;
        margin: 1rem auto 0 auto;
    }
}
