.colorPicker {
  position: absolute;
  border-radius: 4px;
  background: #181b24;
  border: 1px solid #393b4a;
  box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 9999;
  // max-height: 438px;
  width: 242px;
  display: flex;
  flex-direction: column;
  &::-webkit-scrollbar {
    width: 0;
  }

  .recent {
    padding: 6px 10px 8px;
    border-top: 1px solid #393b4a;
    background: #181b24;
    .title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #666666;
      .icon {
        cursor: pointer;
        transition: transform linear 200ms;
        font-size: 18px !important;

        &.collapsed {
          transform: rotate(-90deg);
        }
      }

      .add {
        margin-right: 8px;
        cursor: pointer;
        &:hover {
          color: var(--easyv-primary-color);
        }
      }
    }

    .list {
      display: flex;
      flex-wrap: wrap;
      margin: 0 -10px;
      padding: 0 0 0 10px;
      .item {
        box-sizing: border-box;
        width: 20px;
        height: 20px;
        margin: 0 8px 8px 0;
        border-radius: 50%;
        background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
          left center;
        overflow: hidden;
        cursor: pointer;
        position: relative;
        border: 1px solid #38393f;
      }

      .color {
        width: 100%;
        height: 100%;
      }
    }
  }

  .operate {
    position: absolute;
    background: var(--background-4);
    color: var(--text-1);
    width: 80px;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.57);
    border-radius: 3px;

    .item {
      padding: 0 16px;
      height: 28px;
      line-height: 28px;
      cursor: pointer;

      &:hover {
        color: #fff;
      }
    }
  }
}

:global {
  .sketch-picker {
    border-radius: 0px !important;
    box-shadow: none !important;
    padding: 10px 12px 0px !important;
    background: #181b24 !important;
    width: 216px !important;
    & > div {
      border-radius: 2px !important;
    }
    input {
      background: #2d2f38;
      color: #bfbfbf !important;
      box-shadow: none !important;
      outline: none;
      box-sizing: content-box;
    }
    & > .flexbox-fix:nth-child(2) {
      margin-top: 12px;
      & > div:nth-child(2) {
        width: 28px !important;
        height: 28px !important;
        margin-left: 8px !important;
      }
      & > div:nth-last-child(1) > div:nth-child(1) {
        width: 28px !important;
        height: 28px !important;
        background-image:
          linear-gradient(45deg, #404040 25%, transparent 0, transparent 75%, #404040 0),
          linear-gradient(45deg, #404040 25%, transparent 0, transparent 75%, #404040 0);
        background-color: #4a4a4a;
        background-size: 10px 10px;
        background-position:
          0 0,
          5px 5px;
      }
      & > div:nth-last-child(1) > div:nth-last-child(1) {
        border-radius: 50% !important;
        width: 28px !important;
        height: 28px !important;
        box-shadow: none !important;
        border: 1px solid #393b4a;
      }
      & > div:nth-child(1) > div:nth-last-child(1) {
        margin-top: 12px !important;
        & > div > div:nth-child(1) > div {
          background-image:
            linear-gradient(45deg, #404040 25%, transparent 0, transparent 75%, #404040 0),
            linear-gradient(45deg, #404040 25%, transparent 0, transparent 75%, #404040 0);
          background-color: #4a4a4a;
          background-size: 10px 10px;
          background-position:
            0 0,
            5px 5px;
        }
      }
      & > div:nth-last-child(1) {
        margin-top: 6px !important;
      }
      & > div > div {
        overflow: visible !important;
      }
      & > div > div > div > div {
        overflow: visible !important;
      }
      & > div > div:nth-child(1),
      & > div > div:nth-child(2) {
        & > div > div > div > div {
          position: absolute;
          z-index: 1;
          background-color: transparent !important;
          height: 13px !important;
          width: 13px !important;
          border: 2px solid #ffffff !important;
          border-radius: 50% !important;
          margin-top: -2px !important;
          transform: translateX(-6.5px) !important;
        }
      }
      & > div > div:nth-child(1) {
        & > div > div {
          margin: 0 6.5px !important;

          &::before {
            position: absolute;
            content: "";
            left: -5px;
            top: 0px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: #f00;
          }
          &::after {
            position: absolute;
            content: "";
            right: -6px;
            top: 0px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: #f00;
          }
        }
      }
      & > div > div:nth-child(2) {
        & > div > div {
          &:nth-child(2) {
            border-radius: 5px;
          }
          &:nth-child(3) {
            margin: 0 6px !important;
          }
          // transform: translateX(-5px) !important;
          // &::after {
          //   position: absolute;
          //   content: '';
          //   right: -5px;
          //   top: 0px;
          //   width: 10px;
          //   height: 10px;
          //   border-radius: 50%;
          //   background-color: #fff;
          // }
        }
      }
    }
    & > .flexbox-fix:nth-child(3) {
      padding-top: 16px !important;
      & > div:nth-child(1) {
        & > div {
          input {
            width: 82% !important;
          }
        }
      }
      & > div:nth-child(1),
      & > div:nth-child(2),
      & > div:nth-child(3),
      & > div:nth-child(4),
      & > div:nth-child(5) {
        & > div {
          input {
            height: 24px !important;
          }
          span {
            font-size: 10px !important;
            height: 30px !important;
            line-height: 30px !important;
            padding: 0 !important;
          }
        }
      }
      & > div:nth-child(2),
      & > div:nth-child(3),
      & > div:nth-child(4),
      & > div:nth-child(5) {
        & > div {
          input {
            height: 24px !important;
            padding-left: 6px !important;
            padding-right: 5px !important;
            width: 69% !important;
          }
        }
      }
      & > div > div > span {
        font-size: 10px !important;
        color: #bfbfbf !important;
      }
    }
  }
}

.type {
  display: flex;
  height: 36px;
  align-items: center;
  border-bottom: 1px solid #393b4a;
  .circle {
    position: relative;
    width: 30px;
    height: 36px;
    cursor: pointer;
    &::before {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      content: "";
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 1px solid #666;
    }
    &.linear {
      &::before {
        background-image: linear-gradient(#aaa, #000);
      }
      &.active {
        &::before {
          background-image: linear-gradient(
            180deg,
            rgba(36, 145, 247, 0) 18%,
            var(--easyv-primary-color) 100%
          );
          border: 1px solid var(--easyv-primary-color);
        }
      }
    }
    &.pure {
      &::before {
        background: #666666;
      }
      &.active {
        &::before {
          background: var(--easyv-primary-color);
        }
      }
    }
  }
}

.colors {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid #393b4a;
  .bar {
    position: relative;
    width: 150px;
    height: 6px;
    margin-right: 16px;
    border-radius: 4px;
    // background-image: linear-gradient(90deg, #fff, #f00);
    &::before {
      content: "";
      position: relative;
      z-index: -1;
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 4px;
      background-image:
        linear-gradient(45deg, #404040 25%, transparent 0, transparent 75%, #404040 0),
        linear-gradient(45deg, #404040 25%, transparent 0, transparent 75%, #404040 0);
      background-color: #4a4a4a;
      background-size: 10px 10px;
      background-position:
        0 0,
        5px 5px;
    }

    .item {
      position: absolute;
      top: -2px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      transform: translateX(-50%);
      border: 2px solid #ffffff;
      cursor: pointer;
      &.active {
        width: 12px;
        height: 12px;
        box-shadow: 0 0 0 3px rgba(36, 145, 247, 0.6);
      }
    }
  }
}

.recentTitle {
  color: #bfbfbf;
  margin-bottom: 10px;
}

.scrollContainer {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}
