body.site-cms .cms-page-article.case-chat { padding:24px; border:0; background:transparent; --cms-surface-soft:var(--background); }
.cms-page-shell > .case-chat { margin-top:32px; margin-inline:auto; }
.case-chat__header { display:flex; align-items:center; gap:12px; margin-bottom:24px; }
.cms-ui .case-chat .case-chat__header .case-chat__title { flex:1; min-width:0; margin:0; }
.case-chat .case-chat__tool { display:flex; align-items:center; justify-content:center; flex:none; width:40px; height:40px; padding:8px; border:0; border-radius:8px; color:var(--muted-foreground); background:transparent; cursor:pointer; }
.case-chat .case-chat__tool:hover { background:color-mix(in srgb,var(--foreground) 7%,transparent); color:var(--foreground); }
.case-chat__tool svg { display:block; width:20px; height:20px; }
.case-chat .case-chat__sidebar-toggle,.case-chat .case-chat__sidebar-close,.case-chat__sidebar-backdrop,.case-chat__collapse-icon { display:none; }
.case-chat.is-fullscreen .case-chat__expand-icon { display:none; }
.case-chat.is-fullscreen .case-chat__collapse-icon { display:block; }
.case-chat__toprow { display:flex; align-items:flex-end; gap:16px; min-width:0; position:relative; z-index:1; margin-bottom:-1px; }
.case-chat__toprow:has(.case-chat__tabs>li:first-child.active,.case-chat__tabs>li:first-child>a:is(:hover,:focus,:focus-visible)) + .cms-admin-tab-panel { border-top-left-radius:0; }
.cms-ui .case-chat .case-chat__title { margin:0 0 24px; font-size:24px; line-height:1.3; font-weight:600; overflow-wrap:anywhere; }
.cms-ui .case-chat .case-chat__order { display:flex; align-items:center; gap:8px; flex:none; min-height:36px; color:var(--muted-foreground); font-size:12px; line-height:1.5; text-decoration:none; }
.cms-ui .case-chat .case-chat__order:hover { color:var(--foreground); }
.case-chat__order-icon { display:block; flex:none; width:18px; height:18px; background-color:currentColor; -webkit-mask:url('/content/themes/neurotsifra/assets/media/experience-work.svg') center/contain no-repeat; mask:url('/content/themes/neurotsifra/assets/media/experience-work.svg') center/contain no-repeat; }
.cms-ui .case-chat .case-chat__tabs { flex:1; min-width:0; margin:0; padding-left:0; list-style:none; }
.cms-ui .case-chat .case-chat__tabs > li { display:block; margin:0; padding:0; list-style:none; }
.cms-ui .case-chat .case-chat__tabs > li::before { content:none; display:none; }
.case-chat .case-chat__tabs > li > a { display:flex; align-items:center; gap:5px; padding:8px; font-size:12px; max-width:160px; }
.case-chat__tabs svg { display:block; width:14px; height:14px; flex:none; }
.case-chat__tabs a > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cms-ui .case-chat .case-chat__tabs:has(> li:nth-child(2):last-child) > li:first-child { flex:0 1 auto; min-width:0; max-width:160px; }
.case-chat .case-chat__tabs:has(> li:nth-child(2):last-child) > li:first-child > a { max-width:100%; }
.case-chat__tabs a[aria-disabled="true"] { cursor:wait; }
.case-chat__messages { display:flex; flex-direction:column; gap:24px; min-height:280px; height:360px; max-height:60svh; overflow:auto; scrollbar-width:thin; padding:24px; margin-top:10px; }
.case-chat .case-chat__messages {
  --chat-fade-top:0px; --chat-fade-bottom:0px;
  --chat-mask:linear-gradient(to bottom,transparent,rgba(0,0,0,.08) calc(var(--chat-fade-top)*.2),rgba(0,0,0,.3) calc(var(--chat-fade-top)*.45),rgba(0,0,0,.65) calc(var(--chat-fade-top)*.7),#000 var(--chat-fade-top),#000 calc(100% - var(--chat-fade-bottom)),rgba(0,0,0,.65) calc(100% - var(--chat-fade-bottom)*.7),rgba(0,0,0,.3) calc(100% - var(--chat-fade-bottom)*.45),rgba(0,0,0,.08) calc(100% - var(--chat-fade-bottom)*.2),transparent);
  scrollbar-color:transparent transparent; scroll-padding-block:96px; -webkit-mask-image:var(--chat-mask); mask-image:var(--chat-mask);
}
.case-chat .case-chat__messages.has-earlier { --chat-fade-top:96px; }
.case-chat .case-chat__messages.has-later { --chat-fade-bottom:96px; }
.case-chat .case-chat__messages.is-scrolling { scrollbar-color:var(--cms-scrollbar-thumb) transparent; }
.case-chat .case-chat__messages::-webkit-scrollbar-thumb { background:transparent; }
.case-chat .case-chat__messages.is-scrolling::-webkit-scrollbar-thumb { background:var(--cms-scrollbar-thumb); }
.case-chat__message { flex-shrink:0; max-width:88%; margin:0; color:var(--foreground); white-space:pre-wrap; overflow-wrap:anywhere; font-size:15px; line-height:1.7; }
.case-chat__message--user { align-self:flex-end; max-width:80%; padding:12px 16px; border-radius:16px 16px 4px 16px; background:color-mix(in srgb,var(--foreground) 7%,var(--background)); }
.case-chat__message strong { font-weight:700; }
.case-chat__message code { font-family:monospace; font-size:.94em; }
.case-chat__author { display:block; margin-bottom:6px; color:var(--muted-foreground); font-size:12px; font-weight:500; }
.case-chat__message--user .case-chat__author { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.case-chat__buttons { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; white-space:normal; }
.case-chat__choice { border:1px solid color-mix(in srgb,var(--foreground) 20%,transparent); border-radius:8px; padding:8px 12px; background:var(--background); color:var(--foreground); font:inherit; font-size:14px; text-decoration:none; cursor:pointer; }
.case-chat__choice:hover:not(:disabled) { border-color:var(--brand); }
.case-chat__older { align-self:center; flex-shrink:0; }
.case-chat__cover { display:block; max-width:100%; max-height:200px; object-fit:contain; margin-top:12px; }
.case-chat__status { min-height:20px; margin:0; padding:0 24px; color:var(--muted-foreground); font-size:13px; line-height:20px; }
.case-chat__alert { padding:12px 16px; margin:8px 24px; border:1px solid color-mix(in srgb,var(--foreground) 25%,transparent); border-radius:8px; color:var(--foreground); background:var(--background); font-size:14px; line-height:1.5; }
.case-chat__alert[hidden] { display:none; }
.case-chat__form { display:flex; align-items:flex-end; gap:8px; padding:6px; margin:12px 24px 24px; border:1px solid color-mix(in srgb,var(--foreground) 20%,transparent); border-radius:16px; background:color-mix(in srgb,var(--foreground) 3%,var(--background)); }
.case-chat__form:has(.case-chat__input:focus) { border-color:var(--brand); }
.case-chat .case-chat__input { flex:1; min-width:0; box-sizing:border-box; height:48px; min-height:48px; max-height:min(240px,30dvh); overflow-y:hidden; resize:none; border:0; border-radius:10px; background:transparent; color:var(--foreground); padding:12px; font:inherit; font-size:15px; line-height:24px; }
.case-chat__input::placeholder { color:var(--muted-foreground); opacity:1; }
.case-chat .case-chat__send { display:flex; align-items:center; justify-content:center; flex-shrink:0; box-sizing:border-box; width:48px; height:48px; border:0; border-radius:12px; padding:0; background:var(--foreground); color:var(--background); cursor:pointer; }
.case-chat .case-chat__send svg { color:inherit; stroke:currentColor; }
.case-chat .case-chat__send:hover:not(:disabled) { background:var(--brand); color:#111; }
.case-chat button:disabled { opacity:.4; cursor:default; }
.case-chat .case-chat__input:focus-visible { outline:none; box-shadow:none; }
.case-chat :is(button,a):focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
@media(max-width:600px) {
  body.site-cms .cms-page-article.case-chat { padding:16px; }
  .case-chat__toprow { gap:8px; flex-wrap:wrap; }
  .cms-ui .case-chat .case-chat__title { font-size:20px; margin-bottom:16px; }
  .cms-ui .case-chat .case-chat__order { order:-1; width:100%; justify-content:flex-end; }
  .cms-ui .case-chat .case-chat__tabs { flex-basis:100%; }
  .case-chat .case-chat__tabs > li > a { max-width:110px; }
  .cms-ui .case-chat .case-chat__tabs:has(> li:nth-child(2):last-child) > li:first-child { max-width:110px; }
  .case-chat__messages { height:340px; min-height:240px; padding:20px 16px; gap:20px; }
  .case-chat__message { max-width:95%; }
  .case-chat__message--user { max-width:88%; }
  .case-chat__status { padding:0 16px; }
  .case-chat__alert { margin:8px 16px; }
  .case-chat__form { margin:12px 12px 16px; gap:4px; }
}
.case-chat-overlay { position:fixed; inset-inline:0; top:var(--chat-viewport-top,0px); height:var(--chat-viewport-height,100dvh); z-index:10000; background:var(--background); }
body.site-cms .cms-page-article.case-chat.is-fullscreen { display:grid; grid-template-columns:248px minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); width:100%; height:100%; max-width:none; margin:0; padding:0; border:0; border-radius:0; background:var(--background); overflow:hidden; }
body.site-cms .cms-page-article.case-chat.is-fullscreen::before { display:none; }
.case-chat.is-fullscreen .case-chat__header { grid-column:2; grid-row:1; margin:0; padding:16px 24px; }
.cms-ui .case-chat.is-fullscreen .case-chat__header .case-chat__title { font-size:18px; }
.case-chat.is-fullscreen .case-chat__toprow { grid-column:1; grid-row:1 / -1; display:flex; align-items:stretch; flex-direction:column; min-height:0; margin:0; padding:16px 12px; gap:12px; background:color-mix(in srgb,var(--foreground) 3%,var(--background)); border-right:1px solid color-mix(in srgb,var(--foreground) 9%,transparent); }
.cms-ui .case-chat.is-fullscreen .case-chat__tabs { display:flex; flex:1; flex-basis:auto; flex-direction:column; align-items:stretch; gap:4px; min-height:0; width:100%; padding:0; margin:0; overflow-y:auto; overflow-x:hidden; border:0; }
.cms-ui .case-chat.is-fullscreen .case-chat__tabs > li,.cms-ui .case-chat.is-fullscreen .case-chat__tabs:has(> li:nth-child(2):last-child) > li:first-child { flex:0 0 auto; max-width:none; }
.cms-ui .case-chat.is-fullscreen .case-chat__tabs > li > a,.cms-ui .case-chat.is-fullscreen .case-chat__tabs:has(> li:nth-child(2):last-child) > li:first-child > a { width:100%; max-width:none; padding:10px 12px; margin:0; border:0; border-radius:8px; color:var(--muted-foreground); background:transparent; font-size:14px; line-height:24px; }
.cms-ui .case-chat.is-fullscreen .case-chat__tabs > li.active > a,.cms-ui .case-chat.is-fullscreen .case-chat__tabs > li > a:hover { background:color-mix(in srgb,var(--foreground) 7%,transparent); color:var(--foreground); }
.cms-ui .case-chat.is-fullscreen .case-chat__order { order:initial; justify-content:flex-start; width:auto; margin:0 8px; }
.cms-ui .case-chat.is-fullscreen > .cms-admin-tab-panel { grid-column:2; grid-row:2; min-width:0; min-height:0; border:0; border-radius:0; background:transparent; }
.case-chat.is-fullscreen > .cms-admin-tab-panel > .tab-pane { display:flex; flex-direction:column; min-width:0; height:100%; min-height:0; }
.case-chat.is-fullscreen .case-chat__messages { flex:1; height:auto; max-height:none; min-height:0; padding:24px max(24px,calc((100% - 820px)/2)); margin-top:10px; overscroll-behavior:contain; }
.case-chat.is-fullscreen .case-chat__message { font-size:16px; }
.case-chat.is-fullscreen .case-chat__form { box-sizing:border-box; flex:none; width:min(820px,calc(100% - 48px)); margin:12px auto max(20px,env(safe-area-inset-bottom)); }
.case-chat.is-fullscreen .case-chat__status { box-sizing:border-box; flex:none; width:min(820px,calc(100% - 48px)); padding:0; margin:0 auto; }
.case-chat.is-fullscreen .case-chat__alert { box-sizing:border-box; flex:none; width:min(820px,calc(100% - 48px)); margin:8px auto; }
.case-chat.is-fullscreen .case-chat__input { max-height:min(240px,calc(var(--chat-viewport-height,100dvh)*.28)); }
@media(max-width:700px) {
  body.site-cms .cms-page-article.case-chat.is-fullscreen { grid-template-columns:minmax(0,1fr); }
  .case-chat.is-fullscreen .case-chat__header { grid-column:1; padding:8px; gap:4px; }
  .cms-ui .case-chat.is-fullscreen .case-chat__header .case-chat__title { font-size:15px; }
  .case-chat.is-fullscreen .case-chat__sidebar-toggle,.case-chat.is-fullscreen .case-chat__sidebar-close { display:flex; }
  .case-chat.is-fullscreen .case-chat__sidebar-close { align-self:flex-end; }
  .case-chat.is-fullscreen .case-chat__toprow { position:absolute; inset-block:0; left:0; width:min(280px,85vw); z-index:4; box-sizing:border-box; background:var(--background); visibility:hidden; transform:translateX(-100%); }
  .case-chat.is-fullscreen.is-sidebar-open .case-chat__toprow { visibility:visible; transform:none; }
  .case-chat.is-fullscreen.is-sidebar-open .case-chat__sidebar-backdrop { display:block; position:absolute; inset:0; z-index:3; padding:0; border:0; background:rgb(0 0 0 / .5); }
  .cms-ui .case-chat.is-fullscreen > .cms-admin-tab-panel { grid-column:1; }
  .case-chat.is-fullscreen .case-chat__messages { padding:20px 16px; }
  .case-chat.is-fullscreen .case-chat__form,.case-chat.is-fullscreen .case-chat__status,.case-chat.is-fullscreen .case-chat__alert { width:calc(100% - 24px); }
  .case-chat.is-fullscreen .case-chat__form { margin-bottom:max(12px,env(safe-area-inset-bottom)); }
}
