/* Vitality AI chat additions — complements the existing .lc-* rules in app.css.
   Uses the same design tokens (--color-*, --radius-lg) with safe fallbacks. */

.lc-head__actions { display: flex; align-items: center; gap: 0.25rem; }
.lc-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border: 0; border-radius: 999px;
    background: transparent; color: inherit; cursor: pointer;
}
.lc-icon-btn:hover:not(:disabled) { background: rgba(15, 23, 42, 0.08); }
.lc-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Markdown bubbles: the base .lc-msg uses pre-wrap for plain text; HTML needs normal flow. */
.lc-msg--md { white-space: normal; }
.lc-msg--user.lc-msg--md { white-space: pre-wrap; }
.lc-msg--md p { margin: 0 0 0.5rem; }
.lc-msg--md p:last-child { margin-bottom: 0; }
.lc-msg--md ul, .lc-msg--md ol { margin: 0.25rem 0 0.5rem 1.1rem; padding: 0; }
.lc-msg--md li { margin: 0.15rem 0; }
.lc-msg--md code { font-size: 0.85em; padding: 0.05rem 0.3rem; border-radius: 0.25rem; background: rgba(15, 23, 42, 0.07); }
.lc-msg--md .lc-h { margin-top: 0.25rem; }
.lc-msg--error { border: 1px solid #fecaca; background: #fef2f2 !important; color: #7f1d1d !important; }

.lc-table-wrap { overflow-x: auto; margin: 0.35rem 0 0.5rem; }
.lc-table { border-collapse: collapse; font-size: 0.85rem; min-width: 100%; }
.lc-table th, .lc-table td { border: 1px solid var(--color-border, #e2e8f0); padding: 0.3rem 0.45rem; text-align: left; vertical-align: top; }
.lc-table th { background: rgba(15, 23, 42, 0.04); font-weight: 600; }

.lc-cite {
    display: inline-block; font-size: 0.68rem; line-height: 1; font-weight: 600;
    padding: 0.15rem 0.3rem; margin: 0 0.1rem; border-radius: 0.3rem;
    background: rgba(11, 95, 255, 0.1); color: var(--color-primary, #0b5fff); vertical-align: super;
}
.lc-sources { margin-top: 0.5rem; font-size: 0.8rem; color: var(--color-ink-soft, #475569); }
.lc-sources summary { cursor: pointer; font-weight: 600; }
.lc-sources ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
.lc-sources li { margin: 0.2rem 0; }
.lc-sources .lc-cite { vertical-align: baseline; }

.lc-caret {
    display: inline-block; width: 0.45rem; height: 1rem; margin-left: 0.15rem; vertical-align: text-bottom;
    background: currentColor; opacity: 0.6; animation: lc-blink 1s steps(2, start) infinite;
}
@keyframes lc-blink { to { visibility: hidden; } }

.lc-status { margin-left: 0.5rem; font-size: 0.8rem; color: var(--color-ink-soft, #475569); }

.lc-feedback { display: flex; gap: 0.25rem; margin-top: 0.35rem; }
.lc-feedback button {
    border: 1px solid transparent; background: transparent; cursor: pointer;
    font-size: 0.85rem; padding: 0.05rem 0.3rem; border-radius: 0.4rem; opacity: 0.55;
}
.lc-feedback button:hover, .lc-feedback button.is-on { opacity: 1; border-color: var(--color-border, #e2e8f0); }

.lc-retry {
    margin-top: 0.5rem; border: 1px solid currentColor; background: transparent; color: inherit;
    border-radius: 999px; padding: 0.2rem 0.75rem; font-size: 0.8rem; cursor: pointer;
}

.lc-suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }
.lc-suggestions .lc-option { font-size: 0.8rem; }

.lc-stop { background: #475569 !important; }

@media (prefers-reduced-motion: reduce) { .lc-caret { animation: none; } }
