/* ============ S.I.M.A. chat companion (v4) ============ */
.sc-root{--sc-forest:#1f3d2b;--sc-green:#2f5d3f;--sc-gold:#c9a24a;--sc-mustard:#d9ad3c;--sc-gold-dark:#a88232;--sc-cream:#faf6ee;--sc-beige:#f1e8d8;--sc-ink:#1f2620;
  font-family:'Poppins',system-ui,sans-serif;font-size:15px;line-height:1.55;color:var(--sc-ink)}
.sc-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* keep the existing floats clear: WhatsApp stays bottom-right, S.I.M.A. sits above it, back-to-top moves up */
body.has-sima-chat .to-top{bottom:164px}

.sc-launcher{position:fixed;right:20px;bottom:92px;z-index:210;display:flex;align-items:center;gap:.6rem;padding:.45rem 1.05rem .45rem .45rem;border-radius:999px;border:1px solid rgba(217,173,60,.55);
  background:linear-gradient(135deg,#1f3d2b,#2f5d3f);color:#fff;box-shadow:0 12px 28px rgba(31,61,43,.35);cursor:pointer;transition:transform .2s,box-shadow .2s;font:inherit}
.sc-launcher:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(31,61,43,.42)}
.sc-launcher:focus-visible,.sc-icon:focus-visible,.sc-send:focus-visible,.sc-chip:focus-visible{outline:3px solid var(--sc-mustard);outline-offset:2px}
.sc-launcher__ic{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--sc-mustard),var(--sc-gold-dark));color:#fff;font-size:1.15rem;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.sc-launcher__txt{display:flex;flex-direction:column;text-align:left;line-height:1.15}
.sc-launcher__txt strong{font-family:'Playfair Display',Georgia,serif;font-size:1rem;letter-spacing:.02em}
.sc-launcher__txt small{font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;color:var(--sc-mustard)}
.sc-root.is-open .sc-launcher{opacity:.0;pointer-events:none;transform:scale(.9)}

.sc-nudge{position:fixed;right:20px;bottom:160px;z-index:210;max-width:250px;background:#fff;border:1px solid var(--sc-beige);border-radius:16px 16px 4px 16px;padding:.7rem 2rem .7rem .9rem;
  box-shadow:0 12px 30px rgba(31,61,43,.18);font-size:.85rem;cursor:pointer;animation:scIn .35s ease}
.sc-nudge[hidden]{display:none}
.sc-nudge__x{position:absolute;top:4px;right:8px;border:0;background:none;font-size:1.2rem;line-height:1;color:#5f6b60;cursor:pointer;padding:.2rem}

.sc-panel{position:fixed;right:20px;bottom:20px;z-index:320;width:min(390px,calc(100vw - 40px));height:min(640px,calc(100vh - 40px));display:flex;flex-direction:column;
  background:var(--sc-cream);border-radius:22px;overflow:hidden;box-shadow:0 28px 70px rgba(31,61,43,.32);border:1px solid rgba(201,162,74,.35);animation:scIn .25s ease}
.sc-panel[hidden]{display:none}
@keyframes scIn{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}

.sc-head{display:flex;align-items:center;gap:.7rem;padding:.9rem .8rem .9rem 1rem;color:#fff;background:linear-gradient(135deg,#173022,#2f5d3f);position:relative}
.sc-head::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--sc-mustard),var(--sc-gold-dark),var(--sc-mustard))}
.sc-avatar{flex:none;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-family:'Playfair Display',Georgia,serif;font-weight:700;font-size:1.35rem;
  background:linear-gradient(135deg,var(--sc-mustard),var(--sc-gold-dark));color:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.18)}
.sc-head__t{flex:1;min-width:0}
.sc-head h2{font-family:'Playfair Display',Georgia,serif;color:#fff;font-size:1.25rem;letter-spacing:.06em;margin:0;line-height:1.1}
.sc-head p{margin:0;font-size:.78rem;color:var(--sc-mustard);font-weight:600;letter-spacing:.04em}
.sc-exp{display:block;font-size:.58rem;letter-spacing:.05em;text-transform:uppercase;color:rgba(255,255,255,.72);line-height:1.3}
.sc-icon{flex:none;width:38px;height:38px;border-radius:50%;border:0;background:rgba(255,255,255,.1);color:#fff;cursor:pointer;display:grid;place-items:center;font-size:.95rem}
.sc-icon:hover{background:rgba(255,255,255,.2)}

.sc-body{flex:1;overflow-y:auto;padding:1rem .9rem .5rem;display:flex;flex-direction:column;gap:.6rem;overscroll-behavior:contain;
  background:radial-gradient(circle at 100% 0,rgba(201,162,74,.08),transparent 40%),var(--sc-cream)}
.sc-msg{display:flex}
.sc-msg--user{justify-content:flex-end}
.sc-bubble{max-width:86%;padding:.65rem .85rem;border-radius:16px;font-size:.9rem;word-wrap:break-word;overflow-wrap:anywhere}
.sc-msg--bot .sc-bubble{background:#fff;border:1px solid var(--sc-beige);border-top-left-radius:4px;box-shadow:0 4px 14px rgba(31,61,43,.06)}
.sc-msg--user .sc-bubble{background:linear-gradient(135deg,#1f3d2b,#2f5d3f);color:#fff;border-top-right-radius:4px;white-space:pre-wrap}
.sc-bubble p{margin:0}
.sc-bubble .sc-gap{height:.45rem}
.sc-bubble ul,.sc-bubble ol{margin:.3rem 0 .3rem 1.1rem;padding:0}
.sc-bubble li{margin:.15rem 0}
.sc-bubble strong{color:var(--sc-forest)}
.sc-msg--user .sc-bubble strong{color:#fff}
.sc-bubble a{color:var(--sc-gold-dark);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.sc-bubble code{background:var(--sc-beige);padding:0 .25rem;border-radius:4px;font-size:.85em}
.sc-typing .sc-bubble{display:flex;gap:5px;align-items:center;padding:.85rem 1rem}
.sc-typing span{width:7px;height:7px;border-radius:50%;background:var(--sc-gold);animation:scDot 1.2s infinite ease-in-out}
.sc-typing span:nth-child(2){animation-delay:.15s}.sc-typing span:nth-child(3){animation-delay:.3s}
@keyframes scDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}

.sc-chips{display:flex;gap:.4rem;overflow-x:auto;padding:.35rem .9rem .5rem;scrollbar-width:none}
.sc-chips::-webkit-scrollbar{display:none}
.sc-chips[hidden]{display:none}
.sc-chip{flex:none;border:1px solid rgba(201,162,74,.6);background:#fff;color:var(--sc-forest);border-radius:999px;padding:.4rem .8rem;font:inherit;font-size:.78rem;font-weight:500;cursor:pointer;white-space:nowrap}
.sc-chip:hover{background:var(--sc-forest);color:#fff;border-color:var(--sc-forest)}

.sc-form{display:flex;align-items:flex-end;gap:.5rem;padding:.6rem .7rem;background:#fff;border-top:1px solid var(--sc-beige)}
.sc-form textarea{flex:1;resize:none;border:1px solid #e3d7bf;border-radius:14px;padding:.65rem .8rem;font:inherit;font-size:16px;line-height:1.4;max-height:120px;background:var(--sc-cream);color:var(--sc-ink)}
.sc-form textarea:focus{outline:none;border-color:var(--sc-gold);box-shadow:0 0 0 3px rgba(201,162,74,.2)}
.sc-send{flex:none;width:46px;height:46px;border-radius:50%;border:0;cursor:pointer;color:#fff;background:linear-gradient(135deg,var(--sc-mustard),var(--sc-gold-dark));box-shadow:0 6px 16px rgba(201,162,74,.4);font-size:1rem}
.sc-form.is-busy .sc-send{opacity:.55;cursor:progress}
.sc-foot{margin:0;padding:.35rem .9rem .6rem;background:#fff;font-size:.68rem;color:#5f6b60;text-align:center}
.sc-foot a{color:#b3261e;font-weight:700}
.sc-count{color:var(--sc-gold-dark);font-weight:600}

@media (max-width:640px){
  .sc-launcher{right:16px;bottom:84px;padding:.4rem}
  .sc-launcher__txt{display:none}
  .sc-nudge{right:16px;bottom:148px}
  body.has-sima-chat .to-top{bottom:150px;right:20px}
}
@media (max-width:560px){
  .sc-panel{inset:0;right:0;bottom:0;width:100%;height:100%;height:100dvh;border-radius:0;border:0}
  .sc-head{padding-top:calc(.9rem + env(safe-area-inset-top))}
  .sc-foot{padding-bottom:calc(.6rem + env(safe-area-inset-bottom))}
  html.sc-lock,html.sc-lock body{overflow:hidden}
}
@media (prefers-reduced-motion:reduce){.sc-panel,.sc-nudge{animation:none}.sc-typing span{animation:none;opacity:.7}.sc-launcher{transition:none}}
@media print{.sc-root{display:none!important}}
