/* Chat assistant: follows the site design system (flat, 2px corners, Sora labels, navy / teal / gold) */
#sgBot{position:fixed;right:24px;bottom:24px;z-index:9990;font-family:var(--font-body,'Inter',sans-serif)}

/* launcher */
.sgbot-launch{position:relative;width:56px;height:56px;border-radius:2px;background:var(--navy-950,#041631);color:#fff;border:0;border-bottom:3px solid var(--gold,#C3A25D);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 18px 40px rgba(4,22,49,.3);transition:background .3s var(--ease,ease),transform .3s var(--ease,ease)}
.sgbot-launch:hover{background:var(--teal-dark,#0A5A5F);transform:translateY(-2px)}
.sgbot-launch:focus-visible{outline:2px solid var(--gold,#C3A25D);outline-offset:3px}
.sgbot-launch svg{width:24px;height:24px}
.sgbot-launch::after{content:"";position:absolute;inset:-1px;border:1px solid var(--gold,#C3A25D);border-radius:2px;animation:sgbot-ring 2.6s infinite;pointer-events:none}
#sgBot.is-open .sgbot-launch::after{display:none}
@keyframes sgbot-ring{0%{transform:scale(1);opacity:.7}100%{transform:scale(1.35);opacity:0}}

/* panel */
.sgbot-panel{position:absolute;right:0;bottom:72px;width:380px;max-width:calc(100vw - 32px);height:560px;max-height:calc(100vh - 110px);background:#fff;border:1px solid var(--line,#E3E8EF);border-radius:2px;box-shadow:0 24px 50px rgba(4,22,49,.28);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:sgbot-pop .3s var(--ease,ease)}
.sgbot-panel[hidden]{display:none}
@keyframes sgbot-pop{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* header */
.sgbot-head{background:var(--navy-950,#041631);color:#fff;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:2px solid var(--gold,#C3A25D)}
.sgbot-id{display:flex;align-items:center;gap:14px;min-width:0}
.sgbot-avatar{position:relative;flex:none;width:42px;height:42px;border:1px solid rgba(195,162,93,.6);border-radius:2px;color:var(--gold,#C3A25D);font-family:var(--font-display,'Sora',sans-serif);font-weight:600;font-size:17px;display:flex;align-items:center;justify-content:center}
.sgbot-avatar i{position:absolute;right:-4px;bottom:-4px;width:10px;height:10px;border-radius:50%;background:#3DD68C;border:2px solid var(--navy-950,#041631)}
.sgbot-head b{display:block;font-family:var(--font-display,'Sora',sans-serif);font-size:15px;font-weight:600;letter-spacing:-.01em;line-height:1.2}
.sgbot-head span{display:block;margin-top:3px;font-family:var(--font-display,'Sora',sans-serif);font-size:10.5px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--gold,#C3A25D)}
.sgbot-head .sgbot-avatar{display:flex;margin-top:0;font-size:17px;letter-spacing:0;text-transform:none}
.sgbot-actions{display:flex;align-items:center;gap:2px;flex:none}
.sgbot-mute,.sgbot-close{background:none;border:0;color:rgba(255,255,255,.75);cursor:pointer;padding:6px;display:flex;align-items:center;justify-content:center;transition:color .3s}
.sgbot-mute:hover,.sgbot-close:hover{color:#fff}
.sgbot-mute svg{width:18px;height:18px}
.sgbot-close{font-size:24px;line-height:1;width:30px;height:30px}
.sgbot-slash{display:none}
.sgbot-mute.is-muted .sgbot-slash{display:block}
.sgbot-mute.is-muted .sgbot-wave{display:none}

/* conversation */
.sgbot-body{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px;background:var(--paper,#F7F8FB)}
.sgbot-msg{max-width:88%;padding:12px 16px;font-size:14px;line-height:1.6;border-radius:2px;animation:sgbot-in .3s var(--ease,ease)}
.sgbot-bot{align-self:flex-start;background:#fff;color:var(--ink,#0E1B2C);border:1px solid var(--line,#E3E8EF);border-left:2px solid var(--gold,#C3A25D)}
.sgbot-user{align-self:flex-end;background:var(--navy-950,#041631);color:#fff}
.sgbot-typing{display:flex;gap:5px;padding:16px 18px}
.sgbot-typing i{width:6px;height:6px;border-radius:50%;background:var(--ink-3,#66738A);animation:sgbot-bounce 1.1s infinite ease-in-out}
.sgbot-typing i:nth-child(2){animation-delay:.15s}
.sgbot-typing i:nth-child(3){animation-delay:.3s}
@keyframes sgbot-bounce{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-4px);opacity:1}}
@keyframes sgbot-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* options */
.sgbot-choices{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.sgbot-chip{animation:sgbot-in .3s var(--ease,ease) both;font-family:var(--font-display,'Sora',sans-serif);font-size:12px;font-weight:600;letter-spacing:.04em;padding:10px 16px;border-radius:2px;border:1px solid var(--navy-950,#041631);background:#fff;color:var(--navy-950,#041631);cursor:pointer;text-align:left;transition:background .3s var(--ease,ease),color .3s var(--ease,ease)}
.sgbot-chip:hover{background:var(--navy-950,#041631);color:#fff}
.sgbot-chip--link{background:var(--gold,#C3A25D);border-color:var(--gold,#C3A25D);color:var(--navy-950,#041631);text-decoration:none}
.sgbot-chip--link:hover{background:#D4B778;border-color:#D4B778;color:var(--navy-950,#041631)}
.sgbot-chip:focus-visible,.sgbot-send:focus-visible{outline:2px solid var(--teal,#0E6B70);outline-offset:2px}

/* input */
.sgbot-form{display:flex;align-items:flex-end;gap:10px;padding:12px 20px 4px;background:#fff;border-top:1px solid var(--line,#E3E8EF)}
.sgbot-input{flex:1;min-width:0;font:inherit;font-size:14px;color:var(--ink,#0E1B2C);border:0;border-bottom:1px solid var(--line,#E3E8EF);border-radius:0;background:transparent;padding:10px 2px 11px;transition:border-color .3s}
.sgbot-input::placeholder{color:#9AA6B5}
.sgbot-input:focus{outline:none;border-bottom:2px solid var(--teal,#0E6B70);padding-bottom:10px}
.sgbot-send{flex:none;width:40px;height:40px;border:0;border-radius:2px;background:var(--gold,#C3A25D);color:var(--navy-950,#041631);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .3s}
.sgbot-send:hover{background:#D4B778}
.sgbot-send svg{width:16px;height:16px}

/* disclaimer */
.sgbot-note{padding:6px 20px 14px;background:#fff;font-size:11px;line-height:1.5;color:var(--ink-3,#66738A)}
.sgbot-note a{color:var(--teal,#0E6B70);text-decoration:underline}

@media (max-width:600px){
  #sgBot{right:12px;bottom:calc(12px + env(safe-area-inset-bottom))}
  .sgbot-panel{position:fixed;top:calc(10px + env(safe-area-inset-top));left:10px;right:10px;bottom:calc(80px + env(safe-area-inset-bottom));width:auto;max-width:none;height:auto;max-height:none}
  .sgbot-head{padding:14px 16px}
  .sgbot-avatar{width:38px;height:38px}
  .sgbot-body{padding:16px}
  .sgbot-msg{max-width:92%}
  .sgbot-input{font-size:16px}
  .sgbot-form{padding:10px 16px 4px}
  .sgbot-note{padding:6px 16px 12px}
}
@supports (height:100dvh){
  @media (max-width:600px){.sgbot-panel{bottom:calc(80px + env(safe-area-inset-bottom))}}
}

@media (prefers-reduced-motion:reduce){
  .sgbot-launch::after,.sgbot-panel,.sgbot-msg,.sgbot-chip,.sgbot-typing i{animation:none}
}

.sgbot-msg{white-space:pre-line}
.sgbot-input:disabled{opacity:.6}

/* waving hand launcher and greeting teaser */
.sgbot-teaser{position:absolute;right:68px;bottom:8px;display:flex;align-items:stretch;background:#fff;border:1px solid var(--line,#E3E8EF);border-left:2px solid var(--gold,#C3A25D);border-radius:2px;box-shadow:0 12px 30px rgba(4,22,49,.2);animation:sgbot-teaser-in .5s var(--ease,ease) both;white-space:nowrap}
.sgbot-teaser[hidden]{display:none}
.sgbot-teaser-open{font-family:var(--font-body,'Inter',sans-serif);font-size:14px;font-weight:500;color:var(--ink,#0E1B2C);padding:12px 6px 12px 16px;cursor:pointer;background:none;border:0}
.sgbot-teaser-open:hover{color:var(--teal,#0E6B70)}
.sgbot-teaser-x{background:none;border:0;color:var(--ink-3,#66738A);font-size:18px;line-height:1;padding:0 12px 0 6px;cursor:pointer}
.sgbot-teaser-x:hover{color:var(--ink,#0E1B2C)}
.sgbot-teaser::after{content:"";position:absolute;right:-6px;bottom:20px;width:10px;height:10px;background:#fff;border-top:1px solid var(--line,#E3E8EF);border-right:1px solid var(--line,#E3E8EF);transform:rotate(45deg)}
@keyframes sgbot-teaser-in{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}
@media (max-width:600px){.sgbot-teaser{right:64px;bottom:6px;width:max-content;max-width:calc(100vw - 96px)}.sgbot-teaser-open{font-size:13px;padding:10px 4px 10px 12px;white-space:normal;text-align:left}}
@media (prefers-reduced-motion:reduce){.sgbot-teaser,.sgbot-face,.sgbot-eye{animation:none}}

/* person-style launcher and avatar */
.sgbot-launch{width:62px;height:62px;border-radius:50%;padding:0;border:2px solid var(--gold,#C3A25D);border-bottom-width:2px;background:var(--navy-950,#041631)}
.sgbot-launch::after{border-radius:50%}
.sgbot-launch::before{content:"";position:absolute;right:1px;bottom:1px;z-index:2;width:14px;height:14px;border-radius:50%;background:#3DD68C;border:2px solid #fff}
.sgbot-face{display:block;width:100%;height:100%;border-radius:50%}
.sgbot-launch .sgbot-face{animation:sgbot-bob 3.2s ease-in-out infinite}
#sgBot.is-open .sgbot-launch .sgbot-face{animation:none}
@keyframes sgbot-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
.sgbot-eye{transform-box:fill-box;transform-origin:center;animation:sgbot-blink 5s infinite}
@keyframes sgbot-blink{0%,93%,100%{transform:scaleY(1)}96%{transform:scaleY(.1)}}
.sgbot-avatar{border-radius:50%;border:1.5px solid var(--gold,#C3A25D);padding:0}
.sgbot-avatar .sgbot-face{width:100%;height:100%}
.sgbot-teaser{right:76px;bottom:12px}
.sgbot-teaser::after{bottom:22px}
@media (max-width:600px){.sgbot-teaser{right:72px;bottom:10px}}
.sgbot-launch .sgbot-face{width:100%;height:100%}
/* sit a little higher and further in from the corner */
#sgBot{right:32px;bottom:36px}
@media (max-width:600px){#sgBot{right:16px;bottom:calc(24px + env(safe-area-inset-bottom))}.sgbot-panel{bottom:calc(100px + env(safe-area-inset-bottom))}}
