/* ============================================================
   FRANCIE — SFS College chat widget styles
   Self-contained (own color vars) so it looks the same on any
   page it's included on, regardless of that page's own theme.
   ============================================================ */
.sfsbot{
  --sfsbot-navy:#0E2647;
  --sfsbot-red:#DA1E33;
  --sfsbot-red-dark:#A81328;
  --sfsbot-ink:#1C1F31;
  --sfsbot-ink-soft:#5B6270;
  --sfsbot-line:#E7E7EE;
  --sfsbot-bg:#F6F5FA;
  --sfsbot-radius:18px;
  position:fixed;right:1.25rem;bottom:60px;z-index:9999; /* stands right on the site bottom bar (.h2-actionbar, 60px) */
  pointer-events:none; /* only Sia herself, the close chip and the chat window take clicks */
  font-family:'Poppins','Plus Jakarta Sans',Arial,sans-serif;
}

/* ---------------- Launcher ----------------
   Sia is a 3D helpdesk girl (the college's own video, green screen removed): headset,
   pink blazer, wink + thumbs up, 8s loop. No circle or box: the button itself is
   invisible and only her outline (.sfsbot-launcher-hit) takes the click.
   sia.webm = the moving version (see-through VP9, Chrome/Edge/Firefox/Android);
   sia-anim.webp = the same for Safari/iPhone, which can't show see-through WebM;
   sia-still.webp = standing still (Stop Motion / reduced motion, and the video poster). */
.sfsbot-launcher{
  position:relative;display:block;width:96px;height:132px;padding:0;border:none;background:none;color:#fff;
  cursor:pointer;pointer-events:none;-webkit-tap-highlight-color:transparent;
}
.sfsbot-launcher:focus-visible{outline:3px solid var(--sfsbot-red);outline-offset:2px;border-radius:16px}
.sfsbot-launcher-hit{
  position:absolute;inset:0;pointer-events:auto;
  clip-path:polygon(27% 0,83% 0,89% 38%,99% 58%,100% 100%,0 100%,2% 70%,7% 41%,19% 39%,25% 30%);
}
.sfsbot-launcher-icon{position:absolute;display:grid;place-items:center;transition:opacity .25s,transform .3s cubic-bezier(.22,.9,.28,1)}
.sfsbot-launcher-icon svg{width:100%;height:100%}
.sfsbot-launcher-icon--chat{inset:0;transform-origin:50% 100%}
.sfsbot-sia{
  position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;
  /* thin white edge so she stands out on dark sections, plus a soft shadow */
  filter:drop-shadow(0 0 1px rgba(255,255,255,.95)) drop-shadow(0 0 1px rgba(255,255,255,.95)) drop-shadow(0 10px 14px rgba(14,38,71,.32));
}
.sfsbot-sia--still{display:none}
.sfsbot-launcher:hover .sfsbot-launcher-icon--chat{transform:translateY(-3px)}
/* Close (x): a round red chip where her feet were, while the chat is open */
.sfsbot-launcher-icon--close{
  right:6px;bottom:6px;width:50px;height:50px;border-radius:50%;padding:14px;box-sizing:border-box;
  background:linear-gradient(155deg,var(--sfsbot-red),var(--sfsbot-red-dark));
  box-shadow:0 10px 22px -8px rgba(14,38,71,.55);
  opacity:0;transform:rotate(-45deg) scale(.6);pointer-events:none;
}
.sfsbot-open .sfsbot-launcher-icon--chat{opacity:0;transform:translateY(12px) scale(.85)}
.sfsbot-open .sfsbot-launcher-hit{pointer-events:none}
.sfsbot-open .sfsbot-launcher-icon--close{opacity:1;transform:rotate(0) scale(1);pointer-events:auto}
.sfsbot-launcher-badge{
  position:absolute;top:2px;right:2px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;
  background:var(--sfsbot-navy);color:#fff;font-size:.68rem;font-weight:800;
  display:grid;place-items:center;border:2px solid #fff;
}
.sfsbot-open .sfsbot-launcher-badge{display:none}

/* "Ask Sia" bubble: up most of the time - about 3s showing, 1s hidden, on a 4s loop */
.sfsbot-launcher-hint{
  position:absolute;right:92px;bottom:74px;
  background:#fff;color:var(--sfsbot-navy);font-weight:700;font-size:.82rem;
  padding:.5rem .9rem;border-radius:99px;white-space:nowrap;
  box-shadow:0 12px 26px -8px rgba(14,38,71,.4);
  opacity:0;transform:translateY(6px) scale(.9);transform-origin:right center;
  pointer-events:none;
  animation:sfsbotHint 4s ease-in-out infinite;
}
.sfsbot-launcher-hint-tail{
  position:absolute;top:50%;right:-5px;width:11px;height:11px;background:#fff;
  transform:translateY(-50%) rotate(45deg);border-radius:2px;
}
@keyframes sfsbotHint{
  0%,90%,100%{opacity:0;transform:translateY(6px) scale(.9)}
  10%,80%{opacity:1;transform:translateY(0) scale(1)}
}
.sfsbot-launcher:hover + .sfsbot-launcher-hint,
.sfsbot-open .sfsbot-launcher-hint{opacity:0;animation:none}

/* ---------------- Panel ---------------- */
.sfsbot-panel[hidden]{display:none}
.sfsbot-panel{
  pointer-events:auto;
  position:absolute;right:0;bottom:74px;width:380px;max-width:calc(100vw - 2rem);
  height:min(600px,70vh);
  background:#fff;border-radius:var(--sfsbot-radius);overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:0 30px 70px -20px rgba(14,38,71,.4),0 10px 24px rgba(14,38,71,.15);
  border:1px solid var(--sfsbot-line);
  transform-origin:bottom right;
  animation:sfsbotIn .28s cubic-bezier(.22,.9,.28,1);
}
@keyframes sfsbotIn{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}

.sfsbot-head{
  flex:none;display:flex;align-items:center;gap:.7rem;padding:.9rem 1rem;
  background:linear-gradient(120deg,var(--sfsbot-navy) 0%,#1c2456 60%,var(--sfsbot-red-dark) 140%);color:#fff;
}
/* Shown exactly as exported — no crop, no mask, no background chip —
   same treatment as the launcher logo. */
.sfsbot-head-logo{flex:none;width:46px;height:46px;margin:-6px 0 -8px;object-fit:cover;object-position:50% 0;display:block;filter:drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 0 1px rgba(255,255,255,.9))}
.sfsbot-head-text{display:flex;flex-direction:column;gap:.1rem;min-width:0}
.sfsbot-head-text strong{font-size:.98rem;font-weight:700;line-height:1.2}
.sfsbot-head-text span{font-size:.7rem;color:rgba(255,255,255,.75);line-height:1.2}
.sfsbot-delete,.sfsbot-min{
  flex:none;width:30px;height:30px;border-radius:50%;border:none;cursor:pointer;
  background:rgba(255,255,255,.14);color:#fff;display:grid;place-items:center;
  transition:background .2s;
}
.sfsbot-delete{margin-left:auto}
.sfsbot-delete:hover,.sfsbot-min:hover{background:rgba(255,255,255,.26)}
.sfsbot-delete svg,.sfsbot-min svg{width:16px;height:16px}

.sfsbot-body{
  flex:1 1 auto;min-height:0;overflow-y:auto;padding:1rem;
  display:flex;flex-direction:column;gap:.6rem;background:var(--sfsbot-bg);
}
.sfsbot-row{display:flex;max-width:88%}
.sfsbot-row--bot{align-self:flex-start}
.sfsbot-row--user{align-self:flex-end;margin-left:auto}
.sfsbot-bubble{
  padding:.62rem .85rem;border-radius:14px;font-size:.86rem;line-height:1.5;color:var(--sfsbot-ink);
  background:#fff;box-shadow:0 2px 8px rgba(14,38,71,.08);border:1px solid var(--sfsbot-line);
}
.sfsbot-row--user .sfsbot-bubble{
  background:linear-gradient(155deg,var(--sfsbot-red),var(--sfsbot-red-dark));color:#fff;border-color:transparent;
}
.sfsbot-bubble p{margin:0 0 .4rem}
.sfsbot-bubble p:last-child{margin-bottom:0}
.sfsbot-bubble a{color:inherit;font-weight:700;text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.sfsbot-bubble a:focus-visible{outline:2px solid var(--sfsbot-red);outline-offset:2px;border-radius:3px}
.sfsbot-bubble ul{margin:.2rem 0 .5rem;padding-left:1.1rem}
.sfsbot-bubble li{margin-bottom:.15rem}
.sfsbot-bubble ul:last-child{margin-bottom:0}

.sfsbot-typing{display:flex;align-items:center;gap:4px;padding:.7rem .9rem}
.sfsbot-typing span{
  width:6px;height:6px;border-radius:50%;background:var(--sfsbot-ink-soft);
  animation:sfsbotBounce 1.1s infinite ease-in-out;
}
.sfsbot-typing span:nth-child(2){animation-delay:.15s}
.sfsbot-typing span:nth-child(3){animation-delay:.3s}
@keyframes sfsbotBounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* Lives inline in the message list now, directly under the bot message
   it belongs to (starting with the very first/greeting message), not
   pinned in a separate bar between the body and the input. */
.sfsbot-chipbar{
  display:flex;flex-wrap:wrap;gap:.4rem;
  max-width:88%;
  margin:-.15rem 0 0;
}
.sfsbot-chip{
  border:1px solid var(--sfsbot-red);color:var(--sfsbot-red-dark);background:#fff;
  padding:.4rem .7rem;border-radius:99px;font-size:.74rem;font-weight:600;cursor:pointer;
  transition:background .2s,color .2s,transform .2s;white-space:nowrap;
}
.sfsbot-chip:hover{background:var(--sfsbot-red);color:#fff;transform:translateY(-1px)}

.sfsbot-form{
  flex:none;display:flex;gap:.5rem;padding:.7rem;border-top:1px solid var(--sfsbot-line);background:#fff;
}
.sfsbot-input{
  flex:1 1 auto;min-width:0;border:1px solid var(--sfsbot-line);border-radius:99px;
  padding:.6rem .95rem;font-size:.85rem;font-family:inherit;color:var(--sfsbot-ink);outline:none;
  transition:border-color .2s,box-shadow .2s;background:var(--sfsbot-bg);
}
.sfsbot-input:focus{border-color:var(--sfsbot-red);box-shadow:0 0 0 3px rgba(218,30,51,.12);background:#fff}
.sfsbot-send{
  flex:none;width:40px;height:40px;border-radius:50%;border:none;cursor:pointer;
  background:linear-gradient(155deg,var(--sfsbot-red),var(--sfsbot-red-dark));color:#fff;
  display:grid;place-items:center;transition:transform .2s,box-shadow .2s;
  box-shadow:0 8px 18px -6px rgba(218,30,51,.5);
}
.sfsbot-send:hover{transform:translateY(-1px) scale(1.04)}
.sfsbot-send:active{transform:scale(.94)}
.sfsbot-send svg{width:17px;height:17px}

.sfsbot-foot{
  flex:none;margin:0;padding:.35rem 1rem .6rem;text-align:center;
  font-size:.64rem;color:var(--sfsbot-ink-soft);background:#fff;
}

/* ---------------- Responsive ---------------- */
@media (max-width:760px){
  /* Clears the site's fixed 60px bottom action bar (.h2-actionbar) —
     left at the desktop 1.25rem offset, the launcher sat partly behind it. */
  .sfsbot{bottom:60px}
}
@media (max-width:480px){
  .sfsbot{right:.75rem}
  .sfsbot-panel{
    width:calc(100vw - 1.5rem);height:min(72vh,560px);bottom:70px;right:-0.25rem;
  }
  .sfsbot-launcher{width:80px;height:110px}
  .sfsbot-launcher-icon--close{width:46px;height:46px;padding:13px}
  .sfsbot-launcher-hint{right:76px;bottom:60px}
}

@media (prefers-reduced-motion:reduce){
  .sfsbot-panel{animation:none}
  .sfsbot-launcher,.sfsbot-launcher-icon,.sfsbot-chip,.sfsbot-send,.sfsbot-min{transition:none}
  .sfsbot-typing span{animation:none;opacity:1}
  .sfsbot-sia--anim{display:none}
  .sfsbot-sia--still{display:block}
  .sfsbot-launcher-hint{animation:none;opacity:0}
}

/* ---------------- In-chat "delete all" modal ----------------
   Contained to .sfsbot-panel (which is already position:absolute, so
   it's the containing block here) rather than a page-level overlay —
   the rest of the site stays fully interactive while this is open. */
.sfsbot-modal{
  position:absolute;inset:0;z-index:5;
  display:flex;align-items:center;justify-content:center;padding:1.2rem;
  background:rgba(14,38,71,.42);
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
  animation:sfsbotFade .18s ease;
}
.sfsbot-modal[hidden]{display:none}
@keyframes sfsbotFade{from{opacity:0}to{opacity:1}}
.sfsbot-modal-card{
  width:100%;max-width:280px;background:#fff;border-radius:14px;padding:1.1rem 1.1rem 1rem;
  box-shadow:0 24px 50px -14px rgba(14,38,71,.5);
  animation:sfsbotPop .22s cubic-bezier(.22,.9,.28,1);
}
@keyframes sfsbotPop{from{opacity:0;transform:scale(.92) translateY(6px)}to{opacity:1;transform:none}}
.sfsbot-modal-title{margin:0 0 .35rem;font-size:.92rem;font-weight:700;color:var(--sfsbot-ink)}
.sfsbot-modal-desc{margin:0 0 .9rem;font-size:.78rem;line-height:1.45;color:var(--sfsbot-ink-soft)}
.sfsbot-modal-actions{display:flex;justify-content:flex-end;gap:.5rem}
.sfsbot-modal-cancel,.sfsbot-modal-confirm{
  border-radius:99px;padding:.5rem .95rem;font-size:.8rem;font-weight:700;cursor:pointer;
  border:1px solid transparent;transition:background .2s,color .2s,border-color .2s,transform .2s;
}
.sfsbot-modal-cancel{background:var(--sfsbot-bg);color:var(--sfsbot-ink-soft);border-color:var(--sfsbot-line)}
.sfsbot-modal-cancel:hover{background:var(--sfsbot-line)}
.sfsbot-modal-confirm{background:var(--sfsbot-red);color:#fff}
.sfsbot-modal-confirm:hover{background:var(--sfsbot-red-dark);transform:translateY(-1px)}

@media (prefers-reduced-motion:reduce){
  .sfsbot-modal,.sfsbot-modal-card{animation:none}
}
