@import './variable.less';

body {
  margin: 0;
  padding: 20px 40px;
  font-family: 'Nunito', 'Arial', 'Microsoft YaHei', '黑体', '宋体', sans-serif;
  background-color: @bg;
}

.header {
  .title {
    font-weight: bold;
    font-size: 3rem;
    letter-spacing: 2px;
    text-shadow: @shadow 1px 1px, @shadow 2px 2px, @shadow 3px 3px, @shadow 4px 4px;

    &:nth-child(1) {
      color: @red;
    }
    &:nth-child(2) {
      color: @green;
    }
    &:nth-child(3) {
      color: @yellow;
    }
  }
  span + span {
    margin-left: 20px;
  }
}

.body {
  display: flex;
  &-main {
    width: calc(100% - @color-list-width);
  }
  .search {
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 0 20px 0;
    background: linear-gradient(@bg 50%, rgba(246, 248, 250, 0));
    border-radius: 6px;
    outline: 0;
    transition: all 0.3s;
    appearance: none;
    &-box {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
    }
    &-svg {
      position: absolute;
      left: 10px;
      display: flex;
      align-items: center;
    }
    input {
      width: calc(100% - 100px);
      height: 1.8rem;
      padding: 8px 16px 8px 46px;
      color: inherit;
      font-size: 1.4rem;
      font-family: 'Nunito', 'Arial', 'Microsoft YaHei', '黑体', '宋体', sans-serif;
      line-height: 1.8rem;
      border: none;
      border-radius: 6px;
      outline: none;
      box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px 0 rgb(0 0 0 / 6%);
      &:focus {
        box-shadow: 0 0 0 3px @blue;
      }
    }
  }
}

.container {
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(auto-fill, 100px);
  width: 100%;
  transition: all 0.5s;
}

.content {
  display: flex;
}

.color-list {
  position: sticky;
  top: 0;
  width: @color-list-width;
  max-height: 100vh;
}

.color-picker-item {
  width: 100px;
  margin: 20px auto;
  color: white;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgb(0 0 0 / 20%);
  cursor: pointer;
  transition: all 0.2s;
}

.color-picker-item:active {
  transform: scale(0.9, 0.9) translateY(2px);
}

.branding {
  width: 200px;
  padding: 6px 16px;
  font-size: 16px;
  background-color: rgb(253, 246, 227);
  border-radius: 4px;
  box-shadow: rgb(0 0 0 / 30%) 0 10px 10px;
  cursor: copy;
  transition: all 0.3s;
  .title {
    color: #d33682;
    div {
      display: inline;
      color: #859900;
    }
    &:nth-child(3),
    &:nth-child(4) {
      margin-left: 16px;
    }
  }
  .b {
    &-title {
      display: flex;
      justify-content: space-between;
      width: 38px;
      margin: 4px 0;
    }
    &-circle {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }
    &-red {
      background-color: rgb(255, 95, 86);
    }
    &-yellow {
      background-color: rgb(255, 189, 46);
    }
    &-green {
      background-color: rgb(39, 201, 63);
    }
  }
  &:active {
    background-color: rgb(253, 246, 224);
    box-shadow: 0 4px 6px rgb(0 0 0 / 15%);
    transform: scale(0.95);
  }
}

.random {
  background-image: linear-gradient(to right, @green, @blue, @yellow, @red);
}

.color-white {
  color: black;
  background: white;
}

#copy-text {
  position: fixed;
  top: -100px;
}

@import './mobile.less';
