/* PanelAiBot v2.8.28 hotfix — smart assistant live preview + dark alerts + Fire bilingual templates */

/* Dark-mode success/error banners: keep the classic layout, remove the light flash block. */
html[data-resolved-theme="dark"] body.v280-shell .alert,
html[data-resolved-theme="dark"] body.redesign-v290 .alert{
  background:#0d1d2e!important;
  border-color:#29425d!important;
  color:#e8f1fb!important;
  box-shadow:0 10px 28px rgba(0,0,0,.18)!important;
}
html[data-resolved-theme="dark"] body.v280-shell .alert strong,
html[data-resolved-theme="dark"] body.v280-shell .alert p,
html[data-resolved-theme="dark"] body.redesign-v290 .alert strong,
html[data-resolved-theme="dark"] body.redesign-v290 .alert p{color:inherit!important}
html[data-resolved-theme="dark"] body.v280-shell .alert-success,
html[data-resolved-theme="dark"] body.redesign-v290 .alert-success{
  background:linear-gradient(180deg,#0c2828,#0b2028)!important;
  border-color:rgba(53,214,160,.38)!important;
  color:#c9ffec!important;
}
html[data-resolved-theme="dark"] body.v280-shell .alert-success>span,
html[data-resolved-theme="dark"] body.redesign-v290 .alert-success>span{
  background:rgba(53,214,160,.15)!important;
  color:#72e8bc!important;
}
html[data-resolved-theme="dark"] body.v280-shell .alert-error,
html[data-resolved-theme="dark"] body.redesign-v290 .alert-error{
  background:linear-gradient(180deg,#2a1720,#211520)!important;
  border-color:rgba(255,103,126,.4)!important;
  color:#ffd7df!important;
}
html[data-resolved-theme="dark"] body.v280-shell .alert-error>span,
html[data-resolved-theme="dark"] body.redesign-v290 .alert-error>span{
  background:rgba(255,103,126,.16)!important;
  color:#ff9bad!important;
}

/* Smart Assistant design controls */
body.redesign-v290.route-smart-assistant .assistant2828-appearance-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.redesign-v290.route-smart-assistant .assistant2828-appearance-grid>.assistant2828-wide{grid-column:1/-1!important}
body.redesign-v290.route-smart-assistant .assistant2828-gradient{min-height:43px!important;align-self:end!important}
body.redesign-v290.route-smart-assistant .assistant2828-image-upload input[type="file"]{padding:7px!important;cursor:pointer}

/* Live preview: these rules intentionally beat v293's fixed !important sizes/positions. */
body.redesign-v290.route-smart-assistant .assistant2828-preview{
  --assistant-header-bg:linear-gradient(135deg,var(--assistant-primary,#10b981),var(--assistant-secondary,#6366f1));
  --assistant-chat-bg:#f8fafc;
  --assistant-chat-text:#172033;
  --assistant-border-width:1px;
  --assistant-border-color:#dfe7f2;
  --assistant-border-radius:24px;
  --assistant-launcher-size:60px;
  --assistant-launcher-font-size:22px;
  --assistant-launcher-radius:19px;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat{
  border-width:var(--assistant-border-width)!important;
  border-style:solid!important;
  border-color:var(--assistant-border-color)!important;
  border-radius:var(--assistant-border-radius)!important;
  color:var(--assistant-chat-text)!important;
  overflow:hidden!important;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat>header{
  background:var(--assistant-header-bg)!important;
  color:#fff!important;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat>main{
  background:var(--assistant-chat-bg)!important;
  color:var(--assistant-chat-text)!important;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat>main :where(.language-preview,.bot,.quick-preview span){color:inherit!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat>main .language-preview{
  background:color-mix(in srgb,var(--assistant-chat-bg) 92%,#6576ff 8%)!important;
  border-color:color-mix(in srgb,var(--assistant-chat-text) 16%,transparent)!important;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat>main .language-preview button,
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat>main .quick-preview span{
  background:color-mix(in srgb,var(--assistant-chat-bg) 94%,var(--assistant-chat-text) 6%)!important;
  border-color:color-mix(in srgb,var(--assistant-chat-text) 16%,transparent)!important;
  color:var(--assistant-chat-text)!important;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-chat>main .bot{
  background:color-mix(in srgb,var(--assistant-chat-bg) 91%,var(--assistant-primary) 9%)!important;
  border-color:color-mix(in srgb,var(--assistant-chat-text) 15%,transparent)!important;
  color:var(--assistant-chat-text)!important;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-launcher{
  width:var(--assistant-launcher-size)!important;
  height:var(--assistant-launcher-size)!important;
  min-width:var(--assistant-launcher-size)!important;
  font-size:var(--assistant-launcher-font-size)!important;
  border-radius:var(--assistant-launcher-radius)!important;
  background:var(--assistant-header-bg)!important;
  overflow:hidden!important;
  padding:0!important;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-launcher img,
body.redesign-v290.route-smart-assistant .assistant2828-preview-logo img{
  width:100%!important;height:100%!important;object-fit:cover!important;display:block;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview-launcher img[hidden],
body.redesign-v290.route-smart-assistant .assistant2828-preview-logo img[hidden]{display:none!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview-logo{
  width:32px;height:32px;display:grid;place-items:center;overflow:hidden;border-radius:11px;
  background:rgba(255,255,255,.16);color:#fff;
}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-position="bottom_right"] .assistant2828-preview-launcher{right:12px!important;left:auto!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-position="bottom_left"] .assistant2828-preview-launcher{left:12px!important;right:auto!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-position="bottom_right"] .assistant2828-preview-chat{right:12px!important;left:auto!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-position="bottom_left"] .assistant2828-preview-chat{left:12px!important;right:auto!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-style="compact"] .assistant2828-preview-chat{height:350px!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-style="rounded"] .assistant2828-preview-chat{border-radius:max(30px,var(--assistant-border-radius))!important}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-style="glass"] .assistant2828-preview-chat>main{backdrop-filter:blur(13px);-webkit-backdrop-filter:blur(13px)}
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-style="minimal"] .assistant2828-preview-chat header i:nth-of-type(2),
body.redesign-v290.route-smart-assistant .assistant2828-preview[data-style="minimal"] .assistant2828-preview-chat header i:nth-of-type(3){display:none!important}

/* Auto Publish currency + bilingual message templates. */
body.redesign-v290.route-auto-publish .fire2828-currency-example{
  display:grid;align-content:center;gap:5px;padding:12px 14px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface-2);
}
body.redesign-v290.route-auto-publish .fire2828-currency-example small{color:var(--ui-muted)}
body.redesign-v290.route-auto-publish .fire2828-currency-example strong{font-size:16px}
body.redesign-v290.route-auto-publish .fire2828-lang-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body.redesign-v290.route-auto-publish .fire2828-template-list{display:grid;gap:12px;margin-top:12px}
body.redesign-v290.route-auto-publish .fire2828-template-pair{
  display:grid;gap:11px;padding:14px;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-surface-2);
}
body.redesign-v290.route-auto-publish .fire2828-template-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
body.redesign-v290.route-auto-publish .fire2828-template-pair textarea{min-height:118px!important}
html[data-resolved-theme="dark"] body.redesign-v290.route-auto-publish :where(.fire2828-template-pair,.fire2828-currency-example){background:#0e1d2e!important;border-color:#21364e!important}

@media(max-width:980px){
  body.redesign-v290.route-smart-assistant .assistant2828-appearance-grid,
  body.redesign-v290.route-auto-publish .fire2828-lang-grid{grid-template-columns:1fr!important}
}
@media(max-width:760px){
  body.redesign-v290.route-smart-assistant .assistant2828-preview-launcher{
    width:var(--assistant-launcher-size)!important;height:var(--assistant-launcher-size)!important;min-width:var(--assistant-launcher-size)!important;font-size:var(--assistant-launcher-font-size)!important;
  }
  body.redesign-v290.route-smart-assistant .assistant2828-preview[data-position="bottom_left"] .assistant2828-preview-launcher{left:12px!important;right:auto!important}
  body.redesign-v290.route-smart-assistant .assistant2828-preview[data-position="bottom_right"] .assistant2828-preview-launcher{right:12px!important;left:auto!important}
  /* Keep the chat itself full-width on phones; launcher position still previews left/right. */
  body.redesign-v290.route-smart-assistant .assistant2828-preview-chat{left:10px!important;right:10px!important;width:auto!important}
}
