.ask-section {
    padding: 40px 40px;
    max-width: 70%;
    margin: 60px auto;
}

.ask-section h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.chat-container {
    background: var(--background);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 12px var(--shadow);

    /* auto-growing behavior */
    max-height: 400px; /* stop growing after this height */
    overflow-y: auto;

    display: flex;
    flex-direction: column;
}

.chat-container:has(*) {
    padding: 15px 17px;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.4rem;
    margin: 2px 0;
}

.chat-user {
    background: var(--primary);
    color: var(--textLightest);
    align-self: flex-end;
}

.chat-bot {
    color: var(--text);
    align-self: stretch;        /* take full width */
    max-width: 100%;            /* remove bubble limit */
    padding: 0;                 /* remove bubble padding */
}

.chat-bot .markdown-content {
    padding: 14px 18px;
    width: 100%;
    box-sizing: border-box;
}

.chat-input-box {
    display: flex;
    margin-top: 14px;
    gap: 10px;
}

.chat-input-box input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    font-size: 1rem;
}

.chat-input-box button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: var(--textLightest);
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

.chat-input-box button:hover {
    opacity: 0.8;
}

.markdown-content pre {
    background: #1e1e1e;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
}

.markdown-content code {
    background: #eee;
    padding: 2px 4px;
    border-radius: 4px;
}

.markdown-content p {
    margin: 8px 0;
}