/* chat-composer.css — Chat composer, mode switch, sidebar chat items */

/* ── Chat mode segmented switch ─────────────────────────────────────────── */
.sidebar-inline-btn {
    background: none;
    border: none;
    color: #9cdcfe;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}
.sidebar-inline-btn:hover {
    color: #c8e6f9;
    text-decoration: underline;
}
.sidebar-from-selected-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
}
.sidebar-from-selected-label input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

/* Unified prompt box: textarea + controls inside one bordered container */
.composer-input-group {
    display: flex;
    flex-direction: column;
    border: 1px solid #3e3e3e;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-input);
    margin-bottom: 10px;
}
.composer-text-row {
    display: flex;
    align-items: stretch;
}
.composer-text-row textarea {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    margin: 0;
    background: transparent !important;
    height: auto;
}
.composer-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-top: 1px solid #3e3e3e;
    background: var(--bg-input);
}
#newChatBtn {
    border-radius: 0;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    padding: 0 14px;
    flex-shrink: 0;
    border: none;
    border-right: 1px solid #3e3e3e;
}

.chat-mode-switch {
    display: flex;
    border: 1px solid #569cd6;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.chat-mode-switch input[type="radio"] {
    display: none;
}
.chat-mode-switch label {
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #9cdcfe;
    background: #1e1e1e;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    user-select: none;
    line-height: 26px;
}
.chat-mode-switch label:not(:last-child) {
    border-right: 1px solid #569cd6;
}
.chat-mode-switch input[type="radio"]:checked + label {
    background: #2a1a3e;
    color: #fff;
}
.chat-mode-switch label:hover {
    background: #2d2d2d;
}
.chat-mode-switch input[type="radio"]:checked + label:hover {
    background: #3a2354;
}

/* Search term highlight in chat messages */
mark.search-highlight {
    background: #b8860b;
    color: #fff;
    border-radius: 2px;
    padding: 0 2px;
    animation: search-blink 0.7s ease-in-out 6;
}
@keyframes search-blink {
    0%, 100% { background: #ffd700; color: #1a1a1a; }
    50%       { background: #ff8c00; color: #fff; }
}

/* Sidebar chat thread items — mirrors help-toc-item */
.sidebar-thread-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 12px;
    color: var(--text-primary);
    text-decoration: none;
}
.sidebar-thread-item:hover {
    background: var(--bg-hover);
}
