/* ============================================
   TITLE-IDEAS.CSS — Full-page thesis title chat.
   ============================================ */

.ti-page {
    width: min(760px, calc(100% - 28px));
    margin: 24px auto 90px;
    height: calc(100svh - var(--header-offset) - 114px);
    min-height: 480px;
    display: flex;
}

.ti-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--clr-paper-alt);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.ti-header {
    background: var(--clr-navy);
    color: #fff;
    padding: var(--sp-4) var(--sp-5);
}

.ti-header h1 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.ti-header p {
    font-size: 0.8rem;
    color: rgba(247, 248, 244, 0.75);
}

.ti-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    background: var(--clr-paper);
}

.ti-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.ti-msg.user {
    align-self: flex-end;
    background: var(--clr-green);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.ti-msg.bot {
    align-self: flex-start;
    background: var(--clr-paper-alt);
    border: 1px solid var(--clr-line);
    color: var(--clr-ink);
    border-bottom-left-radius: 2px;
}

.ti-msg.bot.pending { color: var(--clr-ink-soft); font-style: italic; }
.ti-msg.bot.error { color: var(--clr-error); border-color: rgba(179, 38, 30, 0.3); background: rgba(179, 38, 30, 0.06); }

.ti-form {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-2);
    padding: var(--sp-3);
    border-top: 1px solid var(--clr-line);
    background: var(--clr-paper-alt);
}

#ti-input {
    flex: 1;
    border: 1px solid var(--clr-line);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font-size: 0.88rem;
    font-family: var(--font-stack);
    resize: none;
    max-height: 140px;
}

#ti-input:focus { outline: none; border-color: var(--clr-green); }

#ti-send {
    background: var(--clr-green);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

#ti-send:hover { background: var(--clr-green-dk); }
#ti-send:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 600px) {
    .ti-page { height: calc(100svh - var(--header-offset) - 90px); }
    .ti-msg { max-width: 90%; }
}
