/* The Spectra Studio assistant: a "Questions?" button and a chat panel, in the site's quiet glass style. */
.sa-launch { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px 11px 13px;
  border: 1px solid var(--edge-hi); border-radius: 999px; background: rgba(30, 30, 34, .82); color: var(--text); font: 600 14px/1 var(--font);
  cursor: pointer; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.sa-launch:hover { border-color: var(--edge-strong); background: rgba(38, 38, 43, .9); }
.sa-launch:focus-visible, .sa-panel :focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sa-launch-icon { width: 18px; height: 18px; border: 1.6px solid currentColor; border-radius: 9px 9px 9px 3px; }
.sa-launch[hidden] { display: none; }

.sa-panel { position: fixed; right: 20px; bottom: 20px; z-index: 41; width: 380px; height: min(560px, calc(100vh - 40px)); display: flex; flex-direction: column;
  border: 1px solid var(--edge-hi); border-radius: 16px; background: rgba(22, 22, 25, .94); color: var(--text); font: 14px/1.5 var(--font);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 18px 60px rgba(0, 0, 0, .5); overflow: hidden; }
.sa-panel[hidden] { display: none; }
.sa-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--edge); }
.sa-head img { border-radius: 7px; flex: none; }
.sa-title { flex: 1; font-weight: 600; font-size: 15px; }
.sa-ghost, .sa-close { border: 0; background: none; color: var(--text-2); font: 13px/1 var(--font); cursor: pointer; padding: 7px 8px; border-radius: 8px; }
.sa-close { font-size: 20px; line-height: 1; padding: 4px 9px 6px; }
.sa-ghost:hover, .sa-close:hover { color: var(--text); background: var(--glass); }

.sa-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.sa-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.sa-msg p { margin: 0 0 6px; }
.sa-bot > p:first-child { white-space: pre-line; }
.sa-msg p:last-child { margin-bottom: 0; }
.sa-bot { align-self: flex-start; background: var(--card-hi); border: 1px solid var(--edge); border-bottom-left-radius: 4px; }
.sa-you { align-self: flex-end; background: var(--text); color: var(--page); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.sa-link { color: var(--text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--edge-strong); }
.sa-link:hover { text-decoration-color: var(--text); }
.sa-src, .sa-related p, .sa-thanks, .sa-rate span { color: var(--text-3); font-size: 12.5px; }
.sa-related { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.sa-related .sa-link { font-size: 13px; }
.sa-rate { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.sa-rate span { margin-right: 4px; }
.sa-rate button { border: 1px solid var(--edge); background: none; border-radius: 8px; padding: 2px 7px; cursor: pointer; font-size: 13px; }
.sa-rate button:hover { border-color: var(--edge-strong); }
.sa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sa-chip { border: 1px solid var(--edge-hi); background: var(--glass); color: var(--text); border-radius: 999px; padding: 6px 11px; font: 13px/1.2 var(--font); cursor: pointer; text-align: left; }
.sa-chip:hover { border-color: var(--edge-strong); background: rgba(255, 255, 255, .08); }

.sa-typing { display: flex; gap: 4px; padding: 13px 14px; }
.sa-typing span { width: 6px; height: 6px; border-radius: 3px; background: var(--text-3); animation: sa-dot 1s infinite ease-in-out; }
.sa-typing span:nth-child(2) { animation-delay: .15s; }
.sa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sa-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sa-typing span { animation: none; opacity: .6; } }

.sa-ask { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--edge); }
.sa-input { scrollbar-width: none; }
.sa-input::-webkit-scrollbar { display: none; }
.sa-input, .sa-form input, .sa-form textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--edge-hi); border-radius: 10px; background: rgba(255, 255, 255, .04);
  color: var(--text); font: 14px/1.4 var(--font); padding: 9px 11px; }
.sa-input::placeholder, .sa-form ::placeholder { color: var(--text-3); }
.sa-send { flex: none; border: 0; border-radius: 10px; background: var(--text); color: var(--page); font: 600 14px/1 var(--font); padding: 10px 14px; cursor: pointer; }
.sa-send:disabled { opacity: .6; cursor: default; }

.sa-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sa-form label { display: flex; flex-direction: column; gap: 4px; color: var(--text-3); font-size: 12.5px; }
.sa-form .sa-send { align-self: flex-start; }
.sa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sa-err { color: var(--error); font-size: 13px; margin: 0; }
.sa-err:empty { display: none; }

@media (max-width: 600px) {
  .sa-launch { right: 14px; bottom: 14px; padding: 13px; }
  .sa-launch-text { display: none; }
  .sa-panel { inset: 0; right: 0; bottom: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  html.sa-open, html.sa-open body { overflow: hidden; }
}
.sa-cta-row { margin-top: 10px !important; }
.sa-cta { display: inline-block; border-radius: 10px; background: var(--text); color: var(--page); font: 600 13.5px/1 var(--font); padding: 9px 13px; text-decoration: none; }
.sa-cta:hover { background: #fff; }
