@import url("./design-system/tokens.css?v=793d9a2");
@import url("./design-system/adapters/text-page-shell-theme.css?v=793d9a2");
@import url("./design-system/adapters/chat-theme.css?v=793d9a2");
@import url("./design-system/adapters/chat-model-picker-theme.css?v=793d9a2");
@import url("./design-system/adapters/chat-workspace-theme.css?v=793d9a2");
@import url("./design-system/components/chat-model-info-icons-theme.css?v=793d9a2");
@import url("./design-system/adapters/lightbox-theme.css?v=793d9a2");
@import url("./chat-compact-layout.css?v=793d9a2");

/* Text/Chat page shell geometry.
   Route shell visuals: text-page-shell-theme.css.
   Chat visuals: chat-theme.css + chat-model-picker-theme.css + chat-workspace-theme.css. */

html,
body.page-text{
  height:100%;
  margin:0;
  padding:0;
  overflow:hidden
}

body.page-text{
  display:flex;
  flex-direction:column
}

body.page-text #app{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden
}

body.page-text .shell{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
  padding-bottom:0!important
}

body.page-text #chatRoot{
  flex:1;
  min-height:0;
  overflow:hidden
}

/* Like tg/text-page.css: the chat owns viewport height and internal scrolling.
   Override aidc-scroll's document-scroll rule for ordinary narrow web pages. */
@media (max-width: 1200px) {
  html:has(body.page-text) { height: 100%; overflow: hidden !important; }
  body.page-text { height: 100dvh !important; min-height: 0 !important; display: flex !important; overflow: hidden !important; }
  body.page-text #app,
  body.page-text #app > .shell { height: 100% !important; min-height: 0 !important; overflow: hidden !important; }
  body.page-text #chatRoot { min-width: 0; }
  body.page-text .chat-main { min-height: 0; }
}

body.page-text .site-footer,
body.page-text footer,
body.page-text .footer,
body.page-text #app > [data-include*="footer"],
body.page-text #app > footer{
  display:none!important
}

/* Canonical Text module can be embedded by first-party product surfaces.
   Only the outer site chrome is removed; the chat DOM, controls, styling and
   runtime remain exactly the same as /text/. */
html[data-aidc-chat-embedded="true"],
html[data-aidc-chat-embedded="true"] body.page-text{
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden!important;
  background:var(--aidc-bg-page, var(--bg));
}

html[data-aidc-chat-embedded="true"] body.page-text #app,
html[data-aidc-chat-embedded="true"] body.page-text .shell,
html[data-aidc-chat-embedded="true"] body.page-text #chatRoot{
  width:100%;
  height:100%;
  min-height:0;
}

html[data-aidc-chat-embedded="true"] body.page-text .shell > [data-include*="/components/header.html"],
html[data-aidc-chat-embedded="true"] body.page-text .site-header{
  display:none!important;
}

html[data-aidc-chat-embedded="true"] body.page-text #chatRoot{
  flex:1 1 100%;
}

/* Embedded Text uses an overlay history/projects drawer instead of permanently
   consuming chat width. The same canonical sidebar remains intact; only its
   presentation changes for first-party embedded agent surfaces. */
html[data-aidc-chat-embedded="true"] body.page-text .chat-container{
  position:relative!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-main{
  width:100%!important;
  min-width:0!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-sidebar{
  position:fixed!important;
  top:0!important;
  right:auto!important;
  bottom:0!important;
  left:0!important;
  width:min(340px,86vw)!important;
  min-width:0!important;
  max-width:min(340px,86vw)!important;
  height:100dvh!important;
  max-height:100dvh!important;
  z-index:2200!important;
  transform:translate3d(-102%,0,0)!important;
  transition:transform .18s ease!important;
  border-right:1px solid var(--aidc-border-default)!important;
  box-shadow:none!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-sidebar.chat-sidebar--open{
  transform:translate3d(0,0,0)!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-sidebar__resizer{
  display:none!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-sidebar__close-btn{
  display:inline-flex!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-mobile-menu-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  flex:0 0 auto!important;
  min-width:0!important;
  min-height:34px!important;
  padding:0 10px!important;
  border:1px solid var(--aidc-border-default)!important;
  border-radius:var(--aidc-radius-control,10px)!important;
  background:var(--aidc-btn-secondary-bg)!important;
  color:var(--aidc-text-secondary)!important;
  font:inherit!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1!important;
  cursor:pointer!important;
}
html[data-aidc-chat-embedded="true"] body.page-text .chat-mobile-menu-btn:hover,
html[data-aidc-chat-embedded="true"] body.page-text .chat-mobile-menu-btn:focus-visible{
  background:var(--aidc-btn-secondary-bg-hover)!important;
  color:var(--aidc-text-primary)!important;
}
html[data-aidc-chat-embedded="true"] body.page-text .chat-mobile-menu-btn svg{
  width:16px!important;
  height:16px!important;
  flex:0 0 auto!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-sidebar-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:2100!important;
  background:color-mix(in srgb,var(--aidc-backdrop) 62%,transparent)!important;
  display:none!important;
}

html[data-aidc-chat-embedded="true"] body.page-text .chat-sidebar-backdrop.open{
  display:block!important;
}

/* Accessibility announcements must never become visible layout content. */
body.page-text .chat-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;
}

/* The outer Autoposting page already owns platform help/knowledge launchers.
   Do not render duplicate global floaters inside the embedded Text iframe. */
html[data-aidc-chat-embedded="true"] body.page-text .aidc-support,
html[data-aidc-chat-embedded="true"] body.page-text .aidc-ks-fab{
  display:none!important;
}

