@import 'src/styles/vars';

:host {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;

  .content-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 60px 90px;
    justify-items: center;
    max-width: 1200px;
    width: 100%;
    padding-left: 60px;
    padding-right: 60px;
    padding-bottom: 60px;
    margin-top: 80px;

    app-color-palette:first-of-type {
      order: 0;
    }

    app-color-palette:not(:first-of-type) {
      order: 2;
    }

    .view-all {
      height: 50px;
      padding-left: 20px;
      padding-right: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: $pink;
      font-size: 1.8rem;
      transition: $transition-normal;
      background: #FFEAF0;
      border-radius: 5px;
      max-width: 280px;

      &:hover, &:focus {
        background: darken(#FFEAF0, 1%);

        svg {
          transform: translateX(-4px);
        }
      }

      svg {
        width: 16px;
        height: 16px;
        fill: $pink;
        margin-right: 8px;
        transition: $transition-normal;
        transform: translateX(0);
      }
    }

    .empty {
      display: flex;
      flex-direction: column;
      align-items: center;

      .illustration {
        margin-bottom: 30px;
        width: 100%;
        max-width: 260px;
      }
    }
  }

  &.is-showing-single-palette {
    .content-wrapper {
      grid-template-columns: 1fr;

      app-color-palette {
        max-width: 680px;
      }

      ::ng-deep {
        .palette {
          height: 240px;
        }

        .description {
          .color-wrapper {
            h3.name, h4.hex {
              font-size: 2.4rem;
            }
          }
        }
      }
    }
  }

  @media screen and (max-width: $breakpoint-medium) {
    &.is-showing-single-palette {
      .content-wrapper {
        max-width: 620px;

        ::ng-deep {
          .palette {
            height: 160px;
          }
        }
      }
    }

    .content-wrapper {
      margin-top: 40px;
      grid-gap: 50px 90px;
    }
  }

  @media screen and (max-width: $breakpoint-medium - 140px) {
    .content-wrapper {
      grid-template-columns: 1fr;
      grid-gap: 40px 0;
    }
  }

  @media screen and (max-width: $breakpoint-small) {
    .content-wrapper {
      padding-left: 20px;
      padding-right: 20px;
      max-width: 100%;
    }
  }
}
