/*
 * Yunliao PC Web - WeChat-style shell v1.1.7
 * Standalone desktop-only stylesheet. No compiled application bundle is changed.
 */

@media (min-width: 601px) {
  :root {
    --yunliao-pc-rail-width: 60px;
    --yunliao-pc-conversation-width: 300px;
    --yunliao-pc-search-height: 40px;
    --yunliao-pc-header-height: 48px;
    --yunliao-pc-panel: #f5f6f7;
    --yunliao-pc-panel-strong: #eceff2;
    --yunliao-pc-canvas: #f7f7f7;
    --yunliao-pc-line: #e3e6e9;
    --yunliao-pc-text: #1f2937;
    --yunliao-pc-muted: #7b8794;
    --yunliao-pc-blue: #0788f5;
    --yunliao-pc-blue-soft: #e8f3ff;
  }

  /* Conversation search toolbar */
  #root .ant-layout.h-full > div.no-mobile.app-drag[class*="top-search-bar"] {
    position: absolute !important;
    inset: 0 auto auto var(--yunliao-pc-rail-width) !important;
    z-index: 30 !important;
    box-sizing: border-box !important;
    width: var(--yunliao-pc-conversation-width) !important;
    min-width: var(--yunliao-pc-conversation-width) !important;
    max-width: var(--yunliao-pc-conversation-width) !important;
    height: var(--yunliao-pc-search-height) !important;
    min-height: var(--yunliao-pc-search-height) !important;
    background: var(--yunliao-pc-panel) !important;
    border-right: 1px solid var(--yunliao-pc-line) !important;
    border-bottom: 1px solid var(--yunliao-pc-line) !important;
    box-shadow: none !important;
  }

  #root
    .ant-layout.h-full
    > div.no-mobile.app-drag[class*="top-search-bar"]
    > div.flex {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 8px !important;
    justify-content: flex-start !important;
  }

  #root
    .ant-layout.h-full
    > div.no-mobile.app-drag[class*="top-search-bar"]
    > div.flex
    > div.app-no-drag {
    box-sizing: border-box !important;
    flex: 0 0 calc(100% - 46px) !important;
    width: calc(100% - 46px) !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 28px !important;
    color: #667281 !important;
    background: #e7eaed !important;
    border: 1px solid #dde1e5 !important;
    border-radius: 5px !important;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02) !important;
  }

  #root
    .ant-layout.h-full
    > div.no-mobile.app-drag[class*="top-search-bar"]
    > div.flex
    > div.app-no-drag
    > span {
    color: #667281 !important;
  }

  #root
    .ant-layout.h-full
    > div.no-mobile.app-drag[class*="top-search-bar"]
    > div.flex
    > div.app-no-drag
    > img,
  #root
    .ant-layout.h-full
    > div.no-mobile.app-drag[class*="top-search-bar"]
    > div.flex
    > img.app-no-drag {
    filter: brightness(0) saturate(100%) opacity(0.52) !important;
  }

  #root
    .ant-layout.h-full
    > div.no-mobile.app-drag[class*="top-search-bar"]
    > div.flex
    > img.app-no-drag {
    box-sizing: border-box !important;
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    margin-left: 10px !important;
  }

  /* Three-column geometry */
  #root .ant-layout.h-full > .ant-layout.ant-layout-has-sider {
    flex: 1 1 100% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin-top: 0 !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout-sider.no-mobile {
    top: 0 !important;
    flex: 0 0 var(--yunliao-pc-rail-width) !important;
    width: var(--yunliao-pc-rail-width) !important;
    min-width: var(--yunliao-pc-rail-width) !important;
    max-width: var(--yunliao-pc-rail-width) !important;
    height: 100% !important;
    min-height: 0 !important;
    background: #f1f2f4 !important;
    border-right: 1px solid #e0e3e6 !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout-sider.no-mobile
    > .ant-layout-sider-children {
    height: 100% !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout-sider.no-mobile
    > .ant-layout-sider-children
    > div:first-child {
    position: relative !important;
    box-sizing: border-box !important;
    height: 100% !important;
    margin-top: 0 !important;
    padding-top: 18px !important;
    padding-bottom: 78px !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout.flex-row {
    height: 100% !important;
    min-height: 0 !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout.flex-row
    > div:first-child {
    position: relative !important;
    flex: 0 0 var(--yunliao-pc-conversation-width) !important;
    width: var(--yunliao-pc-conversation-width) !important;
    min-width: var(--yunliao-pc-conversation-width) !important;
    max-width: var(--yunliao-pc-conversation-width) !important;
    height: 100% !important;
    min-height: 0 !important;
    background: var(--yunliao-pc-panel) !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout.flex-row
    > div:first-child
    > aside {
    height: 100% !important;
    min-height: 0 !important;
    background: var(--yunliao-pc-panel) !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout.flex-row
    > div:first-child
    > aside
    > div.absolute.flex.flex-col {
    top: 46px !important;
    bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  #root
    .ant-layout.h-full
    > .ant-layout.ant-layout-has-sider
    > .ant-layout.flex-row
    > .ant-layout.no-mobile {
    height: 100% !important;
    min-height: 0 !important;
  }

  /* Native and injected navigation entries share one visual language. */
  #root .yunliao-shell-native-nav,
  #root .yunliao-shell-nav-button {
    box-sizing: border-box !important;
    display: flex !important;
    width: 48px !important;
    height: 52px !important;
    min-height: 52px !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    color: #758292 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    transition:
      background-color 120ms ease,
      color 120ms ease !important;
  }

  #root .yunliao-shell-native-nav:hover,
  #root .yunliao-shell-nav-button:hover {
    color: #4d5b6b !important;
    background: #e5e8eb !important;
  }

  #root .yunliao-shell-native-nav[class*="bg-[#e9e9eb]"],
  #root .yunliao-shell-nav-button.is-active {
    color: var(--yunliao-pc-blue) !important;
    background: #e2e6ea !important;
  }

  #root .yunliao-shell-native-nav > img,
  #root .yunliao-shell-nav-button > svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
  }

  #root .yunliao-shell-native-nav > div:last-child,
  #root .yunliao-shell-nav-label {
    margin-top: 4px !important;
    color: inherit !important;
    font-size: 12px !important;
    line-height: 15px !important;
    white-space: nowrap !important;
  }

  #root .yunliao-shell-groups-mode .yunliao-shell-native-chat,
  #root .yunliao-shell-groups-mode .yunliao-shell-native-contact {
    color: #758292 !important;
    background: transparent !important;
  }

  #root .yunliao-shell-groups-mode .yunliao-shell-native-chat > img,
  #root .yunliao-shell-groups-mode .yunliao-shell-native-contact > img {
    filter: grayscale(1) opacity(0.7) !important;
  }

  /* Real group conversations, sourced from Yunliao's native conversation store. */
  #yunliao-pc-group-conversations {
    position: absolute;
    z-index: 24;
    inset: var(--yunliao-pc-search-height) 0 0;
    display: flex;
    min-height: 0;
    flex-direction: column;
    color: var(--yunliao-pc-text);
    background: var(--yunliao-pc-panel);
    border-right: 1px solid var(--yunliao-pc-line);
  }

  #yunliao-pc-group-conversations[hidden] {
    display: none !important;
  }

  #yunliao-pc-group-conversations .yunliao-group-panel-heading {
    display: flex;
    box-sizing: border-box;
    height: 42px;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    color: #303947;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #e8eaed;
  }

  #yunliao-pc-group-conversations .yunliao-group-panel-count {
    color: #97a0ab;
    font-size: 12px;
    font-weight: 400;
  }

  #yunliao-pc-group-conversations .yunliao-group-panel-list {
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px 8px 12px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-item {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    height: 68px;
    margin: 0;
    padding: 10px 9px;
    align-items: center;
    color: inherit;
    font: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-item:hover {
    background: #eceff2;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-item.is-selected {
    background: var(--yunliao-pc-blue-soft);
  }

  #yunliao-pc-group-conversations .yunliao-group-avatar {
    position: relative;
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--yunliao-pc-blue);
    border-radius: 7px;
    overflow: hidden;
  }

  #yunliao-pc-group-conversations .yunliao-group-avatar > svg {
    width: 24px;
    height: 24px;
  }

  #yunliao-pc-group-conversations .yunliao-group-avatar > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-content {
    display: flex;
    min-width: 0;
    margin-left: 11px;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-top,
  #yunliao-pc-group-conversations .yunliao-group-conversation-bottom {
    display: flex;
    min-width: 0;
    align-items: center;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-name,
  #yunliao-pc-group-conversations .yunliao-group-conversation-preview {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-name {
    color: #222b37;
    font-size: 14px;
    font-weight: 500;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-time {
    margin-left: 8px;
    color: #9aa4b0;
    font-size: 11px;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-bottom {
    margin-top: 5px;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-preview {
    color: #8c97a5;
    font-size: 12px;
  }

  #yunliao-pc-group-conversations .yunliao-group-conversation-unread {
    min-width: 17px;
    height: 17px;
    margin-left: 8px;
    padding: 0 4px;
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    text-align: center;
    background: #f05252;
    border-radius: 9px;
  }

  #yunliao-pc-group-conversations .yunliao-group-panel-state {
    padding: 76px 18px 0;
    color: #98a2ae;
    font-size: 13px;
    text-align: center;
  }

  #root #yunliao-pc-more-button {
    position: absolute !important;
    right: 6px !important;
    bottom: 14px !important;
    left: 6px !important;
    margin: 0 !important;
  }

  /* More menu; each item delegates to an existing native action. */
  #yunliao-pc-more-menu {
    position: fixed;
    z-index: 10020;
    left: 66px;
    bottom: 14px;
    box-sizing: border-box;
    width: 196px;
    padding: 7px;
    color: var(--yunliao-pc-text);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.16);
    transform-origin: left bottom;
  }

  #yunliao-pc-more-menu[hidden] {
    display: none !important;
  }

  #yunliao-pc-more-menu .yunliao-more-title {
    padding: 7px 10px 5px;
    color: #8a94a1;
    font-size: 11px;
  }

  #yunliao-pc-more-menu button {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    padding: 0 10px;
    align-items: center;
    color: #344052;
    font: inherit;
    font-size: 13px;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
  }

  #yunliao-pc-more-menu button:hover {
    background: #f0f3f6;
  }

  #yunliao-pc-more-menu button[data-action="logout"] {
    color: #d94b4b;
  }

  #yunliao-pc-more-menu button svg {
    width: 17px;
    height: 17px;
    margin-right: 10px;
    color: currentColor;
  }

  #yunliao-pc-shell-notice {
    position: fixed;
    z-index: 10080;
    top: 22px;
    left: 50%;
    max-width: 360px;
    padding: 9px 15px;
    color: #245d38;
    font-size: 13px;
    background: #effaf2;
    border: 1px solid #ccebd5;
    border-radius: 7px;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.13);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition:
      opacity 140ms ease,
      transform 140ms ease;
  }

  #yunliao-pc-shell-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  #yunliao-pc-shell-notice.is-error {
    color: #9f3030;
    background: #fff3f3;
    border-color: #f2cccc;
  }

  #yunliao-pc-shell-dialog {
    position: fixed;
    z-index: 10070;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 27, 36, 0.22);
  }

  #yunliao-pc-shell-dialog .yunliao-shell-dialog-card {
    box-sizing: border-box;
    width: 330px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e5e8;
    border-radius: 9px;
    box-shadow: 0 18px 48px rgba(31, 41, 55, 0.2);
  }

  #yunliao-pc-shell-dialog .yunliao-shell-dialog-title {
    color: #202733;
    font-size: 16px;
    font-weight: 600;
  }

  #yunliao-pc-shell-dialog .yunliao-shell-dialog-message {
    margin-top: 13px;
    color: #667281;
    font-size: 13px;
  }

  #yunliao-pc-shell-dialog .yunliao-shell-dialog-actions {
    display: flex;
    margin-top: 22px;
    justify-content: flex-end;
    gap: 9px;
  }

  #yunliao-pc-shell-dialog button {
    min-width: 76px;
    height: 32px;
    padding: 0 14px;
    color: #465466;
    font: inherit;
    font-size: 13px;
    background: #f3f5f7;
    border: 1px solid #e0e4e8;
    border-radius: 5px;
    cursor: pointer;
  }

  #yunliao-pc-shell-dialog button.is-primary {
    color: #fff;
    background: var(--yunliao-pc-blue);
    border-color: var(--yunliao-pc-blue);
  }

  #yunliao-pc-shell-dialog button:disabled {
    opacity: 0.58;
    cursor: wait;
  }

  .yunliao-settings-focus {
    border-radius: 6px !important;
    animation: yunliao-settings-focus 1.4s ease-out 1 !important;
  }

  @keyframes yunliao-settings-focus {
    0%,
    35% {
      background: #dceeff;
    }
    100% {
      background: transparent;
    }
  }

  /* Compact WeChat-style chat header; native right-side buttons remain clickable. */
  #chat-container > header.ant-layout-header {
    box-sizing: border-box !important;
    flex: 0 0 var(--yunliao-pc-header-height) !important;
    width: 100% !important;
    height: var(--yunliao-pc-header-height) !important;
    min-height: var(--yunliao-pc-header-height) !important;
    padding: 0 18px !important;
    line-height: normal !important;
    background: var(--yunliao-pc-canvas) !important;
    border-bottom: 1px solid var(--yunliao-pc-line) !important;
  }

  #chat-container
    > header.ant-layout-header
    > div
    > div:first-child
    > :first-child {
    display: none !important;
  }

  #chat-container
    > header.ant-layout-header
    > div
    > div:first-child
    > :nth-child(2) {
    height: auto !important;
    margin-left: 0 !important;
    justify-content: center !important;
  }

  #chat-container
    > header.ant-layout-header
    > div
    > div:first-child
    > :nth-child(2)
    > div:first-child {
    color: #202733 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
  }

  #chat-container .yunliao-chat-title-with-remark {
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  #yunliao-pc-remark-button {
    display: inline-flex;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-left: 7px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: #7f8da0;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
  }

  #yunliao-pc-remark-button:hover {
    color: var(--yunliao-pc-blue);
    background: #eef5fd;
  }

  #yunliao-pc-remark-button:disabled {
    opacity: 0.5;
    cursor: wait;
  }

  #yunliao-pc-remark-button svg {
    width: 14px;
    height: 14px;
  }

  .yunliao-remark-editor-field {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .yunliao-remark-editor-field .ant-input-suffix {
    display: none !important;
  }

  .yunliao-remark-save-button {
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    height: 32px;
    margin-left: 8px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: inherit;
    font-size: 13px;
    line-height: 30px;
    background: var(--yunliao-pc-blue);
    border: 1px solid var(--yunliao-pc-blue);
    border-radius: 6px;
    cursor: pointer;
  }

  .yunliao-remark-save-button:hover {
    filter: brightness(0.96);
  }

  .yunliao-remark-save-button:disabled {
    opacity: 0.55;
    cursor: wait;
  }

  /* Hide online/offline and group-count rows, while retaining native typing text. */
  #chat-container
    > header.ant-layout-header
    > div
    > div:first-child
    > :nth-child(2)
    > :nth-child(2):not(:has(p)) {
    display: none !important;
  }

  #chat-container
    > header.ant-layout-header
    > div
    > div:first-child
    > :nth-child(2)
    > :nth-child(2):has(p) {
    margin-top: 1px !important;
  }

  #chat-container > header.ant-layout-header > div > div:last-child {
    margin-right: 0 !important;
    align-items: center !important;
    gap: 20px !important;
  }

  #chat-container > header.ant-layout-header > div > div:last-child img {
    width: 19px !important;
    height: 19px !important;
    margin-left: 0 !important;
    opacity: 0.82 !important;
    transition: opacity 120ms ease !important;
  }

  #chat-container > header.ant-layout-header > div > div:last-child img:hover {
    opacity: 1 !important;
  }

  /* Chat canvas and composer */
  #chat-container #chat-main,
  #chat-container #chat-list {
    background: var(--yunliao-pc-canvas) !important;
  }

  #chat-container #chat-footer {
    min-height: 150px !important;
    background: #fbfbfb !important;
  }

  #chat-container #chat-footer footer,
  #chat-container #chat-footer footer > div:first-child {
    background: #fbfbfb !important;
  }

  #chat-container #chat-footer footer > div:first-child {
    border-top: 1px solid var(--yunliao-pc-line) !important;
  }

  #chat-container #chat-footer footer > div:first-child > div:first-child {
    padding: 9px 18px 2px !important;
  }

  #chat-container #chat-footer footer > div:first-child > div:first-child img {
    width: 19px !important;
    height: 19px !important;
    opacity: 0.83 !important;
  }

  #chat-container #chat-footer .ck.ck-editor,
  #chat-container #chat-footer .ck-editor__main,
  #chat-container #chat-footer .ck-editor__editable,
  #chat-container #chat-footer .ck-editor__editable_inline {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #chat-container #chat-footer .ck-editor__editable_inline {
    min-height: 58px !important;
    padding: 8px 18px !important;
    color: #202733 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  #chat-container #chat-footer .ant-dropdown-button {
    margin-right: 5px !important;
  }

  #chat-container #chat-footer .ant-btn-primary {
    background: var(--yunliao-pc-blue) !important;
    border-color: var(--yunliao-pc-blue) !important;
    box-shadow: none !important;
  }

  #chat-container #chat-footer .ant-btn-primary:hover {
    background: #0079df !important;
    border-color: #0079df !important;
  }
}
