:global {
  .resize-ease {
    transition: height 0.1s ease-out;
  }
  .resize-ease-horizontal {
    transition: width 0.1s ease-out;
  }
}

.kt_split_panel_container {
  display: flex;
  width: 100%;
  height: 100%;
  white-space: nowrap;
  flex-direction: column;

  &.horizontal {
    flex-direction: row;
  }
}

.kt_split_panel {
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;

  &.horizontal {
    flex-direction: column;
    width: auto;
    min-width: 0;
    height: 100%;
  }

  &:hover .actions_wrap {
    display: block;
  }
}

.kt_split_panel_header {
  background-color: var(--sideBarSectionHeader-background);
  font-size: 12px;
  text-transform: uppercase;
  display: flex;
  cursor: pointer;
  color: var(--sideBarSectionHeader-foreground);
  justify-content: space-between;
  border-top: 1px solid var(--sideBar-border);
  border-bottom: 1px solid transparent;
  &:focus {
    outline-width: 1px;
    outline-style: solid;
    outline-offset: -1px;
    outline-color: var(--focusBorder);
  }
}

.label_wrap {
  display: flex;
  flex-direction: row;
  flex-shrink: 1;
  overflow: hidden;
  align-items: center;
  i.arrow_icon {
    display: flex;
    align-items: center;
    justify-items: center;
    font-size: 16px;
    margin: 0 4px;
    color: var(--descriptionForeground);
    &.kt_mod_collapsed {
      transform: rotate(-90deg);
    }
  }
}

.kt_split_panel_body {
  overflow: hidden;
  flex: 1;
  font-size: 12px;
  position: relative;
  user-select: none;
  .progressBar {
    top: -1px;
  }

  .kt_split_panel_message {
    padding: 4px 12px 4px 18px;
    line-height: 14px;
    user-select: text;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.kt_split_overlay {
  width: 100%;
  white-space: normal;
  flex: none;
  position: relative;
  transition: height 0.2s ease;
}

.kt_panel_toolbar {
  position: absolute;
  right: 0;
  top: 0;
  height: 22px;
  display: none;
  .kt_panel_toolbar_container {
    margin: 0 auto;
    padding: 0;
    width: 100%;
    height: 22px;
  }
  .kt_panel_toolbar_item {
    cursor: pointer;
    display: inline-block;
    position: relative;
    width: 28px;
    height: 22px;
    background-size: 16px;
    background-position: 50%;
    background-repeat: no-repeat;
    margin-right: 0;
    &:active {
      transform: scale(1.1);
    }
  }
}

.section_label {
  font-weight: 400;
  color: var(--sideBarSectionHeader-foreground);
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section_badge {
  line-height: 1;
  background-color: var(--badge-background);
  color: var(--badge-foreground);
  margin-left: 6px;
  padding: 2px 4px;
  border-radius: 2px;
  overflow: hidden;
  white-space: nowrap;
  flex: 1 0 auto;
}
.section_description {
  font-weight: 400;
  margin-left: 10px;
  opacity: 0.6;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  align-items: center;
  font-size: 12px;
  flex: 1;

  :global(.kt-icon),
  :global(.codicon) {
    font-size: 14px !important;
  }
}

.actions_wrap {
  margin-right: 8px;
  display: none;
}

.titlebar {
  background-color: var(--sideBar-background);
  display: flex;
  flex-direction: row;
  user-select: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  box-sizing: border-box;
  line-height: 100%;
  h1 {
    color: var(--sideBarTitle-foreground);
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.hide {
  display: none;
}
.welcome {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 10px 1em;
  box-sizing: border-box;
  align-items: center;
  & > * {
    margin-block-start: 1em;
    margin-block-end: 0;
    margin-inline-start: 0;
    margin-inline-end: 0;
  }
  p {
    width: 100%;
    text-align: left;
  }
  :global(.button-container) {
    width: 100%;
    max-width: 300px;
    transition: max-width 0.2s ease-out;
    :global(.kt-button) {
      box-sizing: border-box;
      width: 100%;
      padding: 4px 8px;
      text-align: center;
      cursor: pointer;
      justify-content: center;
      align-items: center;
      max-width: 300px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      display: inline-block;
    }
  }
}

// 水平模式样式支持
.kt_split_panel.horizontal {
  .kt_split_panel_header {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    border-top: 1px solid transparent;
    border-left: 1px solid var(--sideBar-border);
    flex-direction: column;
    width: 100%;
    height: auto;
    justify-content: flex-start;
  }

  .label_wrap {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;

    i.arrow_icon {
      margin: 4px 0;
      &.kt_mod_collapsed {
        transform: rotate(-180deg);
      }
    }
  }

  .section_label {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    line-height: normal;
  }

  .section_description {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    margin-left: 0;
    margin-top: 10px;
    line-height: normal;
  }

  .section_badge {
    margin-left: 0;
    margin-top: 6px;
  }
}
