@import './markdown.scss';
@import './scrollbar.scss';
@import '../fonts/icon-fonts/iconfont.css';
@import '../fonts/ubuntu/ubuntu.css';

:root {
  --color-white: #ffffff;
  --color-white-soft: #f8f8f8;
  --color-white-mute: #f2f2f2;

  --color-black: #1b1b1f;
  --color-black-soft: #262626;
  --color-black-mute: #363636;

  --color-gray-1: #515c67;
  --color-gray-2: #414853;
  --color-gray-3: #32363f;

  --color-text-1: rgba(255, 255, 245, 0.86);
  --color-text-2: rgba(235, 235, 245, 0.6);
  --color-text-3: rgba(235, 235, 245, 0.38);

  --color-background: #181818;
  --color-background-soft: var(--color-black-soft);
  --color-background-mute: var(--color-black-mute);

  --color-primary: #135200;
  --color-primary-soft: #13520099;
  --color-primary-mute: #13520033;

  --color-text: var(--color-text-1);
  --color-icon: #ffffff99;
  --color-icon-white: #ffffff;
  --color-border: #ffffff20;
  --color-border-soft: #ffffff20;
  --color-error: #f44336;
  --color-link: #1677ff;
  --color-code-background: #323232;
  --color-scrollbar-thumb: rgba(255, 255, 255, 0.08);
  --color-scrollbar-thumb-hover: rgba(255, 255, 255, 0.15);

  --navbar-background-mac: rgba(30, 30, 30, 0.8);
  --navbar-background: rgba(30, 30, 30);
  --input-bar-background: rgba(255, 255, 255, 0.02);

  --navbar-height: 42px;
  --sidebar-width: 52px;
  --status-bar-height: 40px;
  --input-bar-height: 85px;

  --assistants-width: 280px;
  --topic-list-width: 280px;
  --settings-width: 260px;
}

body[theme-mode='light'] {
  --color-white: #ffffff;
  --color-white-soft: #f8f8f8;
  --color-white-mute: #efefef;

  --color-black: #1b1b1f;
  --color-black-soft: #262626;
  --color-black-mute: #363636;

  --color-gray-1: #8e8e93;
  --color-gray-2: #aeaeb2;
  --color-gray-3: #c7c7cc;

  --color-text-1: rgba(0, 0, 0, 1);
  --color-text-2: rgba(0, 0, 0, 0.6);
  --color-text-3: rgba(0, 0, 0, 0.38);

  --color-background: #ffffff;
  --color-background-soft: var(--color-white-soft);
  --color-background-mute: var(--color-white-mute);

  --color-primary: #00b96b;
  --color-primary-soft: #00b96b99;
  --color-primary-mute: #00b96b33;

  --color-text: var(--color-text-1);
  --color-icon: #00000099;
  --color-icon-white: #000000;
  --color-border: #00000028;
  --color-border-soft: #00000028;
  --color-error: #f44336;
  --color-link: #1677ff;
  --color-code-background: #e3e3e3;
  --color-scrollbar-thumb: rgba(0, 0, 0, 0.08);
  --color-scrollbar-thumb-hover: rgba(0, 0, 0, 0.15);

  --navbar-background-mac: rgba(255, 255, 255, 0.75);
  --navbar-background: rgba(255, 255, 255);
  --input-bar-background: rgba(0, 0, 0, 0.02);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  font-weight: normal;
}

*:focus {
  outline: none;
}

* {
  -webkit-tap-highlight-color: transparent;
}

ul {
  list-style: none;
}

body {
  display: flex;
  min-height: 100vh;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  background: transparent !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
    'Helvetica Neue', sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  -webkit-user-drag: none;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

#root {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  flex: 1;
}

#inputbar .ant-input {
  resize: none;
}

.chat-nav-dropdown {
  .ant-dropdown-menu {
    padding-bottom: 12px;
  }
}

.loader {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #000;
  box-shadow:
    32px 0 #000,
    -32px 0 #000;
  position: relative;
  animation: flash 0.5s ease-out infinite alternate;
}

.ant-segmented-group {
  gap: 4px;
}

.drag {
  -webkit-app-region: drag;
}

.nodrag {
  -webkit-app-region: no-drag;
}

.minapp-drawer {
  .ant-drawer-content-wrapper {
    box-shadow: none;
  }
  .ant-drawer-header {
    position: absolute;
    -webkit-app-region: drag;
    min-height: calc(var(--navbar-height) + 0.5px);
    background: var(--navbar-background);
    width: calc(100vw - var(--sidebar-width));
    border-bottom: 0.5px solid var(--color-border);
    margin-top: -0.5px;
  }
  .ant-drawer-body {
    padding: 0;
    margin-top: var(--navbar-height);
    overflow: hidden;
  }
  .minapp-mask {
    background-color: transparent !important;
  }
}

.ant-drawer-header {
  -webkit-app-region: no-drag;
}

.segmented-tab {
  .ant-segmented-item-label {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    font-size: 13px;
  }
  .iconfont {
    font-size: 13px;
    margin-left: -2px;
  }
  .anticon-setting {
    font-size: 12px;
  }
  .icon-business-smart-assistant {
    margin-right: -2px;
  }
  .ant-segmented-item-icon + * {
    margin-left: 4px;
  }
}
