/* Only included in the explicitly selected web entry build. */
@media (max-width: 600px) {
  body[data-web-entry] { overflow-y: auto; }
  body[data-web-entry] .tioimcontainer > .bodycontent { position: relative; height: auto; min-height: 100vh; display: block; }
  body[data-web-entry] .bodycontent > .swiper-content { display: none; }
  body[data-web-entry] .bodycontent > .form-content { width: 100%; padding: 40px 24px; box-sizing: border-box; background: none; }
  body[data-web-entry] .form-content > .login-content { width: 100%; padding-left: 0; align-items: center; }
  body[data-web-entry] .form-content .form-tab { max-width: 100%; justify-content: center; }
  body[data-web-entry] .form-content .user-form { max-width: 100%; }
  body[data-web-entry] .form-content .otherLogin { max-width: 100%; }
  body[data-web-entry] .form-content .smsTips { position: static; height: auto; }
  body[data-web-entry] .form-content .bothref { margin-left: 0; max-width: 100%; }
  body[data-web-entry] .el-message { min-width: 0; max-width: calc(100% - 24px); }
}

/* Authenticated chat must remain a flex shell, rather than the stacked login layout. */
@media (max-width: 760px) {
  body[data-web-entry] .tioimcontainer > .bodycontent.chat-shell {
    display: flex; position: relative; height: 100vh; height: 100dvh; min-height: 0;
    overflow: hidden; width: 100%;
  }
  body[data-web-entry] .chat-shell > .navbar { width: 44px; flex: 0 0 44px; min-width: 0; }
  body[data-web-entry] .chat-shell > .mainbody { position: relative; min-width: 0; min-height: 0; flex-direction: column; }
  body[data-web-entry] .mobile-chat-toolbar { display: flex; align-items: center; gap: 12px; height: 44px; flex: 0 0 44px; padding: 0 8px; border-bottom: 1px solid #eee; background: #fff; }
  body[data-web-entry] .mobile-chat-toolbar button { min-height: 36px; padding: 0 10px; color: #3185dc; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
  body[data-web-entry] .mobile-chat .listcontent { position: absolute; top: 44px; bottom: 0; left: 0; width: 100% !important; min-width: 0 !important; z-index: 2; background: #fff; }
  body[data-web-entry] .mobile-list-collapsed .listcontent { display: none; }
  body[data-web-entry] .mobile-chat > .maincontent { width: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
  body[data-web-entry] .mobile-chat:not(.mobile-list-collapsed) > .maincontent { visibility: hidden; pointer-events: none; }
  body[data-web-entry] .mobile-chat .chatinfo { flex-shrink: 0; }
  body[data-web-entry] .mobile-chat .chat-header { padding: 0 8px !important; }
  body[data-web-entry] .mobile-chat .chat-header-left { flex-shrink: 1; }
  body[data-web-entry] .mobile-chat .chat-name { font-size: 16px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body[data-web-entry] .mobile-chat .chat-heal-actions { display: flex !important; gap: 2px; margin-right: 4px !important; }
  body[data-web-entry] .mobile-chat .chat-heal-btn { font-size: 11px !important; padding: 3px 4px !important; margin-left: 0 !important; }
  body[data-web-entry] .mobile-chat .info-opera { padding: 0 6px !important; }
  body[data-web-entry] .mobile-chat .msg-right { min-width: 0; max-width: calc(100% - 55px) !important; padding-left: 0 !important; }
  body[data-web-entry] .mobile-chat .msg-bot { max-width: 100% !important; }
  body[data-web-entry] .mobile-chat .msg-right img { max-width: 100% !important; }
  body[data-web-entry] .mobile-chat .msgcontainer { flex: 1; min-height: 0; height: auto !important; }
  body[data-web-entry] .mobile-chat .chat-bottom { flex: 0 0 180px; min-height: 0; }
  body[data-web-entry] .mobile-chat .chat-send-opera { overflow-x: auto; flex-shrink: 0; }
  body[data-web-entry] .mobile-chat .chat-send-icon { display: flex; flex: 0 0 auto; white-space: nowrap; align-items: center; }
  body[data-web-entry] .mobile-chat .chat-send-icon i { flex-shrink: 0; }
  body[data-web-entry] .mobile-chat .chat-send-tips { display: none; }
  body[data-web-entry] .mobile-chat .chat-send-bot { padding: 0 8px; }
  body[data-web-entry] .mobile-chat .back-bottom-container { position: absolute; right: 12px; bottom: 195px; z-index: 1; }
  body[data-web-entry] .mobile-chat .msg-col { padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 600px) {
  body[data-web-entry] .bodycontent > .form-content.has-web-logo { padding-top: 80px; }
}

/* Explicit website portal mode; existing customer web/desktop builds are unchanged. */
body[data-web-portal] .tioimcontainer { background-image: var(--portal-background, none); background-position: center; background-size: cover; }
body[data-web-portal] .primarybtn { background: var(--portal-primary, #4C94E8); }
