/* INFIVO Infi AI assistant v3 */
:root {
  --infi-navy: #071b45;
  --infi-navy-2: #0b2d62;
  --infi-blue: #2f80ff;
  --infi-mint: #14c7a3;
  --infi-ink: #0a1d3d;
  --infi-muted: #64748b;
  --infi-line: #d8e4f2;
  --infi-surface: #ffffff;
}

#infi-ai-root { position: fixed; right: 24px; bottom: 22px; z-index: 2147482100; font-family: inherit; }
#infi-ai-root *, #infi-ai-root *::before, #infi-ai-root *::after { box-sizing: border-box; }

.infi-launcher {
  appearance: none; border: 0; position: relative; width: 92px; height: 92px; padding: 0;
  border-radius: 30px; cursor: pointer; background: linear-gradient(145deg, #071b45, #0a3970 62%, #0a6675);
  box-shadow: 0 18px 45px rgba(7,27,69,.28), 0 4px 12px rgba(47,128,255,.2);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease;
}
.infi-launcher:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 24px 52px rgba(7,27,69,.35), 0 0 0 5px rgba(20,199,163,.12); }
.infi-launcher:active { transform: translateY(-1px) scale(.96); }
.infi-launcher img { position: absolute; width: 112px; height: 112px; object-fit: contain; left: -10px; bottom: -3px; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
.infi-launcher-label { position: absolute; right: 82px; bottom: 20px; white-space: nowrap; padding: 11px 15px; border-radius: 15px 15px 4px 15px; background: #fff; color: var(--infi-ink); font-size: 13px; font-weight: 800; box-shadow: 0 12px 30px rgba(7,27,69,.18); border: 1px solid var(--infi-line); }
.infi-online { position: absolute; right: 7px; top: 7px; width: 14px; height: 14px; background: var(--infi-mint); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 4px rgba(20,199,163,.15); }
.infi-launcher-hide {
  position: absolute; z-index: 4; right: -8px; top: -9px; width: 30px; height: 30px; padding: 0;
  border: 2px solid #fff; border-radius: 50%; color: #fff; background: #0b2d62;
  box-shadow: 0 6px 16px rgba(7,27,69,.3); cursor: pointer; font: 900 18px/25px sans-serif;
  transition: transform .2s ease, background .2s ease;
}
.infi-launcher-hide:hover { transform: scale(1.08); background: #1768e8; }

.infi-panel {
  display: none; position: absolute; right: 0; bottom: 108px; width: min(410px, calc(100vw - 32px)); height: min(650px, calc(100vh - 150px));
  overflow: hidden; border: 1px solid rgba(139,168,202,.45); border-radius: 28px; background: rgba(255,255,255,.98);
  box-shadow: 0 28px 80px rgba(7,27,69,.34); transform-origin: right bottom;
}
.infi-panel.is-open { display: flex; flex-direction: column; animation: infi-open .28s cubic-bezier(.18,.86,.28,1); }
@keyframes infi-open { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }

.infi-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 17px; color: #fff; background: linear-gradient(120deg, #071b45 0%, #0b2d62 55%, #08717b 100%); overflow: hidden; }
.infi-head::after { content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; right: -75px; top: -105px; }
.infi-avatar { position: relative; z-index: 1; width: 58px; height: 58px; flex: 0 0 58px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); overflow: hidden; }
.infi-avatar img { width: 72px; height: 72px; object-fit: contain; margin: -5px 0 0 -7px; }
.infi-title { position: relative; z-index: 1; min-width: 0; flex: 1; }
.infi-title strong { display: block; font-size: 17px; line-height: 1.2; }
.infi-title span { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: #cfe5f4; font-size: 12px; }
.infi-title span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--infi-mint); box-shadow: 0 0 0 4px rgba(20,199,163,.18); }
.infi-head-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; }
.infi-hide, .infi-close { position: relative; z-index: 1; height: 39px; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.09); color: #fff; cursor: pointer; }
.infi-hide { width: 39px; padding: 0; font: 900 17px/1 sans-serif; }
.infi-close { width: 39px; font: 700 24px/1 sans-serif; }
.infi-close:hover, .infi-hide:hover { background: rgba(255,255,255,.18); }

.infi-peek {
  display: none; position: fixed; right: max(4px, env(safe-area-inset-right)); bottom: max(4px, env(safe-area-inset-bottom));
  width: 50px; height: 50px; padding: 0; overflow: hidden; border: 2px solid rgba(255,255,255,.92);
  border-radius: 17px; background: linear-gradient(160deg,#071b45,#0a6675); box-shadow: 0 8px 24px rgba(7,27,69,.28); cursor: pointer;
}
.infi-peek img { width: 62px; height: 62px; object-fit: contain; margin: -4px 0 0 -7px; transition: transform .2s ease; }
.infi-peek:hover img { transform: scale(1.05); }
#infi-ai-root.is-hidden .infi-launcher, #infi-ai-root.is-hidden .infi-launcher-hide, #infi-ai-root.is-hidden .infi-panel { display: none !important; }
#infi-ai-root.is-hidden .infi-peek { display: block; }

.infi-context { padding: 10px 16px; color: #315071; background: #eef6ff; border-bottom: 1px solid #dce9f6; font-size: 11px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.infi-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 17px; scroll-behavior: smooth; background: linear-gradient(180deg, #f8fbff 0%, #fff 28%); }
.infi-message { display: flex; margin: 0 0 13px; }
.infi-message.user { justify-content: flex-end; }
.infi-bubble { max-width: 86%; padding: 11px 13px; border-radius: 17px; color: var(--infi-ink); background: #fff; border: 1px solid var(--infi-line); box-shadow: 0 5px 16px rgba(7,27,69,.06); font-size: 13px; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.infi-message.bot .infi-bubble { border-radius: 5px 17px 17px; }
.infi-message.user .infi-bubble { color: #fff; border: 0; border-radius: 17px 5px 17px 17px; background: linear-gradient(135deg, #1768e8, #2f80ff); }
.infi-typing { display: inline-flex; gap: 4px; padding: 13px 15px; }
.infi-typing i { width: 6px; height: 6px; border-radius: 50%; background: #6e8baa; animation: infi-dot 1s infinite ease-in-out; }
.infi-typing i:nth-child(2) { animation-delay: .14s; }.infi-typing i:nth-child(3) { animation-delay: .28s; }
@keyframes infi-dot { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

.infi-quick { display: flex; gap: 7px; padding: 0 16px 10px; overflow-x: auto; background: #fff; scrollbar-width: none; }
.infi-quick::-webkit-scrollbar { display: none; }
.infi-chip { flex: 0 0 auto; appearance: none; padding: 8px 11px; border: 1px solid #cfe0f2; border-radius: 999px; background: #f7fbff; color: #17436f; font: 750 11px/1.2 inherit; cursor: pointer; transition: .2s ease; }
.infi-chip:hover { color: #fff; border-color: var(--infi-blue); background: var(--infi-blue); transform: translateY(-1px); }
.infi-compose { display: flex; align-items: flex-end; gap: 9px; padding: 12px 13px 14px; background: #fff; border-top: 1px solid #e4edf7; }
.infi-input { flex: 1; min-height: 44px; max-height: 112px; resize: none; padding: 11px 13px; color: var(--infi-ink); background: #f5f8fc; border: 1px solid #d8e4f2; border-radius: 15px; outline: none; font: 500 13px/1.4 inherit; }
.infi-input:focus { background: #fff; border-color: var(--infi-blue); box-shadow: 0 0 0 4px rgba(47,128,255,.1); }
.infi-send { width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--infi-blue), #1463db); box-shadow: 0 8px 18px rgba(47,128,255,.25); cursor: pointer; font: 800 18px/1 inherit; }
.infi-send:disabled { opacity: .5; cursor: wait; }
.infi-note { padding: 0 14px 10px; text-align: center; color: #8798aa; background: #fff; font-size: 9px; }

@media (max-width: 700px) {
  #infi-ai-root { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .infi-launcher { width: 72px; height: 72px; border-radius: 23px; }
  .infi-launcher img { width: 90px; height: 90px; left: -9px; }
  .infi-launcher-label { display: none; }
  .infi-launcher-hide { width: 28px; height: 28px; right: -7px; top: -8px; font-size: 17px; line-height: 23px; }
  .infi-panel {
    position: fixed; left: 8px; right: 8px; top: auto;
    bottom: max(8px, env(safe-area-inset-bottom)); width: auto;
    height: min(76dvh, 620px, calc(var(--infi-viewport-height, 100dvh) - 16px));
    max-height: calc(var(--infi-viewport-height, 100dvh) - 16px); border-radius: 22px;
  }
  .infi-panel.is-open ~ .infi-launcher, .infi-panel.is-open ~ .infi-launcher-hide { display: none; }
  .infi-head { gap: 9px; min-height: 66px; padding: 9px 10px; }
  .infi-avatar { width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px; }
  .infi-avatar img { width: 56px; height: 56px; margin: -4px 0 0 -6px; }
  .infi-title strong { font-size: 16px; }
  .infi-title span { margin-top: 2px; font-size: 10px; }
  .infi-head-actions { gap: 5px; }
  .infi-hide, .infi-close { width: 36px; height: 36px; border-radius: 12px; }
  .infi-context { padding: 7px 12px; font-size: 10px; }
  .infi-messages { padding: 12px; }
  .infi-bubble { max-width: 91%; padding: 9px 11px; font-size: 12px; line-height: 1.42; }
  .infi-quick { padding: 0 10px 7px; }
  .infi-chip { padding: 7px 9px; font-size: 10px; }
  .infi-compose { gap: 7px; padding: 8px 9px 9px; }
  .infi-input { min-height: 42px; max-height: 82px; padding: 10px 11px; font-size: 12px; }
  .infi-send { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px; }
  .infi-note { display: none; }
  .infi-peek { right: max(3px, env(safe-area-inset-right)); bottom: max(3px, env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 15px; }
  .infi-peek img { width: 57px; height: 57px; }
}

@media (max-width: 700px) and (max-height: 620px) {
  .infi-panel { height: min(90dvh, calc(var(--infi-viewport-height, 100dvh) - 10px)); max-height: calc(var(--infi-viewport-height, 100dvh) - 10px); bottom: 5px; }
  .infi-quick { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .infi-panel.is-open, .infi-launcher, .infi-launcher-hide, .infi-typing i { animation: none; transition: none; }
}
/* INFIVO Infi responsive UI hardening v4 */
#infi-ai-root{max-width:none!important}
#infi-ai-root .infi-panel{width:min(410px,calc(100vw - 48px))!important;max-width:calc(100vw - 48px)!important;height:min(650px,calc(100dvh - 150px))!important;max-height:calc(100dvh - 150px)!important}
#infi-ai-root .infi-panel.is-open{display:flex!important;flex-direction:column!important}
#infi-ai-root .infi-head,#infi-ai-root .infi-context,#infi-ai-root .infi-quick,#infi-ai-root .infi-compose,#infi-ai-root .infi-note{flex:0 0 auto!important}
#infi-ai-root .infi-head,#infi-ai-root .infi-title{min-width:0!important}
#infi-ai-root .infi-head-actions{flex:0 0 auto!important}
#infi-ai-root .infi-hide,#infi-ai-root .infi-close{display:inline-grid!important;place-items:center!important;flex:0 0 39px!important;width:39px!important;min-width:39px!important;max-width:39px!important;height:39px!important;min-height:39px!important;max-height:39px!important;margin:0!important;padding:0!important;line-height:1!important}
#infi-ai-root .infi-messages{flex:1 1 auto!important;min-width:0!important;min-height:0!important;overflow-x:hidden!important;overflow-y:auto!important}
#infi-ai-root .infi-quick{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%!important;min-width:0!important;overflow:visible!important;padding:0 16px 10px!important}
#infi-ai-root .infi-chip{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:38px!important;height:auto!important;margin:0!important;padding:8px 9px!important;white-space:normal!important;overflow:hidden!important;overflow-wrap:anywhere!important;word-break:normal!important;text-align:center!important;font:750 11px/1.25 inherit!important}
#infi-ai-root .infi-chip:nth-child(3){grid-column:1/-1!important}
#infi-ai-root .infi-compose{width:100%!important;min-width:0!important}
#infi-ai-root .infi-input{width:auto!important;min-width:0!important}
#infi-ai-root .infi-send{display:inline-grid!important;place-items:center!important;margin:0!important;padding:0!important}
#infi-ai-root .infi-launcher-hide{display:grid!important;place-items:center!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;margin:0!important;padding:0!important;color:#0b2d62!important;background:#fff!important;border:3px solid #dbe8f5!important;box-shadow:0 8px 22px rgba(7,27,69,.34)!important;font:900 20px/1 sans-serif!important}
#infi-ai-root .infi-launcher-hide:hover{color:#fff!important;background:#14a987!important;border-color:#fff!important}
#infi-ai-root .infi-panel.is-open~.infi-launcher,#infi-ai-root .infi-panel.is-open~.infi-launcher-hide{display:none!important}
@media(max-width:700px){
#infi-ai-root{right:max(8px,env(safe-area-inset-right))!important;bottom:max(8px,env(safe-area-inset-bottom))!important}
#infi-ai-root .infi-panel{position:fixed!important;left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;height:min(68dvh,540px,calc(var(--infi-viewport-height,100dvh) - 20px))!important;max-height:calc(var(--infi-viewport-height,100dvh) - 20px)!important;border-radius:20px!important}
#infi-ai-root .infi-head{min-height:64px!important;gap:8px!important;padding:9px 10px!important}
#infi-ai-root .infi-avatar{width:44px!important;height:44px!important;flex:0 0 44px!important}
#infi-ai-root .infi-title strong{font-size:16px!important}
#infi-ai-root .infi-title span{font-size:10px!important;white-space:nowrap!important}
#infi-ai-root .infi-head-actions{gap:5px!important}
#infi-ai-root .infi-hide,#infi-ai-root .infi-close{flex-basis:42px!important;width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;min-height:42px!important;max-height:42px!important;border-radius:13px!important}
#infi-ai-root .infi-close{background:rgba(255,255,255,.16)!important;border:1px solid rgba(255,255,255,.36)!important}
#infi-ai-root .infi-messages{padding:11px!important}
#infi-ai-root .infi-bubble{max-width:94%!important;font-size:12px!important}
#infi-ai-root .infi-quick{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:0 9px 7px!important}
#infi-ai-root .infi-chip{min-height:36px!important;padding:7px 6px!important;font-size:10px!important;line-height:1.2!important}
#infi-ai-root .infi-chip:nth-child(3){display:none!important}
#infi-ai-root .infi-compose{gap:7px!important;padding:8px 9px 9px!important}
#infi-ai-root .infi-input{min-height:42px!important;max-height:74px!important}
#infi-ai-root .infi-launcher-hide{right:-5px!important;top:-7px!important;width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important;max-height:32px!important}
}
@media(max-width:420px){
#infi-ai-root .infi-panel{left:max(5px,env(safe-area-inset-left))!important;right:max(5px,env(safe-area-inset-right))!important;bottom:max(5px,env(safe-area-inset-bottom))!important;height:min(66dvh,510px,calc(var(--infi-viewport-height,100dvh) - 12px))!important;max-height:calc(var(--infi-viewport-height,100dvh) - 12px)!important;border-radius:18px!important}
#infi-ai-root .infi-title span{max-width:128px!important;overflow:hidden!important;text-overflow:ellipsis!important}
}
@media(max-width:700px) and (max-height:620px){
#infi-ai-root .infi-panel{height:calc(var(--infi-viewport-height,100dvh) - 10px)!important;max-height:calc(var(--infi-viewport-height,100dvh) - 10px)!important;bottom:5px!important}
#infi-ai-root .infi-context,#infi-ai-root .infi-quick{display:none!important}
}

/* INFI LAUNCHER V4 — transparent mascot */
#infi-ai-root .infi-launcher{
  width:118px!important;
  min-width:118px!important;
  max-width:118px!important;
  height:118px!important;
  min-height:118px!important;
  max-height:118px!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#infi-ai-root .infi-launcher:hover{
  transform:translateY(-4px)!important;
  background:transparent!important;
  box-shadow:none!important;
}
#infi-ai-root .infi-launcher:focus-visible{
  outline:3px solid rgba(20,199,163,.65)!important;
  outline-offset:5px!important;
  border-radius:28px!important;
}
#infi-ai-root .infi-launcher img{
  left:-10px!important;
  bottom:-5px!important;
  width:138px!important;
  height:138px!important;
  object-fit:contain!important;
  filter:
    drop-shadow(1px 0 0 rgba(20,199,163,.95))
    drop-shadow(-1px 0 0 rgba(20,199,163,.95))
    drop-shadow(0 1px 0 rgba(20,199,163,.95))
    drop-shadow(0 -1px 0 rgba(20,199,163,.95))
    drop-shadow(0 11px 14px rgba(7,27,69,.28))!important;
  transition:filter .2s ease,transform .2s ease!important;
}
#infi-ai-root .infi-launcher:hover img{
  transform:scale(1.035)!important;
  filter:
    drop-shadow(1px 0 0 rgba(20,199,163,1))
    drop-shadow(-1px 0 0 rgba(20,199,163,1))
    drop-shadow(0 1px 0 rgba(20,199,163,1))
    drop-shadow(0 -1px 0 rgba(20,199,163,1))
    drop-shadow(0 0 9px rgba(20,199,163,.34))
    drop-shadow(0 13px 17px rgba(7,27,69,.3))!important;
}
#infi-ai-root .infi-launcher-label{
  display:block!important;
  left:50%!important;
  right:auto!important;
  top:auto!important;
  bottom:122px!important;
  transform:translateX(-50%)!important;
  min-width:max-content!important;
  padding:8px 12px!important;
  white-space:nowrap!important;
  border:1px solid rgba(20,199,163,.55)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.97)!important;
  color:#071b45!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1.15!important;
  letter-spacing:.01em!important;
  box-shadow:0 9px 24px rgba(7,27,69,.16),0 0 0 3px rgba(20,199,163,.08)!important;
}
#infi-ai-root .infi-launcher-hide{
  right:-1px!important;
  top:-3px!important;
  border-color:#14c7a3!important;
}
#infi-ai-root .infi-online{
  right:8px!important;
  bottom:8px!important;
  box-shadow:0 0 0 3px #fff,0 0 0 5px rgba(20,199,163,.26)!important;
}
@media(max-width:640px){
  #infi-ai-root .infi-launcher{
    width:98px!important;
    min-width:98px!important;
    max-width:98px!important;
    height:98px!important;
    min-height:98px!important;
    max-height:98px!important;
  }
  #infi-ai-root .infi-launcher img{
    left:-9px!important;
    bottom:-4px!important;
    width:116px!important;
    height:116px!important;
  }
  #infi-ai-root .infi-launcher-label{
    bottom:105px!important;
    padding:7px 10px!important;
    font-size:10.5px!important;
  }
  #infi-ai-root .infi-launcher-hide{
    right:-3px!important;
    top:-5px!important;
  }
}
