/*
 * The OceanLaunch Assistant: a launcher button and a chat panel, used by the portal and the public site
 * (which loads this file from the portal). Everything is prefixed "ola-" so it can't clash with either page.
 */
.ola {
  --ola-blue: #2f6df6; --ola-cyan: #19b4e5; --ola-navy: #0a1834; --ola-ink: #0f172a; --ola-text: #334155;
  --ola-muted: #64748b; --ola-line: #e2e8f0; --ola-bg: #ffffff; --ola-soft: #f5f8fe; --ola-bubble: #f1f5fb;
  --ola-ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.55; color: var(--ola-text);
}
@media (prefers-color-scheme: dark) {
  .ola { --ola-ink: #f1f5f9; --ola-text: #cbd5e1; --ola-muted: #94a3b8; --ola-line: #1e293b; --ola-bg: #0b1222; --ola-soft: #0f1a30; --ola-bubble: #13213d; }
}
[data-bs-theme="dark"] .ola { --ola-ink: #f1f5f9; --ola-text: #cbd5e1; --ola-muted: #94a3b8; --ola-line: #1e293b; --ola-bg: #0b1222; --ola-soft: #0f1a30; --ola-bubble: #13213d; }
.ola *, .ola *::before, .ola *::after { box-sizing: border-box; }

/* Launcher */
.ola-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483000; width: 62px; height: 62px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 30% 25%, #6aa8ff, var(--ola-blue) 55%, #1d4fd8);
  box-shadow: 0 18px 40px -14px rgba(47, 109, 246, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .25s var(--ola-ease), box-shadow .25s;
  animation: ola-in .6s var(--ola-ease) both;
}
.ola-launcher:hover { transform: translateY(-3px) scale(1.04); }
.ola-launcher:focus-visible { outline: 3px solid rgba(47, 109, 246, .45); outline-offset: 4px; }
.ola-launcher::before, .ola-launcher::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(90, 163, 255, .6);
  animation: ola-ping 3.2s cubic-bezier(.2, .8, .2, 1) infinite; pointer-events: none;
}
.ola-launcher::after { animation-delay: 1.6s; }
.ola-launcher svg { width: 28px; height: 28px; transition: transform .35s var(--ola-ease), opacity .2s; }
.ola-launcher .ola-x { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.6); }
.ola.is-open .ola-launcher .ola-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.ola.is-open .ola-launcher .ola-x { opacity: 1; transform: none; }
.ola.is-open .ola-launcher::before, .ola.is-open .ola-launcher::after { animation: none; opacity: 0; }
.ola-tip {
  position: fixed; right: 94px; bottom: 36px; z-index: 2147483000; padding: 8px 14px; border-radius: 12px; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: #fff; background: var(--ola-navy); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  animation: ola-tip 6s ease 1.2s both; pointer-events: none;
}
.ola.is-open .ola-tip, .ola.seen .ola-tip { display: none; }

/* Panel */
.ola-panel {
  position: fixed; right: 22px; bottom: 98px; z-index: 2147483000; width: 400px; height: min(640px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; margin: 0; padding: 0;
  background: var(--ola-bg); border: 1px solid var(--ola-line);
  box-shadow: 0 40px 90px -30px rgba(10, 24, 52, .65), 0 0 0 1px rgba(255, 255, 255, .04);
  transform-origin: bottom right; opacity: 0; transform: translateY(16px) scale(.94); pointer-events: none; visibility: hidden;
  transition: opacity .28s var(--ola-ease), transform .32s var(--ola-ease), visibility 0s linear .32s;
}
.ola.is-open .ola-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }

.ola-head {
  position: relative; overflow: hidden; isolation: isolate; flex: none; display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 30px; color: #c9d5ee;
  background: radial-gradient(120% 140% at 0% 0%, #1b3b8f 0%, transparent 55%), linear-gradient(120deg, var(--ola-navy), #13306b);
}
.ola-head::before { content: ""; position: absolute; z-index: -1; width: 180px; height: 180px; right: -50px; top: -90px; border-radius: 50%;
  background: var(--ola-cyan); opacity: .45; filter: blur(50px); animation: ola-orb 12s ease-in-out infinite; }
.ola-sea { position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; overflow: hidden; z-index: -1; }
.ola-sea svg { position: absolute; left: 0; bottom: 0; width: 1600px; max-width: none; height: 100%; animation: ola-drift 14s linear infinite; }
.ola-sea .w1 { fill: var(--ola-bg); }
.ola-sea .w2 { fill: var(--ola-cyan); opacity: .35; animation-duration: 22s; animation-direction: reverse; height: 130%; }
.ola-orb { position: relative; flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--ola-blue), var(--ola-cyan)); box-shadow: 0 10px 24px -10px rgba(25, 180, 229, .9); }
.ola-orb svg { width: 22px; height: 22px; }
.ola-title { flex: 1; min-width: 0; }
.ola-title b { display: block; color: #fff; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.ola-title span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.ola-title span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: ola-live 2s infinite; }
.ola-icon-btn { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16); display: grid; place-items: center;
  color: #dbe6ff; background: rgba(255, 255, 255, .06); cursor: pointer; transition: background-color .2s; }
.ola-icon-btn:hover { background: rgba(255, 255, 255, .14); }
.ola-icon-btn svg { width: 16px; height: 16px; }

.ola-log { flex: 1; overflow-y: auto; padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; scrollbar-width: thin; }
.ola-msg { display: flex; gap: 10px; align-items: flex-end; animation: ola-up .35s var(--ola-ease) both; }
.ola-msg.user { justify-content: flex-end; }
.ola-avatar { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--ola-blue), var(--ola-cyan)); }
.ola-avatar svg { width: 15px; height: 15px; }
.ola-bubble { max-width: 84%; padding: 10px 14px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; }
.ola-msg.bot .ola-bubble { color: var(--ola-text); background: var(--ola-bubble); border-bottom-left-radius: 6px; }
.ola-msg.user .ola-bubble { color: #fff; background: linear-gradient(135deg, var(--ola-blue), #1f58e0); border-bottom-right-radius: 6px;
  box-shadow: 0 10px 22px -14px rgba(47, 109, 246, .9); white-space: pre-wrap; }
.ola-msg.error .ola-bubble { color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; }
.ola-bubble p { margin: 0 0 8px; } .ola-bubble p:last-child { margin-bottom: 0; }
.ola-bubble ul, .ola-bubble ol { margin: 4px 0 8px; padding-left: 20px; } .ola-bubble li + li { margin-top: 3px; }
.ola-bubble strong { color: var(--ola-ink); font-weight: 800; }
.ola-msg.user .ola-bubble strong { color: #fff; }
.ola-bubble code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; padding: 1px 6px; border-radius: 6px;
  background: rgba(47, 109, 246, .1); color: var(--ola-ink); }
.ola-bubble a { color: var(--ola-blue); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(47, 109, 246, .35); }
.ola-bubble a:hover { border-bottom-color: currentColor; }
.ola-caret { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--ola-blue); animation: ola-blink 1s step-end infinite; }

.ola-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.ola-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ola-blue); opacity: .5; animation: ola-bounce 1.2s ease-in-out infinite; }
.ola-typing i:nth-child(2) { animation-delay: .15s; } .ola-typing i:nth-child(3) { animation-delay: .3s; }
.ola-status { align-self: flex-start; margin-left: 38px; font-size: 12.5px; font-weight: 700; color: var(--ola-muted); position: relative; overflow: hidden;
  padding: 4px 10px; border-radius: 999px; background: var(--ola-soft); border: 1px solid var(--ola-line); }
.ola-status::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(47, 109, 246, .18), transparent); animation: ola-shimmer 1.4s infinite; }

.ola-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px 38px; }
.ola-chip { border: 1px solid var(--ola-line); background: var(--ola-bg); color: var(--ola-ink); border-radius: 999px; padding: 7px 12px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s, transform .2s var(--ola-ease), background-color .2s;
  animation: ola-up .4s var(--ola-ease) both; }
.ola-chip:nth-child(2) { animation-delay: .06s; } .ola-chip:nth-child(3) { animation-delay: .12s; } .ola-chip:nth-child(4) { animation-delay: .18s; }
.ola-chip:hover { border-color: var(--ola-blue); background: rgba(47, 109, 246, .06); transform: translateY(-1px); }

.ola-form { flex: none; padding: 10px 12px 8px; border-top: 1px solid var(--ola-line); background: var(--ola-bg); }
.ola-field { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px; border: 1.5px solid var(--ola-line);
  background: var(--ola-soft); transition: border-color .2s, box-shadow .2s; }
.ola-field:focus-within { border-color: var(--ola-blue); box-shadow: 0 0 0 4px rgba(47, 109, 246, .14); }
.ola-field textarea { flex: 1; min-height: 24px; max-height: 120px; padding: 6px 0; border: 0; outline: none; resize: none; background: transparent;
  color: var(--ola-ink); font: inherit; font-size: 15px; }
.ola-field textarea::placeholder { color: var(--ola-muted); }
.ola-send { flex: none; width: 38px; height: 38px; border: 0; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--ola-blue), var(--ola-cyan)); box-shadow: 0 8px 18px -10px rgba(47, 109, 246, .9);
  transition: transform .2s var(--ola-ease), opacity .2s; }
.ola-send:hover { transform: translateY(-1px); }
.ola-send:disabled { opacity: .45; cursor: default; transform: none; }
.ola-send svg { width: 18px; height: 18px; }
.ola-fine { margin: 6px 4px 0; font-size: 11.5px; color: var(--ola-muted); text-align: center; }
.ola-fine a { color: inherit; font-weight: 700; }

.ola-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 520px) {
  .ola-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .ola.is-open .ola-launcher { display: none; }
  .ola-tip { display: none; }
}

@keyframes ola-in { from { opacity: 0; transform: translateY(14px) scale(.8); } }
@keyframes ola-ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes ola-tip { 0% { opacity: 0; transform: translateX(8px); } 8%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes ola-orb { 50% { transform: translate(-30px, 20px); } }
@keyframes ola-drift { to { transform: translateX(-800px); } }
@keyframes ola-live { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@keyframes ola-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes ola-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes ola-shimmer { to { transform: translateX(100%); } }
@keyframes ola-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ola *, .ola *::before, .ola *::after { animation: none !important; transition: none !important; }
}
