/* KOVRA IA exclusive chat windows · Préstamos and Negocios
 * Do not alter the shared navigation or theme definitions. The chat view
 * itself owns its scrollable transcript; everything else stays outside it.
 */

/* Préstamos: mas.html?view=support is a complete chat screen, not a card
   followed by customer-service widgets and the six-tab navigation. */
html:has(body.kovra-chat-exclusive-loans),
body.kovra-chat-exclusive-loans {
  height:100%!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans {
  padding:0!important;
  margin:0!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans > nav.bottom-nav,
body.kovra-more-support-view.kovra-chat-exclusive-loans > .quick-menu {
  display:none!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans > .app {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:900px!important;
  min-height:0!important;
  height:var(--kovra-exclusive-usable-height,100dvh)!important;
  max-height:var(--kovra-exclusive-usable-height,100dvh)!important;
  margin:0 auto!important;
  padding:max(8px,env(safe-area-inset-top,0px)) 8px max(8px,env(safe-area-inset-bottom,0px))!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
html.kovra-ios-installed body.kovra-more-support-view.kovra-chat-exclusive-loans > .app {
  height:var(--kovra-exclusive-usable-height,100vh)!important;
  max-height:var(--kovra-exclusive-usable-height,100vh)!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans > .app > :not(#kovraSubviewHeader):not(.menu-card) {
  display:none!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans .kovra-subview-header {
  flex:0 0 auto!important;
  margin:0 0 7px!important;
  padding:4px 3px!important;
  min-height:45px!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans .kovra-subview-title strong {
  font-size:17px!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans > .app > .menu-card {
  flex:1 1 0!important;
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans .kovra-support-layout {
  flex:1 1 0!important;
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  width:100%!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
}
html body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot],
html.kovra-support-web-runtime body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] {
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  transform:none!important;
  translate:none!important;
  flex:1 1 0!important;
  box-sizing:border-box!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  width:100%!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:var(--theme-surface-2)!important;
  color:var(--theme-text)!important;
  border:1px solid var(--theme-border)!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] .kovra-chat-log {
  flex:1 1 0!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] .kovra-chat-suggestions {
  flex:0 0 auto!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  max-width:100%!important;
  overscroll-behavior-x:contain!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans .kovra-chat-suggestions > * {
  flex:0 0 auto!important;
  white-space:nowrap!important;
  max-width:230px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans .kovra-chat-topics {
  display:none!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] .kovra-chat-presence,
body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] .kovra-chat-composer,
body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] .kovra-chat-privacy {
  flex:0 0 auto!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] .kovra-chat-privacy {
  order:6!important;
  padding:5px 10px max(7px,env(safe-area-inset-bottom,0px))!important;
  background:var(--theme-surface-2)!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans [data-kovra-support-chatbot] .kovra-chat-composer {
  order:5!important;
}
body.kovra-more-support-view.kovra-chat-exclusive-loans.kovra-support-input-focused [data-kovra-support-chatbot],
html.kovra-support-web-runtime body.kovra-more-support-view.kovra-chat-exclusive-loans.kovra-support-input-focused [data-kovra-support-chatbot],
body.kovra-more-support-view.kovra-chat-exclusive-loans.kovra-support-keyboard-open [data-kovra-support-chatbot] {
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  width:100%!important;
  flex:1 1 0!important;
  height:auto!important;
  max-height:none!important;
}
/* Keep the back control accessible while typing. Nonessential suggestion
   chips may collapse when the iOS keyboard occupies the lower viewport. */
body.kovra-more-support-view.kovra-chat-exclusive-loans.kovra-support-input-focused .kovra-subview-header {
  display:grid!important;
}

/* Human support stays available on a SEPARATE view, not underneath
   the chat composer where its cards would overlap the bottom controls. */
body.kovra-chat-exclusive-loans .kovra-chat-human-link {
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-height:36px;
  max-width:120px;
  padding:6px 9px;
  border:1px solid var(--theme-border);
  border-radius:10px;
  background:var(--theme-surface-2);
  color:var(--theme-text)!important;
  font-size:12px;
  font-weight:750;
  text-decoration:none;
  white-space:nowrap;
}
body.kovra-more-human-view .kovra-support-human-only {
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  border:1px solid var(--theme-border);
  border-radius:15px;
  background:var(--theme-surface);
  color:var(--theme-text);
}
body.kovra-more-human-view .kovra-support-human-only h2 {
  margin:0;
  font-size:19px;
}
body.kovra-more-human-view .kovra-support-human-only p {
  margin:0 0 6px;
  font-size:13px;
  color:var(--theme-muted);
}
body.kovra-more-human-view .kovra-support-human-only .kovra-simple-contact {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid var(--theme-border);
  border-radius:12px;
  background:var(--theme-surface-2);
  color:var(--theme-text);
  text-decoration:none;
}

/* Negocios: dedicated accessible dialog; preserve chat node and JS state while
   toggling visibility, so conversation survives close/reopen. */
.kovra-exclusive-chat-overlay[hidden] {display:none!important;}
.kovra-exclusive-chat-overlay {
  position:fixed!important;
  z-index:100000!important;
  inset:0!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  height:var(--kovra-business-chat-height,100dvh)!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:max(8px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) max(9px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))!important;
  background:var(--theme-bg,#020604)!important;
  color:var(--theme-text,#f4f7f5)!important;
  overscroll-behavior:none!important;
}
.kovra-exclusive-chat-inner {
  width:100%;
  max-width:900px;
  min-height:0;
  flex:1 1 0;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.kovra-exclusive-chat-bar {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:3px 4px 9px;
  color:var(--theme-text);
}
.kovra-exclusive-chat-back {
  flex:0 0 42px;
  min-width:42px;
  height:42px;
  border:1px solid var(--theme-border);
  border-radius:13px;
  background:var(--theme-surface-2);
  color:var(--theme-text);
  font-size:24px;
  font-weight:700;
  cursor:pointer;
}
.kovra-exclusive-chat-bar > strong {
  font-size:17px;
  line-height:1.2;
}
.kovra-exclusive-chat-inner > #businessAiSupport {
  box-sizing:border-box!important;
  flex:1 1 0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  overflow:hidden!important;
  background:var(--theme-surface)!important;
  border:1px solid var(--theme-border)!important;
  border-radius:17px!important;
}
.kovra-exclusive-chat-inner > #businessAiSupport .business-ai-head,
.kovra-exclusive-chat-inner > #businessAiSupport .business-ai-suggestions,
.kovra-exclusive-chat-inner > #businessAiSupport .business-ai-form,
.kovra-exclusive-chat-inner > #businessAiSupport .business-ai-privacy {
  flex:0 0 auto!important;
}
.kovra-exclusive-chat-inner > #businessAiSupport #businessAiLog {
  box-sizing:border-box!important;
  flex:1 1 0!important;
  min-height:0!important;
  max-height:none!important;
  height:auto!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain!important;
}
.kovra-exclusive-chat-inner > #businessAiSupport #businessAiSuggestions {
  display:flex!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  max-width:100%;
  padding:6px 9px!important;
}
.kovra-exclusive-chat-inner > #businessAiSupport #businessAiSuggestions button {
  flex:0 0 auto!important;
  max-width:220px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.kovra-exclusive-chat-inner > #businessAiSupport #businessAiForm {
  display:flex!important;
  align-items:center;
  gap:8px;
  width:100%;
  margin:0!important;
  padding:9px!important;
}
.kovra-exclusive-chat-inner > #businessAiSupport #businessAiInput {
  flex:1 1 0;
  min-width:0!important;
  font-size:16px!important;
}
html.kovra-business-exclusive-chat,
body.kovra-business-exclusive-chat {
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
body.kovra-business-exclusive-chat > nav.bottom-nav {
  display:none!important;
}
@media(max-width:640px) {
  .kovra-exclusive-chat-overlay {padding-left:7px!important;padding-right:7px!important;}
  .kovra-exclusive-chat-inner > #businessAiSupport .business-ai-message {max-width:100%;}
}
