@import 'src/styles/vars';

:host {
  display: block;
  position: relative;
  width: 100%;

  .link {
    position: absolute;
    top: 6px;
    right: -44px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;

    svg {
      fill: #BBBBBB;
      width: 22px;
      height: 22px;
      transition: $transition-normal;
    }

    &.twitter {
      right: -50px;
    }

    &:hover, &:focus {
      cursor: pointer;
      transition: $transition-normal;

      svg {
        fill: $oil;
      }
    }
  }

  .palette {
    display: flex;
    border-radius: 10px;
    box-shadow: $box-shadow-strong;
    height: 200px;
    overflow: hidden;

    .color {
      display: flex;
    }
  }

  .description {
    margin-top: 20px;
    padding-left: 20px;
    padding-right: 20px;

    .color-wrapper {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 36px;
      padding-top: 4px;
      padding-bottom: 4px;

      .left {
        display: flex;
        align-items: center;
        margin-right: 14px;

        .swatch {
          width: 20px;
          min-width: 20px;
          height: 20px;
          border-radius: 5px;
          margin-right: 10px;
          border: 1px solid rgba(0, 0, 0, 0.2);
          box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.2), inset 1px 1px 0 0 rgba(255, 255, 255, 0.3);
        }
      }
    }
  }

  @media screen and (max-width: $breakpoint-medium) {
    .palette {
      height: 160px;
    }

    .description {
      .color-wrapper {
        min-height: 30px;

        h3.name {
          font-size: 1.6rem;
        }

        h4.hex {
          font-size: 1.6rem;
        }
      }
    }
  }

  @media screen and (max-width: $breakpoint-small) {
    .link {
      left: unset;
      top: 0;
      right: 0;
      width: 40px;
      height: 40px;

      &.twitter {
        right: 0;
      }

      svg {
        fill: rgba(255, 255, 255, 0.8);
        width: 18px;
        height: 18px;
      }

      &:hover, &:focus {
        svg {
          fill: rgba(255, 255, 255, 0.96);
        }
      }
    }

    .description {
      padding-left: 0;
      padding-right: 0;
    }
  }
}
