.merge_editor_container {
  height: 100%;
  overflow: hidden;
  position: relative;

  .merge_actions_container {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 0 50px;
    margin-bottom: 30px;

    .actions {
      display: flex;
      justify-content: space-between;
    }

    .left_side {
      * + * {
        margin-left: 12px;
      }
    }
  }

  .merge_editor_float_container {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    .action_category {
      display: flex;
      flex-direction: row;
    }

    .merge_conflict_bottom_btn {
      border: 1px solid var(--kt-button-disableForeground);
      border-radius: 8px;
      background: var(--editor-background);
      color: var(--editor-foreground);

      margin: 0 4px;
      cursor: pointer;

      // 第一个子元素
      :first-child {
        margin-right: 8px;
      }

      span {
        white-space: nowrap;
      }
    }
    .magic_btn {
      background-image: radial-gradient(circle at -21% -22%, #19cfff, #8429ff);
      border: none;
      font-weight: 500;

      span {
        color: #fff;
      }

      :global {
        .kt-icon {
          color: #fff;
          font-size: 12px;
        }
      }
    }
    .merge_editor_apply_btn {
      border-radius: 8px;
      margin-left: 4px;
      white-space: nowrap;

      :first-child {
        margin-right: 8px;
      }
    }
  }

  .editor_container {
    display: flex;
    height: inherit;
    width: 100%;
  }

  .merge_editor_guide_underline_widget {
    border-style: solid;
    border-top-width: 2px !important;

    &.dashed {
      border-style: dashed;
    }

    &.insert {
      border-color: var(--mergeEditor-insertedBackground);
    }

    &.modify {
      border-color: var(--mergeEditor-modifyBackground);
    }

    &.remove {
      border-color: var(--mergeEditor-removedBackground);
    }
  }

  .merge_editor_margin_className,
  .merge_editor_diff_inner_char_background,
  .merge_editor_diff_line_background {
    &.insert {
      background-color: var(--mergeEditor-insertedBackground);
    }

    &.modify {
      background-color: var(--mergeEditor-modifyBackground);
    }

    &.remove {
      background-color: var(--mergeEditor-removedBackground);
    }
  }

  .merge_editor_diff_inner_char_background {
    &.insert {
      background-color: var(--mergeEditor-insertedInnerCharColor);
    }

    &.modify {
      background-color: var(--mergeEditor-modifyInnerCharColor);
    }

    &.remove {
      background-color: var(--mergeEditor-removedInnerCharColor);
    }
  }

  .editor_container_arrange {
    height: 100%;
    display: flex;
    flex-direction: column;

    .content {
      height: inherit;
      display: flex;

      .minimap_container {
        height: 100%;
        width: 15px;

        .minimap_content {
          position: relative;
          height: inherit;

          .block {
            position: absolute;
            width: 100%;

            &.insert {
              background-color: var(--mergeEditor-insertedInnerCharColor);
            }

            &.modify {
              background-color: var(--mergeEditor-modifyInnerCharColor);
            }

            &.remove {
              background-color: var(--mergeEditor-removedInnerCharColor);
            }
          }
        }
      }

      .editor_container {
        width: calc(100% - 15px);
      }
    }

    .stickiness_connect_container {
      height: 100%;
      position: relative;

      .piece_view_lines {
        position: absolute;
        z-index: 1;

        & svg {
          width: 100%;
          overflow: initial;

          & path {
            &.insert {
              fill: var(--mergeEditor-insertedBackground);
              stroke: var(--mergeEditor-insertedBackground);
            }

            &.modify {
              fill: var(--mergeEditor-modifyBackground);
              stroke: var(--mergeEditor-modifyBackground);
            }

            &.remove {
              fill: var(--mergeEditor-removedBackground);
              stroke: var(--mergeEditor-removedBackground);
            }
          }
        }
      }
    }
  }

  .conflict_actions {
    cursor: pointer;
    z-index: 1;
    // 默认图标宽度
    width: 16px !important;
    height: 18px !important;
    display: flex;
    align-items: center;

    &.offset_left {
      left: 18px !important;
      z-index: 2;
    }

    &.offset_right {
      left: initial !important;
      right: 8px !important;
      z-index: 2;
    }

    &.rotate_turn_left {
      transform: rotate(-50deg);
    }

    &.rotate_turn_right {
      transform: rotate(50deg);
    }

    &.ai_resolve_icon,
    &.ai_resolve_loading_icon {
      background-image: linear-gradient(180deg, #19cfff, #8429ff);
      -webkit-background-clip: text;
      color: transparent;
    }

    &.ai_resolve_loading_icon {
      animation: spin 1.5s infinite linear;
    }
  }

  // conflict action 完成后的虚线框效果
  .merge_editor_margin_className,
  .merge_editor_diff_line_background {
    border-width: 2px;
    border-style: solid;

    &.conflict_wrap {
      border-width: 2px;
      border-style: dashed;
      background-color: transparent;
    }

    &.insert {
      border-color: var(--mergeEditor-insertedBackground);
    }

    &.modify {
      border-color: var(--mergeEditor-modifyBackground);
    }

    &.remove {
      border-color: var(--mergeEditor-removedBackground);
    }

    &.stretch_left {
      border-left: transparent;
    }

    &.stretch_right {
      border-right: transparent;
    }

    &.stretch_top {
      border-top: transparent;
    }

    &.stretch_bottom {
      border-bottom: transparent;
    }

    &.ai_resolve_complete {
      background-image: linear-gradient(90deg, #19cfff, #8429ff);
      opacity: 0.12;
    }

    &.ai_resolve_complete_lines_decorations {
      background-color: #19cfff;
      opacity: 0.12;
    }
  }

  .title_head_container {
    padding: 0 10px;
    height: 30px;
    min-height: 30px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;

    & span {
      align-self: center;
      text-overflow: ellipsis;
      overflow: hidden;
      padding-right: 6px;
      white-space: nowrap;
    }

    .content {
      display: flex;
      align-content: center;
      height: inherit;
      max-width: calc(100% - 140px);
      display: flex;

      .title {
        flex-shrink: 0;
      }

      .description {
        display: flex;
        font-size: 12px;
        align-items: center;
        color: var(--descriptionForeground);
      }

      .detail {
        margin-left: 0;
        flex-shrink: 0;
        font-size: 12px;
        color: var(--descriptionForeground);
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        flex: 1;

        &:before {
          content: '•';
          opacity: 0.5;
          padding-right: 3px;
        }
      }
    }
  }
}

.skeleton_decoration {
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 37%,
    rgba(255, 255, 255, 0.08) 63%
  );
  background-size: 400% 100%;
  animation-name: skeleton-loading;
  animation-duration: 1.4s;
  animation-timing-function: ease;
  animation-iteration-count: infinite;
  border-radius: 4px;
  top: 2px;
  bottom: 2px;
  left: 2px !important;
  right: 0;
  height: initial !important;
}

.skeleton_decoration_complete {
  background-image: linear-gradient(90deg, #19cfff, #8429ff);
  opacity: 0.12;
}

.skeleton_decoration_background {
  background-color: var(--design-skeletonDecoration-background);
  z-index: 1;
  outline: 1px solid var(--design-skeletonDecoration-background);
}

.skeleton_decoration_background_black {
  background-color: var(--design-skeletonPlaceholderDecoration-background);
  z-index: 1;
  outline: 1px solid var(--design-skeletonPlaceholderDecoration-background);
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
