/* SerieAGoal AI v0.78. Isolated header icon + off-canvas conversation UI. */
.sg-topbar .sg-site-ai-trigger{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 36px!important;width:36px!important;height:36px!important;padding:5px!important;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:10px;transition:background .15s ease}
.sg-topbar .sg-site-ai-trigger:is(:hover,:focus-visible),.sg-topbar .sg-site-ai-trigger[aria-expanded="true"]{background:rgba(255,255,255,.15)!important;outline-offset:2px}
.sg-topbar .sg-site-ai-trigger img{display:block!important;width:24px!important;height:24px!important;object-fit:contain;min-width:24px;max-width:24px}
.sg-site-ai-overlay[hidden],.sg-site-ai-drawer[hidden]{display:none!important}
.sg-site-ai-overlay{position:fixed!important;inset:0!important;z-index:99970!important;background:rgba(7,12,25,.55)!important;backdrop-filter:blur(5px)!important;-webkit-backdrop-filter:blur(5px)!important}
.sg-site-ai-drawer{position:fixed!important;z-index:99971!important;inset:0 0 0 auto!important;width:min(440px,100vw)!important;height:100dvh!important;max-height:100dvh!important;display:flex!important;flex-direction:column!important;min-width:0!important;overflow:hidden!important;background:#121720!important;color:#edf4ff!important;box-shadow:-18px 0 60px rgba(0,0,0,.35)!important;border-left:1px solid rgba(255,255,255,.13)!important;font:14px/1.55 Manrope,Inter,system-ui,sans-serif!important;box-sizing:border-box!important}
.sg-site-ai-drawer *{box-sizing:border-box!important}
.sg-site-ai-head{display:flex;align-items:center;gap:12px;padding:21px 20px;background:#131720;border-bottom:1px solid #303340;flex:0 0 auto;min-height:86px}
.sg-site-ai-brand{width:43px;height:43px;flex:0 0 43px;background:rgba(217,119,87,.12);border:1px solid rgba(217,119,87,.28);display:flex;align-items:center;justify-content:center;border-radius:13px}
.sg-site-ai-brand img{width:27px;height:27px;object-fit:contain}
.sg-site-ai-heading{display:flex;flex-direction:column;gap:1px;min-width:0}
.sg-site-ai-heading small{font-size:9px;letter-spacing:.16em;color:#a2acc0;font-weight:800}
.sg-site-ai-heading strong{font-size:17px;line-height:1.35;font-weight:800;color:#f7f9fc}
.sg-site-ai-close{margin-left:auto!important;flex:0 0 38px;border:1px solid #383c48!important;border-radius:50%!important;height:38px;width:38px;background:#242530!important;color:#eef2f8!important;cursor:pointer!important;font:25px/1 system-ui!important}
.sg-site-ai-close:hover{background:#36394a!important}
.sg-site-ai-notice{font-size:11px!important;line-height:1.55!important;color:#b5aeb7!important;background:#211d27!important;border-bottom:1px solid #38303a;padding:13px 20px!important;margin:0!important;flex:0 0 auto}
.sg-site-ai-messages{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;align-items:stretch;gap:14px;padding:21px 17px 27px;scrollbar-color:#424d61 transparent}
.sg-site-ai-message{max-width:94%;border:1px solid #353946;background:#21242e;color:#f3f6fc;font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:18px;padding:13px 15px;align-self:flex-start;box-shadow:0 3px 8px rgba(0,0,0,.05)}
.sg-site-ai-message.is-user{align-self:flex-end;max-width:91%;background:#023f86;border-color:#165da9;color:#fff}
.sg-site-ai-message.is-error{background:#352329;border-color:#784755;color:#ffcccd}
.sg-site-ai-message.is-pending{color:#afbbcb;font-style:italic}
.sg-site-ai-suggestions{display:grid;gap:9px}
.sg-site-ai-suggestions button{width:100%;min-height:43px;padding:11px 14px!important;text-align:left!important;background:#211c26!important;border:1px solid #413542!important;color:#e9e5eb!important;border-radius:15px!important;font:500 12px/1.4 Manrope,system-ui,sans-serif!important;cursor:pointer!important}
.sg-site-ai-suggestions button:hover{background:#2d2532!important;border-color:#65516a!important}
.sg-site-ai-sources{display:flex;flex-wrap:wrap;gap:7px;max-width:94%}
.sg-site-ai-sources a{display:inline-flex;align-items:center;max-width:100%;border:1px solid #334769;border-radius:9px;background:#1a293e;color:#a9d7ff!important;padding:5px 9px;font-size:10.5px;line-height:1.35;text-decoration:none!important;overflow-wrap:anywhere}
.sg-site-ai-sources a:hover{background:#213852;color:#fff!important}
.sg-site-ai-composer{display:flex;align-items:flex-end;gap:9px;background:#1a1b24;border-top:1px solid #34303b;padding:15px 16px max(15px,env(safe-area-inset-bottom));margin:0!important;flex:0 0 auto}
.sg-site-ai-composer textarea{display:block;min-height:47px!important;max-height:130px!important;flex:1;min-width:0;resize:none;overflow-y:auto;background:#24222d!important;border:1px solid #474151!important;border-radius:13px!important;color:#f7f4f8!important;font:13px/1.5 Manrope,system-ui,sans-serif!important;padding:13px 14px!important;outline:none!important;box-shadow:none!important;margin:0!important}
.sg-site-ai-composer textarea:focus{border-color:#ba6371!important}
.sg-site-ai-composer textarea::placeholder{color:#8b8996!important}
.sg-site-ai-composer button{width:43px!important;height:43px!important;flex:0 0 43px;border:0!important;border-radius:50%!important;display:flex;align-items:center;justify-content:center;cursor:pointer;background:#a82f52!important;color:#fff!important;font:bold 25px/1 system-ui!important;box-shadow:none!important}
.sg-site-ai-composer button:disabled{opacity:.4!important;cursor:default!important}
.sg-site-ai-foot{flex:0 0 auto;padding:0 18px 12px;background:#1a1b24;color:#837c8b;font-size:9px;line-height:1.4;text-align:center}
.sg-site-ai-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
html.sg-site-ai-open,body.sg-site-ai-open{overflow:hidden!important}
@media(max-width:640px){.sg-site-ai-drawer{width:100vw!important;border-left:0!important}.sg-site-ai-head{min-height:72px;padding:14px 16px}.sg-site-ai-notice{padding:11px 16px!important}.sg-site-ai-messages{padding:17px 13px 24px}.sg-site-ai-composer{padding:12px 12px max(12px,env(safe-area-inset-bottom))}.sg-site-ai-message{font-size:12.5px}}
@media(prefers-reduced-motion:no-preference){.sg-site-ai-drawer:not([hidden]){animation:sgSiteAIEnter .22s ease-out both}@keyframes sgSiteAIEnter{from{opacity:.7;transform:translateX(25px)}to{opacity:1;transform:translateX(0)}}}
/* Existing mobile header hides generic .sg-top-icon buttons; explicitly restore only Claude. */
@media(max-width:760px){
  .sg-topbar .sg-top-actions>.sg-site-ai-trigger.sg-top-icon{display:flex!important;width:36px!important;min-width:36px!important;height:36px!important;flex:0 0 36px!important}
}
@media(max-width:360px){
  .sg-topbar .sg-top-actions>.sg-site-ai-trigger.sg-top-icon{width:34px!important;min-width:34px!important;height:36px!important;flex-basis:34px!important}
}


/* Verification state belongs to the last actual Claude response, not to
   the presence of a configured key or to a generic chat text. */
.sg-site-ai-status{display:inline-flex;align-items:center;gap:6px;font:600 10px/1.35 Manrope,system-ui,sans-serif;color:#9eabbf;white-space:nowrap;margin-top:3px}
.sg-site-ai-status>i{display:block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:#758196}
.sg-site-ai-status[data-state="connected"]{color:#8de0b9}
.sg-site-ai-status[data-state="connected"]>i{background:#5ed99b;box-shadow:0 0 0 3px rgba(94,217,155,.13)}
.sg-site-ai-status[data-state="error"]{color:#e7a8a8}
.sg-site-ai-status[data-state="error"]>i{background:#dd8181}
.sg-site-ai-message.is-assistant strong{font-weight:800!important;color:#fff!important}

/* SG Site AI v0.78 — white Claude SVG, no frame/bubble/round background.
   Use the existing 36px icon slot; the original orange SVG remains in chat. */
.sg-topbar .sg-top-actions > .sg-site-ai-trigger.sg-top-icon{
  display:inline-flex!important;
  align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;
  flex:0 0 36px!important;
  width:36px!important;min-width:36px!important;max-width:36px!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  padding:5px!important;
  border:0!important;border-radius:8px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#fff!important;overflow:visible!important;
  -webkit-appearance:none!important;appearance:none!important;
}
.sg-topbar .sg-top-actions > .sg-site-ai-trigger.sg-top-icon img{
  display:block!important;
  width:25px!important;height:25px!important;
  min-width:25px!important;max-width:25px!important;
  flex:0 0 25px!important;
  object-fit:contain!important;
  filter:none!important;
}
.sg-topbar .sg-top-actions > .sg-site-ai-trigger.sg-top-icon:is(:hover,:focus-visible),
.sg-topbar .sg-top-actions > .sg-site-ai-trigger.sg-top-icon[aria-expanded="true"]{
  border:0!important;
  background:rgba(255,255,255,.08)!important;
  box-shadow:none!important;
}
@media(max-width:760px){
  .sg-topbar .sg-top-actions > .sg-site-ai-trigger.sg-top-icon{
    display:inline-flex!important;flex:0 0 36px!important;
    width:36px!important;min-width:36px!important;max-width:36px!important;
    height:36px!important;min-height:36px!important;max-height:36px!important;
    padding:5px!important;
  }
}
@media(max-width:360px){
  .sg-topbar .sg-top-actions > .sg-site-ai-trigger.sg-top-icon{
    flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important;
  }
  .sg-topbar .sg-top-actions > .sg-site-ai-trigger.sg-top-icon img{
    width:24px!important;height:24px!important;min-width:24px!important;max-width:24px!important;flex-basis:24px!important;
  }
}

/* SG Site AI v0.79 — entity cards for players, teams and competitions. */
.sg-site-ai-cards{display:grid;gap:10px;max-width:94%}
.sg-site-ai-card{display:flex;align-items:center;gap:12px;min-width:0;padding:12px 13px;border-radius:18px;border:1px solid #2a405e;background:linear-gradient(180deg,#162334 0%,#101924 100%);box-shadow:0 10px 24px rgba(0,0,0,.16);text-decoration:none!important;color:#eef5ff!important;transition:transform .15s ease,border-color .15s ease,background .15s ease}
.sg-site-ai-card:hover{transform:translateY(-1px);border-color:#4a76a5;background:linear-gradient(180deg,#1b2d44 0%,#132032 100%)}
.sg-site-ai-card[data-kind="player"]{border-color:#3b4a69;background:linear-gradient(180deg,#1c2433 0%,#151b27 100%)}
.sg-site-ai-card[data-kind="team"]{border-color:#1f4e6d;background:linear-gradient(180deg,#12293b 0%,#0f1f2d 100%)}
.sg-site-ai-card[data-kind="competition"]{border-color:#5b3f76;background:linear-gradient(180deg,#241933 0%,#1a1525 100%)}
.sg-site-ai-card-media{display:flex;align-items:center;justify-content:center;flex:0 0 56px;width:56px;height:56px;border-radius:16px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.11);overflow:hidden}
.sg-site-ai-card-media img{display:block;width:100%;height:100%;object-fit:cover}
.sg-site-ai-card[data-kind="team"] .sg-site-ai-card-media img,.sg-site-ai-card[data-kind="competition"] .sg-site-ai-card-media img{object-fit:contain;padding:8px;background:rgba(255,255,255,.02)}
.sg-site-ai-card-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font:800 18px/1 Manrope,system-ui,sans-serif;color:#fff;background:linear-gradient(135deg,#264c76,#7d3d7d)}
.sg-site-ai-card-copy{display:flex;flex-direction:column;min-width:0;gap:2px;flex:1 1 auto}
.sg-site-ai-card-label{display:block;font-size:10px;line-height:1.2;letter-spacing:.12em;text-transform:uppercase;color:#9db2cc;font-weight:800}
.sg-site-ai-card-title{display:block;font-size:14px;line-height:1.35;color:#fff;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-site-ai-card-subtitle,.sg-site-ai-card-meta{display:block;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-site-ai-card-subtitle{font-size:12px;color:#d5e2f4}
.sg-site-ai-card-meta{font-size:10.5px;color:#94a6bb}
.sg-site-ai-card-chevron{display:flex;align-items:center;justify-content:center;flex:0 0 18px;color:#9fbbe0;font:700 24px/1 system-ui}
@media(max-width:640px){
  .sg-site-ai-card{padding:11px 12px;border-radius:16px}
  .sg-site-ai-card-media{flex-basis:50px;width:50px;height:50px;border-radius:14px}
  .sg-site-ai-card-title{font-size:13px}
}


/* SerieAGoal AI v0.80 - compact white Claude glyph + AI label.
   Constrained to the existing header icon slot: no added column, no badge. */
.sg-topbar .sg-top-actions > button.sg-site-ai-trigger.sg-site-ai-trigger--labeled.sg-top-icon{
  display:inline-flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  flex:0 0 36px!important;
  width:36px!important;min-width:36px!important;max-width:36px!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  margin:0!important;
  padding:2px 0!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#fff!important;
  line-height:1!important;
  vertical-align:middle!important;
}
.sg-topbar .sg-top-actions > button.sg-site-ai-trigger.sg-site-ai-trigger--labeled.sg-top-icon > img{
  display:block!important;
  flex:0 0 19px!important;
  width:19px!important;height:19px!important;
  min-width:19px!important;max-width:19px!important;
  min-height:19px!important;max-height:19px!important;
  margin:0 auto!important;
  padding:0!important;
  object-fit:contain!important;
  filter:none!important;
}
.sg-topbar .sg-top-actions > button.sg-site-ai-trigger.sg-site-ai-trigger--labeled.sg-top-icon > .sg-site-ai-trigger-label{
  display:block!important;
  flex:0 0 auto!important;
  width:auto!important;
  height:auto!important;
  margin:1px 0 0!important;
  padding:0!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:transparent!important;
  font:800 9px/10px Manrope,Inter,system-ui,sans-serif!important;
  letter-spacing:.055em!important;
  text-align:center!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  pointer-events:none!important;
}
.sg-topbar .sg-top-actions > button.sg-site-ai-trigger.sg-site-ai-trigger--labeled.sg-top-icon:is(:hover,:focus-visible),
.sg-topbar .sg-top-actions > button.sg-site-ai-trigger.sg-site-ai-trigger--labeled.sg-top-icon[aria-expanded="true"]{
  background:rgba(255,255,255,.08)!important;
}
@media(max-width:760px){
  .sg-topbar .sg-top-actions > button.sg-site-ai-trigger.sg-site-ai-trigger--labeled.sg-top-icon{
    display:inline-flex!important;
    flex:0 0 36px!important;
    width:36px!important;min-width:36px!important;max-width:36px!important;
    height:36px!important;min-height:36px!important;max-height:36px!important;
    padding:2px 0!important;
  }
}
@media(max-width:360px){
  .sg-topbar .sg-top-actions > button.sg-site-ai-trigger.sg-site-ai-trigger--labeled.sg-top-icon{
    flex-basis:34px!important;
    width:34px!important;min-width:34px!important;max-width:34px!important;
  }
}

/* SerieAGoal AI v0.81: typewriter animation cursor. */
.sg-site-ai-message.is-typing::after{
  content:"";display:inline-block;width:2px;height:1em;margin-left:3px;
  background:#8ecbff;vertical-align:-.15em;animation:sgAITypeCursor081 .75s steps(1,end) infinite;
}
@keyframes sgAITypeCursor081{0%,45%{opacity:1}46%,100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.sg-site-ai-message.is-typing::after{animation:none;display:none}}

/* SerieAGoal AI v0.84 — day/night styling aligned with site theme. */
html[data-sg-theme="dark"] .sg-site-ai-overlay{background:rgba(6,14,30,.56)!important}
html[data-sg-theme="light"] .sg-site-ai-overlay{background:rgba(20,36,68,.18)!important}

html[data-sg-theme="dark"] .sg-site-ai-drawer{
  background:linear-gradient(180deg,#0f1826 0%,#0d1521 100%)!important;
  color:#edf4ff!important;
  border-left:1px solid rgba(126,163,219,.18)!important;
  box-shadow:-18px 0 60px rgba(2,10,24,.44)!important;
}
html[data-sg-theme="dark"] .sg-site-ai-head{
  background:linear-gradient(180deg,#121d2d 0%,#101827 100%)!important;
  border-bottom:1px solid #273246!important;
}
html[data-sg-theme="dark"] .sg-site-ai-brand{background:rgba(217,119,87,.14)!important;border-color:rgba(217,119,87,.30)!important}
html[data-sg-theme="dark"] .sg-site-ai-heading small{color:#9db2cf!important}
html[data-sg-theme="dark"] .sg-site-ai-heading strong{color:#f5f8ff!important}
html[data-sg-theme="dark"] .sg-site-ai-close{background:#172132!important;border-color:#2d3b53!important;color:#eff4ff!important}
html[data-sg-theme="dark"] .sg-site-ai-close:hover{background:#1f2d44!important}
html[data-sg-theme="dark"] .sg-site-ai-notice{background:#151f31!important;border-bottom:1px solid #25314a!important;color:#b7c7dc!important}
html[data-sg-theme="dark"] .sg-site-ai-message{background:#182232!important;border-color:#283752!important;color:#eef5ff!important;box-shadow:0 8px 22px rgba(0,0,0,.16)!important}
html[data-sg-theme="dark"] .sg-site-ai-message.is-user{background:linear-gradient(180deg,#0b5fc6 0%,#044aa0 100%)!important;border-color:#2478d4!important;color:#fff!important}
html[data-sg-theme="dark"] .sg-site-ai-message.is-error{background:#38212a!important;border-color:#784455!important;color:#ffd4da!important}
html[data-sg-theme="dark"] .sg-site-ai-suggestions button{background:#151f31!important;border-color:#29364e!important;color:#edf4ff!important}
html[data-sg-theme="dark"] .sg-site-ai-suggestions button:hover{background:#1b2940!important;border-color:#47658d!important}
html[data-sg-theme="dark"] .sg-site-ai-sources a{background:#14243a!important;border-color:#34557c!important;color:#a8d5ff!important}
html[data-sg-theme="dark"] .sg-site-ai-sources a:hover{background:#1a314d!important;color:#fff!important}
html[data-sg-theme="dark"] .sg-site-ai-composer{background:#101827!important;border-top:1px solid #273246!important}
html[data-sg-theme="dark"] .sg-site-ai-composer textarea{background:#172131!important;border-color:#33445f!important;color:#eff4ff!important}
html[data-sg-theme="dark"] .sg-site-ai-composer textarea:focus{border-color:#5ea2ff!important;box-shadow:0 0 0 3px rgba(94,162,255,.12)!important}
html[data-sg-theme="dark"] .sg-site-ai-composer textarea::placeholder{color:#90a2bb!important}
html[data-sg-theme="dark"] .sg-site-ai-composer button{background:linear-gradient(180deg,#d44a73 0%,#b13358 100%)!important}
html[data-sg-theme="dark"] .sg-site-ai-foot{background:#101827!important;color:#8ea0b8!important}
html[data-sg-theme="dark"] .sg-site-ai-status[data-state="connected"]{color:#8de0b9!important}

html[data-sg-theme="dark"] .sg-site-ai-card{border-color:#2b4467!important;background:linear-gradient(180deg,#16253a 0%,#0f1b2b 100%)!important;color:#eef5ff!important}
html[data-sg-theme="dark"] .sg-site-ai-card:hover{border-color:#4e78a7!important;background:linear-gradient(180deg,#1b2d45 0%,#132133 100%)!important}
html[data-sg-theme="dark"] .sg-site-ai-card[data-kind="player"]{border-color:#394d71!important;background:linear-gradient(180deg,#1a2434 0%,#151d29 100%)!important}
html[data-sg-theme="dark"] .sg-site-ai-card[data-kind="team"]{border-color:#1f5b85!important;background:linear-gradient(180deg,#11293e 0%,#0f2030 100%)!important}
html[data-sg-theme="dark"] .sg-site-ai-card[data-kind="competition"]{border-color:#624285!important;background:linear-gradient(180deg,#241934 0%,#1a1526 100%)!important}
html[data-sg-theme="dark"] .sg-site-ai-card-media{background:rgba(255,255,255,.05)!important;border-color:rgba(255,255,255,.12)!important}
html[data-sg-theme="dark"] .sg-site-ai-card-label{color:#9fb7d7!important}
html[data-sg-theme="dark"] .sg-site-ai-card-title{color:#fff!important}
html[data-sg-theme="dark"] .sg-site-ai-card-subtitle{color:#d9e7f8!important}
html[data-sg-theme="dark"] .sg-site-ai-card-meta{color:#98aec8!important}
html[data-sg-theme="dark"] .sg-site-ai-card-chevron{color:#9fc0eb!important}

html[data-sg-theme="light"] .sg-site-ai-drawer{
  background:linear-gradient(180deg,#fbfdff 0%,#f3f7fd 100%)!important;
  color:#152339!important;
  border-left:1px solid #cfdcf0!important;
  box-shadow:-20px 0 48px rgba(12,34,71,.16)!important;
}
html[data-sg-theme="light"] .sg-site-ai-head{
  background:linear-gradient(180deg,#ffffff 0%,#f5f9ff 100%)!important;
  border-bottom:1px solid #d6e1f0!important;
}
html[data-sg-theme="light"] .sg-site-ai-brand{background:#fff3ef!important;border-color:#f0c4b7!important;box-shadow:0 8px 18px rgba(217,119,87,.10)!important}
html[data-sg-theme="light"] .sg-site-ai-heading small{color:#6880a1!important}
html[data-sg-theme="light"] .sg-site-ai-heading strong{color:#12233d!important}
html[data-sg-theme="light"] .sg-site-ai-close{background:#ffffff!important;border-color:#d1ddee!important;color:#39506f!important;box-shadow:0 4px 12px rgba(26,52,92,.08)!important}
html[data-sg-theme="light"] .sg-site-ai-close:hover{background:#eef4fc!important}
html[data-sg-theme="light"] .sg-site-ai-notice{background:#f6f9ff!important;border-bottom:1px solid #d6e1f0!important;color:#5b6f8a!important}
html[data-sg-theme="light"] .sg-site-ai-messages{scrollbar-color:#b9cce4 transparent!important}
html[data-sg-theme="light"] .sg-site-ai-message{background:#ffffff!important;border-color:#d8e3f0!important;color:#152339!important;box-shadow:0 10px 22px rgba(19,46,86,.07)!important}
html[data-sg-theme="light"] .sg-site-ai-message.is-user{background:linear-gradient(180deg,#0c63c8 0%,#0a56ab 100%)!important;border-color:#1e73d2!important;color:#fff!important;box-shadow:0 10px 24px rgba(10,86,171,.18)!important}
html[data-sg-theme="light"] .sg-site-ai-message.is-error{background:#fff2f4!important;border-color:#efc1ca!important;color:#8b2f45!important}
html[data-sg-theme="light"] .sg-site-ai-message.is-pending{color:#69819f!important}
html[data-sg-theme="light"] .sg-site-ai-suggestions button{background:#ffffff!important;border-color:#d9e3f0!important;color:#19304f!important;box-shadow:0 6px 16px rgba(14,43,84,.04)!important}
html[data-sg-theme="light"] .sg-site-ai-suggestions button:hover{background:#edf4ff!important;border-color:#adc7ec!important}
html[data-sg-theme="light"] .sg-site-ai-sources a{background:#edf5ff!important;border-color:#bfd4ef!important;color:#0e4f9d!important}
html[data-sg-theme="light"] .sg-site-ai-sources a:hover{background:#dfeeff!important;color:#093f81!important}
html[data-sg-theme="light"] .sg-site-ai-composer{background:#f7faff!important;border-top:1px solid #d6e1f0!important}
html[data-sg-theme="light"] .sg-site-ai-composer textarea{background:#fff!important;border-color:#ccd8ea!important;color:#152339!important;box-shadow:0 4px 12px rgba(16,42,80,.04)!important}
html[data-sg-theme="light"] .sg-site-ai-composer textarea:focus{border-color:#5d94d6!important;box-shadow:0 0 0 3px rgba(93,148,214,.14)!important}
html[data-sg-theme="light"] .sg-site-ai-composer textarea::placeholder{color:#7e91ab!important}
html[data-sg-theme="light"] .sg-site-ai-composer button{background:linear-gradient(180deg,#cc416a 0%,#af2f54 100%)!important;color:#fff!important;box-shadow:0 10px 22px rgba(175,47,84,.22)!important}
html[data-sg-theme="light"] .sg-site-ai-foot{background:#f7faff!important;color:#6d7f98!important}
html[data-sg-theme="light"] .sg-site-ai-status{color:#7288a6!important}
html[data-sg-theme="light"] .sg-site-ai-status>i{background:#8ea2bf!important}
html[data-sg-theme="light"] .sg-site-ai-status[data-state="connected"]{color:#19945f!important}
html[data-sg-theme="light"] .sg-site-ai-status[data-state="connected"]>i{background:#1ab36f;box-shadow:0 0 0 3px rgba(26,179,111,.14)!important}
html[data-sg-theme="light"] .sg-site-ai-status[data-state="error"]{color:#b24a63!important}
html[data-sg-theme="light"] .sg-site-ai-status[data-state="error"]>i{background:#cb5d79!important}
html[data-sg-theme="light"] .sg-site-ai-message.is-assistant strong{color:#0c2443!important}
html[data-sg-theme="light"] .sg-site-ai-message.is-typing::after{background:#3c6ea9!important}

html[data-sg-theme="light"] .sg-site-ai-card{border-color:#d9e4f2!important;background:linear-gradient(180deg,#ffffff 0%,#f6faff 100%)!important;color:#12233d!important;box-shadow:0 12px 28px rgba(17,47,90,.08)!important}
html[data-sg-theme="light"] .sg-site-ai-card:hover{border-color:#a9c4e8!important;background:linear-gradient(180deg,#ffffff 0%,#eef5ff 100%)!important}
html[data-sg-theme="light"] .sg-site-ai-card[data-kind="player"]{border-color:#d8dfee!important;background:linear-gradient(180deg,#ffffff 0%,#f7f9fc 100%)!important}
html[data-sg-theme="light"] .sg-site-ai-card[data-kind="team"]{border-color:#bfd8ee!important;background:linear-gradient(180deg,#ffffff 0%,#eff8ff 100%)!important}
html[data-sg-theme="light"] .sg-site-ai-card[data-kind="competition"]{border-color:#d9cbed!important;background:linear-gradient(180deg,#ffffff 0%,#f8f2ff 100%)!important}
html[data-sg-theme="light"] .sg-site-ai-card-media{background:#f5f8fc!important;border-color:#d8e1ec!important}
html[data-sg-theme="light"] .sg-site-ai-card[data-kind="team"] .sg-site-ai-card-media img,
html[data-sg-theme="light"] .sg-site-ai-card[data-kind="competition"] .sg-site-ai-card-media img{background:rgba(255,255,255,.82)!important}
html[data-sg-theme="light"] .sg-site-ai-card-label{color:#6880a1!important}
html[data-sg-theme="light"] .sg-site-ai-card-title{color:#12233d!important}
html[data-sg-theme="light"] .sg-site-ai-card-subtitle{color:#34506f!important}
html[data-sg-theme="light"] .sg-site-ai-card-meta{color:#6c7f97!important}
html[data-sg-theme="light"] .sg-site-ai-card-chevron{color:#5f87ba!important}

@media(max-width:640px){
  html[data-sg-theme="light"] .sg-site-ai-drawer{background:#f7faff!important}
  html[data-sg-theme="dark"] .sg-site-ai-drawer{background:#0d1521!important}
}

/* v0.87: collegamento contestuale nella risposta, URL mai in chiaro. */
.sg-site-ai-message .sg-site-ai-quicklink{
  display:block;margin:13px 0 0!important;padding:11px 0 0!important;
  border-top:1px solid rgba(127,157,192,.25);font-size:12px!important;
  line-height:1.55!important;white-space:normal!important;
}
.sg-site-ai-message .sg-site-ai-quicklink a{
  font:800 12px/1.5 Manrope,Inter,system-ui,sans-serif!important;
  color:#72bdff!important;text-decoration:underline!important;text-underline-offset:3px!important;
  border-radius:3px!important;
}
.sg-site-ai-message .sg-site-ai-quicklink a:focus-visible{
  outline:2px solid currentColor!important;outline-offset:3px!important;
}
html[data-sg-theme="light"] .sg-site-ai-message .sg-site-ai-quicklink{
  border-top-color:#d8e5f2!important;color:#385372!important;
}
html[data-sg-theme="light"] .sg-site-ai-message .sg-site-ai-quicklink a{
  color:#075db9!important;
}
html[data-sg-theme="dark"] .sg-site-ai-message .sg-site-ai-quicklink{
  border-top-color:#334863!important;color:#c8d9ec!important;
}
