.colorBtn {
  overflow: hidden;
  display: flex;
  width: 100%;
  height: 100%;
  border: 1px solid #fff;
  cursor: pointer;
  flex-direction: row;

  align-items: center;
}

.colorPopover {
  .colorPicker {
    width: 100%;
    height: 100%;
    padding: 10px 0;
    background-color: var(--color-white);

    &.dark {
      background-color: #0f1115;
    }

    .divider {
      margin: 10px 0;
    }
  }

  .typeSelect {
    display: flex;
    width: 100%;
    height: 28px;
    padding: 0 10px;
    flex-direction: row;

    align-items: center;

    & > label {
      width: 48px;
      margin-right: 10px;
      color: #6d7a86;
      font-size: 12px;

      flex: 0 0 48px;
    }

    .zl-ls-ant-select {
      flex: auto;
    }

    .zl-ls-ant-select-selection-item {
      font-size: 12px;
    }
  }

  .gradient {
    display: flex;
    width: 100%;
    height: 48px;
    margin-top: 10px;
    padding: 0 10px;
    flex-direction: row;

    align-items: center;

    .gradientColor {
      display: flex;
      width: 136px;
      height: 48px;
      padding-right: 10px;

      flex: 0 0 136px;
      align-items: center;

      & > span {
        display: flex;
        height: 12px;
        pointer-events: none;

        flex: auto;
      }

      & > span:first-child
      , & > span:last-child {
        width: 16px;
        height: 16px;
        border: 2px solid #fff;
        cursor: pointer;
        pointer-events: auto;

        flex: 0 0 16px;
      }

      .active {
        box-shadow: 0 0 10px rgba(172, 172, 172, .7);
      }
    }

    .angle {
      display: flex;
      flex-direction: row;

      & > label {
        display: flex;
        margin-right: 10px;
        color: #6d7a86;
        font-size: 12px;

        align-items: center;
        flex: 0 0 auto;
      }

      .zl-ls-ant-input-number {
        background-color: transparent;
        // color: white;
      }
    }
  }

  .common {
    position: relative;
    display: flex;
    width: 272px;
    height: 100%;
    padding: 0 10px;
    flex-direction: column;

    .compact
    , .sketchCommon {
      display: flex;
      width: 252px;
    }

    .compact {
      flex-direction: row;

      flex-wrap: wrap;
      justify-content: flex-start;

      & > li {
        width: 16px;
        height: 16px;
        margin: 1px;

        flex: 0 0 16px;
      }

      & > li:hover
      , .active {
        outline: 2px solid #fff;
      }
    }

    .sketchCommon {
      display: flex;
      width: 250px;
      margin-top: 10px;
      padding: 0;
      border: none;
      box-shadow: none;
      flex-direction: column;

      .flexbox-fix {
        input {
          width: 100%;
          border-radius: 2px;

// background: inherit !important;
          background-color: #fff;
          color: #1a1c23;
          font-size: 12px;
        }

        label {
          color: #1a1c23;
          font-size: 12px;
        }
      }
    }

    .sketch {
      background: #151515;
    }
  }

  .footer {
    display: flex;
    width: 100%;
    padding: 0 10px;

    .zl-ls-ant-btn {
      flex: 1;

      &:first-child {
        margin-right: 10px ;
        border-color: var(--color-component-border);
        color: var(--color-title-wrap);
      }
    }
  }

  .zl-ls-ant-popover-content {
    width: 272px;
  }

  .zl-ls-ant-popover-inner-content {
    padding: 0;
  }
}

.widgetBtn {
  display: inline;
  margin-left: 12px;
  padding: 0 15px;
  border: 1px solid rgba(31, 38, 51, .4);
  border-radius: 4px;
  background: linear-gradient(220deg, #ffcc2a 14%, #345efe 57%, #ad00ff 75%, #ff58a8 94%);
  cursor: pointer;
}

.white {
  .footer {
    display: flex;

    .zl-ls-ant-btn {
      background-color: transparent;

      flex: auto;

      &:first-child {
        // color: #bec9d3;
        // border-color: #526cfd;
        margin-right: 10px;
      }
    }

    .zl-ls-ant-btn-primary {
      background-color: #526cfd;
    }
  }
}

// 暗色主题
.dark {
  .colorPicker {
    background-color: #1a1c23;
  }

  .divider {
    background-color: #151515;
  }

  .typeSelect {
    & > label {
      color: #6d7a86;
    }

    .zl-ls-ant-select
    , .ant-select-arrow {
      color: #6d7a86;
      font-size: 12px;
    }

    .zl-ls-ant-select:not(.ant-select-customize-input) .ant-select-selector {
      border-color: #1c2229;
      background-color: #0f1114;
    }

    .zl-ls-ant-select-dropdown {
      border-color: #1c2229;
      background-color: #0f1114;
      color: #6d7a86;
    }

    .zl-ls-ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
      background-color: #202949;
      color: #fff;
    }
  }

  .gradient {
    .zl-ls-ant-input-number {
      border-color: #1c2229;
      background-color: #0f1114;
      color: #ebebeb;
      font-size: 12px;
    }

    .zl-ls-ant-input-number-handler-wrap {
      border-color: #1c2229;
      background-color: #0f1114;
    }

    .zl-ls-ant-input-number-handler-wrap {
      background-color: #0f1114;
    }

    .zl-ls-ant-input-number-handler {
      color: #ebebeb;
      font-size: 12px;
    }

    .zl-ls-ant-input-number-handler-down
    , .zl-ls-ant-input-number-handler-up {
      border-color: #1c2229;
    }

    .zl-ls-ant-input-number-handler-up-inner
    , .zl-ls-ant-input-number-handler-down-inner {
      color: #ebebeb;
    }
  }

  .sketch {
    input[id^='rc-editable-input'] {
      width: 100% !important;
      border-color: #ebebeb;
      background-color: #0f1114;
      color: #ebebeb;
    }

    label[for^='rc-editable-input'] {
      color: #cecece !important;
    }

    .flexbox-fix {
      input {
        border: 1px solid #555 !important;
        background-color: #3a3a3a !important;
        color: #b4bbc4 !important;
        box-shadow: none !important;
        // color: white !important;
      }

      label {
        color: #b4bbc4 !important;
      }

      input + span {
        color: #b4bbc4 !important;
        // color: white !important;
      }
    }
  }

  .footer {
    display: flex;

    .zl-ls-ant-btn {
      background-color: transparent;

      flex: auto;

      &:first-child {
        margin-right: 10px;
        border-color: #454765;
        color: #bec9d3;
      }
    }

    .zl-ls-ant-btn-primary {
      background-color: #526cfd;
    }
  }

  .zl-ls-ant-popover-inner {
    background-color: #1a1c23;
    color: #6d7a86;
  }

  .zl-ls-ant-popover-arrow {
    border-top-color: #1a1c23 !important;
    border-left-color: #1a1c23 !important;
  }
}

.colorPopover {
  .colorPicker {
    .common {
      .sketch-picker {
        // .flexbox-fix{
        //     width: 80%;
        //     margin-left: 20%;
        // }
      }
    }

    .penpoint {
      position: absolute;
      bottom: 103px;
      left: 22px;
      font-size: 20px;
      cursor: pointer;
    }
  }
}

.darkDropDown {
  border-color: #1c2229;
  background-color: #0f1114;
  color: #6d7a86;

  .zl-ls-ant-select-item {
    color: #b1b1b1;
    font-size: 12px;
  }

  .zl-ls-ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background-color: rgba(32, 41, 73, 1) !important;
    color: #fff;
  }

  .zl-ls-ant-select-item-option-active:not(.ant-select-item-option-disabled) {
    background-color: rgba(32, 41, 73, .4);
  }
}

.colorPicker .zl-ls-ant-select:not(.zl-ls-ant-select-customize-input) .zl-ls-ant-select-selector {
  border: 1px solid #e3e3e3;
  background-color: var(--color-white);
  color: var(--color-moveable-control);
}

.colorPicker.dark .zl-ls-ant-select:not(.zl-ls-ant-select-customize-input) .zl-ls-ant-select-selector {
  background-color: var(--color-black);
  color: var(--color-font);
}

.dark .zl-ls-ant-popover-arrow-content {
  background: var(--color-context-menu-bg);

  &::before {
    background: var(--color-context-menu-bg);
  }
}
