/* Nexo AI chat — used in the app (AI Matches) and in the website demo. Dark panel, same tokens as the app. */

.chat {
  display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; color: var(--app-text); color-scheme: dark;
  background: var(--app-surface); border: 1px solid var(--app-line-strong); border-radius: 20px;
}
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--app-line);
  background: linear-gradient(180deg, rgba(75, 227, 150, 0.08), transparent);
}
.chat-avatar { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border-radius: 12px; color: #03100a; background: linear-gradient(135deg, #1fb86a, #7df4ba); }
.chat-title { min-width: 0; }
.chat-title h3 { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.chat-status { display: flex; align-items: center; gap: 7px; font-size: 0.74rem; color: var(--app-muted); }
.chat-status .dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #4be396; box-shadow: 0 0 0 3px rgba(75, 227, 150, 0.18); }
.chat-head .icon-btn { margin-left: auto; }

.chat-log { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px; display: grid; align-content: start; gap: 16px; }
.msg { display: flex; gap: 10px; min-width: 0; }
.msg-avatar { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--app-accent); background: rgba(75, 227, 150, 0.14); }
.msg-body { min-width: 0; display: grid; gap: 10px; align-content: start; font-size: 0.92rem; line-height: 1.55; }
.msg-bot .msg-body { flex: 1; }
.msg-user { justify-content: flex-end; }
.msg-user .msg-body { max-width: 88%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: rgba(75, 227, 150, 0.14); border: 1px solid rgba(75, 227, 150, 0.32); overflow-wrap: anywhere; }
.answer { overflow-wrap: anywhere; }
.answer-list { display: grid; gap: 5px; padding-left: 1.15em; list-style: disc; overflow-wrap: anywhere; }
.answer-list li::marker { color: var(--app-accent); }
.general-tag { display: flex; align-items: flex-start; gap: 7px; font-size: 0.76rem; line-height: 1.45; color: var(--app-faint); }
.general-tag .ico { margin-top: 2px; flex: none; }
.notice { display: flex; align-items: flex-start; gap: 7px; font-size: 0.8rem; color: var(--app-warn); line-height: 1.4; }
.notice .ico { margin-top: 2px; }
.read-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.76rem; color: var(--app-faint); }
.chip-read { color: #bff9db; border-color: rgba(75, 227, 150, 0.3); background: rgba(75, 227, 150, 0.08); }
.chip-relaxed { color: var(--app-warn); border-color: rgba(242, 193, 78, 0.36); background: rgba(242, 193, 78, 0.08); }
.result-list { display: grid; gap: 8px; }

.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest-btn {
  text-align: left; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--app-line-strong); background: rgba(255, 255, 255, 0.04);
  color: var(--app-text); font-size: 0.82rem; line-height: 1.4; transition: border-color 0.15s, background 0.15s;
}
.suggest-btn:hover { border-color: rgba(75, 227, 150, 0.55); background: rgba(75, 227, 150, 0.08); }
.intro-suggest { display: grid; gap: 8px; padding-left: 38px; }
.intro-suggest .suggest { flex-direction: column; align-items: stretch; }
.suggest-label { font-size: 0.74rem; color: var(--app-faint); }

.typing { display: inline-flex; gap: 5px; align-items: center; height: 26px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--app-accent); animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.chat-form { display: flex; align-items: flex-end; gap: 10px; padding: 12px; border-top: 1px solid var(--app-line); background: var(--app-surface); }
.chat-form textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: 132px; resize: none; padding: 12px 14px; line-height: 1.4; font-size: 0.95rem;
  background: var(--app-surface-2); border: 1px solid var(--app-line-strong); border-radius: 14px; color: var(--app-text);
}
.chat-form textarea::placeholder { color: var(--app-faint); }
.chat-form textarea:focus { outline: none; border-color: rgba(75, 227, 150, 0.7); box-shadow: 0 0 0 3px rgba(75, 227, 150, 0.16); }
.send { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 0; border-radius: 14px; color: #03100a; background: linear-gradient(135deg, #3ee08f, #7df4ba); transition: transform 0.15s, opacity 0.15s; }
.send:hover { transform: translateY(-1px); }
.send:disabled { opacity: 0.45; cursor: progress; transform: none; }
.chat-foot { padding: 0 16px 12px; font-size: 0.7rem; line-height: 1.45; color: var(--app-faint); }

@media (max-width: 560px) {
  .chat-log { padding: 14px 12px; }
  .intro-suggest { padding-left: 0; }
  .msg-user .msg-body { max-width: 94%; }
}
