/* Website assistant (assistant.js): launcher and chat panel, in the site's own
   design (Plus Jakarta Sans, navy, teal, warm page). */
.sb-chat, .sb-panel { font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }

/* ── launcher ── */
.sb-chat { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 22px 10px 10px; border: 0; border-radius: 999px; background: #0c1f2e; color: #fff; cursor: pointer; text-align: left;
  box-shadow: 0 16px 36px -14px #0f2238b3, 0 2px 8px #0f223829; transition: transform .15s, box-shadow .15s; }
.sb-chat[hidden] { display: none; }
.sb-chat:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px #0f2238cc, 0 2px 8px #0f223829; }
.sb-chat:focus-visible { outline: 3px solid #f0cf74; outline-offset: 3px; }
.sb-chat-ic { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #116770; }
.sb-chat-ic svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.sb-dot, .sb-live { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #34d399; }
.sb-dot { top: 1px; right: 1px; border: 2px solid #0c1f2e; }
.sb-dot::after, .sb-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34d399; animation: sb-pulse 2s ease-out infinite; }
@keyframes sb-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
.sb-chat-txt { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.sb-chat-txt b { font-size: 15px; font-weight: 700; }
.sb-chat-txt small { font-size: 13px; font-weight: 500; color: #c3d0d9; }

/* ── panel ── */
.sb-panel { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 400px; height: min(640px, calc(100vh - 48px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: #fdfcf8; color: #2b3340;
  box-shadow: 0 30px 60px -20px #0f2238a6, 0 4px 14px #0f22382e; border: 1px solid #0f22381a;
  opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right; transition: opacity .18s, transform .18s; }
.sb-panel.is-open { opacity: 1; transform: none; }
.sb-panel[hidden] { display: none; }

.sb-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; background: #0c1f2e; color: #fff; }
.sb-logo { width: 40px; height: 40px; border-radius: 11px; flex: none; }
.sb-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sb-titles b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.sb-status { position: relative; padding-left: 16px; font-size: 13px; color: #c3d0d9; }
.sb-live { left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; }
.sb-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #c3d0d9; cursor: pointer; display: grid; place-items: center; }
.sb-close:hover { background: #ffffff14; color: #fff; }
.sb-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.sb-log { flex: 1; overflow-y: auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.sb-msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.sb-agent { align-self: flex-start; background: #fff; color: #0f2238; border: 1px solid #e7e2d6; border-bottom-left-radius: 6px; }
.sb-user { align-self: flex-end; background: #116770; color: #fff; border-bottom-right-radius: 6px; }
.sb-msg a { color: #116770; font-weight: 600; text-underline-offset: 3px; }
.sb-user a { color: #fff; }
.sb-system { align-self: center; margin: 4px 0; font-size: 13px; color: #5d6672; text-align: center; }
.sb-typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.sb-typing span { width: 7px; height: 7px; border-radius: 50%; background: #93a1ad; animation: sb-bounce 1.2s infinite ease-in-out; }
.sb-typing span:nth-child(2) { animation-delay: .15s; }
.sb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sb-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.sb-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; }
.sb-quick[hidden] { display: none; }
.sb-chip { border: 1px solid #116770; background: #fff; color: #116770; border-radius: 999px; padding: 8px 13px; font: 600 13.5px/1.2 inherit;
  font-family: inherit; cursor: pointer; transition: background-color .15s, color .15s; }
.sb-chip:hover { background: #116770; color: #fff; }
.sb-again { align-self: center; }

.sb-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 8px 8px 8px 14px; border: 1px solid #d9d3c5; border-radius: 14px; background: #fff; }
.sb-form:focus-within { border-color: #116770; box-shadow: 0 0 0 3px #1167701f; }
.sb-input { flex: 1; min-height: 24px; max-height: 120px; resize: none; border: 0; outline: 0; padding: 6px 0; background: transparent;
  font: 400 15px/1.5 inherit; font-family: inherit; color: #0f2238; }
.sb-input::placeholder { color: #8a929c; }
.sb-send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 11px; background: #116770; color: #fff; cursor: pointer; display: grid; place-items: center; }
.sb-send:hover { background: #0c4f56; }
.sb-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sb-note { margin: 0; padding: 8px 16px 12px; font-size: 12px; color: #5d6672; text-align: center; }
.sb-note a { color: inherit; }
.sb-panel button:focus-visible, .sb-panel a:focus-visible { outline: 3px solid #f0cf74; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .sb-dot::after, .sb-live::after, .sb-typing span { animation: none; }
  .sb-chat, .sb-chat:hover, .sb-panel { transition: none; transform: none; }
}
@media (max-width: 560px) {
  .sb-chat { right: 14px; bottom: 14px; padding: 8px 16px 8px 8px; gap: 10px; }
  .sb-chat-ic { width: 40px; height: 40px; }
  .sb-chat-txt b { font-size: 14px; }
  .sb-chat-txt small { font-size: 12px; }
  .sb-panel { right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
}
@media print { .sb-chat, .sb-panel { display: none; } }
