/* Shared chat assistant styles (used by the career site and the photography site).
 * Relies on the host page's design tokens: --brand, --ink, --surface, --border, etc. */
.chat-panel {
    position: fixed; right: 20px; bottom: 96px; z-index: 1200; width: min(400px, calc(100vw - 40px));
    height: min(640px, calc(100vh - 130px)); display: flex; flex-direction: column;
    background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); overflow: hidden; transform-origin: bottom right; animation: pop .22s var(--ease);
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; background: var(--gradient); color: #fff; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: 0 0 auto; }
.chat-title { flex: 1; min-width: 0; }
.chat-title h2 { color: #fff; font-size: 1rem; margin: 0; }
.chat-title p { margin: 0; font-size: .78rem; opacity: .85; display: flex; align-items: center; gap: .35rem; }
.chat-title .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; display: inline-block; }
.chat-head button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.chat-head button:hover { background: rgba(255, 255, 255, .28); }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .85rem; scroll-behavior: smooth; overscroll-behavior: contain; }
.msg { display: flex; flex-direction: column; max-width: 88%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble { padding: .7rem .95rem; border-radius: 16px; font-size: .93rem; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.bot .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.user .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.error .bubble { border-color: rgba(220, 53, 69, .45); background: rgba(220, 53, 69, .08); }
.bubble p { margin: 0 0 .5rem; }
.bubble p:last-child, .bubble ul:last-child, .bubble ol:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: .25rem 0 .5rem; padding-left: 1.2rem; }
.bubble li { margin: .15rem 0; }
.bubble strong { font-weight: 600; }
.bubble code { background: var(--brand-soft); padding: 0 .3rem; border-radius: 4px; font-size: .88em; }
.bubble h4 { font-size: .95rem; margin: .5rem 0 .25rem; }
.msg-meta { font-size: .7rem; color: var(--ink-3); margin-top: .25rem; padding: 0 .25rem; display: flex; gap: .4rem; align-items: center; }
.msg-source { padding: 0 .4rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.msg-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.msg-actions button { font-size: .8rem; padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--brand); background: transparent; color: var(--brand); cursor: pointer; }
.msg-actions button:hover { background: var(--brand); color: #fff; }
.typing { display: inline-flex; gap: 4px; padding: .8rem 1rem; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-suggest { display: flex; gap: .45rem; padding: .6rem 1rem 0; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
.chat-suggest::-webkit-scrollbar { display: none; }
.chat-suggest button {
    flex: 0 0 auto; white-space: nowrap; font-size: .8rem; padding: .4rem .8rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg); color: var(--ink-2); cursor: pointer;
}
.chat-suggest button:hover { border-color: var(--brand); color: var(--brand); }
.chat-form { display: flex; gap: .5rem; align-items: flex-end; padding: .75rem 1rem 1rem; border-top: 1px solid var(--border); margin-top: .6rem; }
.chat-form textarea {
    flex: 1; resize: none; max-height: 120px; min-height: 44px; padding: .65rem .95rem; border-radius: 22px;
    border: 1px solid var(--border); background: var(--bg); color: var(--ink); font: inherit; font-size: .93rem; line-height: 1.4;
}
.chat-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; flex: 0 0 auto; }
.chat-form button:disabled { opacity: .5; cursor: not-allowed; }
.chat-foot-note { font-size: .7rem; color: var(--ink-3); text-align: center; padding: 0 1rem .6rem; margin-top: -.4rem; }
@media (max-width: 575.98px) {
    .chat-panel { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
    .msg { max-width: 92%; }
}

