/*
 * SmarTuna assistant - the site-wide chat widget.
 *
 * A launcher pill in the bottom-right corner and a panel that opens above it.
 * Markup is built by assets/js/assistant.js; this file only styles it. Colours
 * and type follow the site: navy #060f32, accent #00b6ff on light / #00d9ff on
 * dark, Manrope for the title, Inter for everything else, 4-8px radii.
 */

.st-assist { position: fixed; right: 24px; bottom: 24px; z-index: 9000; font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
.st-assist *, .st-assist *::before, .st-assist *::after { box-sizing: border-box; }

/* launcher */
.st-assist__launch {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 20px 0 16px;
  font: 700 12.5px/1 'Inter', sans-serif; letter-spacing: 0.1em; text-transform: uppercase;
  color: #ffffff; background: #060f32; border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(6, 15, 50, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.st-assist__launch svg { width: 18px; height: 18px; fill: #00d9ff; flex: none; }
.st-assist__launch:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(6, 15, 50, 0.34); }
.st-assist__launch:focus-visible { outline: 3px solid #00b6ff; outline-offset: 3px; }
.st-assist--open .st-assist__launch { display: none; }

/* panel */
.st-assist__panel {
  display: none; flex-direction: column;
  width: 400px; max-width: calc(100vw - 48px);
  height: 640px; max-height: calc(100vh - 48px);
  background: #ffffff; border: 1px solid #e5e5e5; border-radius: 8px;
  box-shadow: 0 24px 64px rgba(6, 15, 50, 0.28);
  overflow: hidden;
  transform-origin: bottom right;
}
.st-assist--open .st-assist__panel { display: flex; animation: st-assist-in 220ms cubic-bezier(.22,.61,.36,1) both; }
@keyframes st-assist-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.st-assist__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 18px; background: #060f32; color: #ffffff; }
.st-assist__bar strong { display: block; font-family: var(--st-head, 'Manrope'), sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: #ffffff; }
.st-assist__bar span { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.7); margin-top: 3px; }
.st-assist__tools { display: flex; align-items: center; gap: 4px; }
.st-assist__tools button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 10px; font: 600 11px/1 'Inter', sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85); background: transparent; border: 0; border-radius: 4px; cursor: pointer;
}
.st-assist__tools button:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.st-assist__tools button:focus-visible { outline: 2px solid #00d9ff; outline-offset: 1px; }
.st-assist__close { width: 34px; padding: 0 !important; }
.st-assist__close svg { width: 14px; height: 14px; fill: currentColor; }

.st-assist__log { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; overflow-y: auto; scroll-behavior: smooth; background: #ffffff; }
.st-msg { max-width: 86%; padding: 11px 14px; border-radius: 8px; font-size: 14.5px; line-height: 1.6; color: #454e5c; text-wrap: pretty; overflow-wrap: anywhere; }
.st-msg--user { align-self: flex-end; background: #060f32; color: #ffffff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.st-msg--bot { align-self: flex-start; background: #fbfbfb; border: 1px solid #e5e5e5; border-bottom-left-radius: 4px; }
.st-msg--error { align-self: flex-start; background: #fff4f4; border: 1px solid #f1c7c7; color: #8a2424; }
.st-msg p { margin: 0 0 9px; } .st-msg p:last-child { margin-bottom: 0; }
.st-msg ul, .st-msg ol { margin: 6px 0 9px; padding-left: 20px; } .st-msg li { margin: 3px 0; }
.st-msg strong { color: #111111; font-weight: 700; }
.st-msg a { color: #00b6ff; font-weight: 700; text-decoration: none; } .st-msg a:hover { text-decoration: underline; }
.st-msg h3 { font-family: var(--st-head, 'Manrope'), sans-serif; font-size: 15px; line-height: 1.3; margin: 10px 0 5px; color: #111111; font-weight: 800; }
.st-typing { display: inline-flex; gap: 5px; align-items: center; height: 20px; }
.st-typing i { width: 7px; height: 7px; border-radius: 50%; background: #00b6ff; animation: st-assist-blink 1.2s infinite; }
.st-typing i:nth-child(2) { animation-delay: .2s; } .st-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes st-assist-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.st-assist__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.st-chip { font: 500 12.5px/1.25 'Inter', sans-serif; color: #060f32; background: #ffffff; border: 1px solid #e5e5e5; border-radius: 4px; padding: 7px 10px; cursor: pointer; text-align: left; }
.st-chip:hover { border-color: #00b6ff; color: #00b6ff; }

.st-assist__form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 12px 12px 16px; border-top: 1px solid #e5e5e5; background: #ffffff; }
.st-assist__input { flex: 1; resize: none; overflow-y: hidden; min-height: 42px; max-height: 140px; padding: 10px 12px; font: 400 14.5px/1.5 'Inter', sans-serif; color: #111111; background: #ffffff; border: 1px solid #e5e5e5; border-radius: 4px; outline: none; }
.st-assist__input:focus { border-color: #00b6ff; box-shadow: 0 0 0 3px rgba(0, 182, 255, 0.18); }
.st-assist__send { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; color: #ffffff; background: #00abff; border: 0; border-radius: 4px; cursor: pointer; }
.st-assist__send svg { width: 16px; height: 16px; fill: currentColor; }
.st-assist__send:hover { background: #00b6ff; } .st-assist__send:disabled { opacity: .55; cursor: default; }
.st-assist__send:focus-visible { outline: 2px solid #060f32; outline-offset: 2px; }
.st-assist__note { margin: 0; padding: 0 16px 10px; font-size: 11.5px; line-height: 1.5; color: #7a8493; text-align: center; background: #ffffff; }

.st-assist .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phones: icon-only launcher, full-screen sheet */
@media (max-width: 640px) {
  .st-assist { right: 16px; bottom: 16px; }
  .st-assist__launch { width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
  .st-assist__launch span { display: none; }
  .st-assist__launch svg { width: 22px; height: 22px; }
  .st-assist--open { right: 0; bottom: 0; left: 0; top: 0; }
  .st-assist__panel { width: 100vw; max-width: none; height: 100%; max-height: none; border: 0; border-radius: 0; }
  .st-msg { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  .st-assist__launch, .st-assist__panel { transition: none; animation: none; }
  .st-typing i { animation: none; opacity: .7; }
}

/* the print sheet has no use for it */
@media print { .st-assist { display: none; } }
