/* Site Unseen's own website assistant (chat button + panel). Talks to /api/chat; see assets/assistant.js. */
.su-chat-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--espresso); color: var(--oat);
  font: 600 15px var(--sans);
  box-shadow: 0 14px 34px -14px rgba(43,36,32,.7);
  transition: background .15s, transform .15s;
}
.su-chat-btn:hover { background: var(--espresso-hover); }
.su-chat-btn[hidden], .su-chat[hidden] { display: none; }

.su-chat {
  position: fixed; right: 20px; bottom: 20px; z-index: 51;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 40px));
  display: flex; flex-direction: column;
  background: var(--milk); border: 1px solid var(--linen); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(43,36,32,.55);
  font-family: var(--sans); color: var(--espresso);
}
@media (max-width: 520px) { .su-chat { right: 16px; bottom: 16px; height: calc(100dvh - 32px); } }

.su-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--espresso); color: var(--oat); }
.su-chat-head svg { flex: none; --mark-frame: #EFE9DF; --mark-code: #C9B39A; }
.su-chat-head div { flex: 1; display: grid; gap: 2px; }
.su-chat-head b { font-family: var(--serif); font-weight: 400; font-size: 19px; letter-spacing: -.01em; }
.su-chat-head small { font-size: 12px; color: #C9BBA8; }
.su-chat-close { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--oat); cursor: pointer; }
.su-chat-close:hover { background: rgba(255,255,255,.1); }

.su-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.su-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.su-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--linen); border-bottom-left-radius: 4px; color: var(--body); }
.su-msg.you { align-self: flex-end; background: var(--espresso); color: var(--oat); border-bottom-right-radius: 4px; }
.su-msg a { color: inherit; }
.su-msg.err { background: var(--oat); border-style: dashed; }
.su-typing { align-self: flex-start; display: flex; gap: 4px; padding: 13px 14px; background: #fff; border: 1px solid var(--linen); border-radius: 14px; border-bottom-left-radius: 4px; }
.su-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--clay); animation: su-blink 1s infinite; }
.su-typing i:nth-child(2) { animation-delay: .15s; } .su-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes su-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .su-typing i { animation: none; } }

.su-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.su-chips button { font: 500 13px var(--sans); color: var(--espresso); background: transparent; border: 1.5px solid var(--linen); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.su-chips button:hover { border-color: var(--espresso); }

/* Project-details card: the visitor checks it and presses Send */
.su-lead { align-self: stretch; background: #fff; border: 1.5px solid var(--clay); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.su-lead dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; line-height: 1.45; }
.su-lead dt { color: var(--walnut); font-weight: 600; }
.su-lead dd { margin: 0; color: var(--espresso); overflow-wrap: anywhere; }
.su-lead-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.su-lead-actions button { font: 600 13px var(--sans); padding: 9px 14px; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--linen); background: transparent; color: var(--espresso); }
.su-lead-actions .su-lead-send { background: var(--espresso); border-color: var(--espresso); color: var(--oat); }
.su-lead-actions button:disabled { opacity: .55; cursor: default; }
.su-lead-done { margin: 0; font-size: 13px; color: #1f7a45; font-weight: 600; }
.su-lead.is-sent { border-color: #9cc8ad; }

.su-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--linen); background: #fff; }
.su-chat-form textarea {
  flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 10px 14px;
  border: 1.5px solid var(--linen); border-radius: 21px; background: var(--milk);
  font: 15px/1.4 var(--sans); color: var(--espresso);
}
.su-chat-form textarea:focus { outline: none; border-color: var(--clay-ink); }
.su-chat-form button { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--espresso); color: var(--oat); cursor: pointer; }
.su-chat-form button:disabled { opacity: .5; cursor: default; }
.su-chat-note { padding: 0 14px 10px; background: #fff; font-size: 11.5px; color: var(--walnut); }
.su-chat-note a { color: var(--walnut); }
