@import "settings.colors";

@import "mixins/settings.fonts";
@import "mixins/tools.mixins";

.c-comments {
  margin: rem(20) 0 rem(15) 0;
}

.c-comments-bar {
  background-color: $color-stone-200;
  display: flex;
  cursor: pointer;
  height: rem(44);
}

.c-comments-bar--closed {
  cursor: default;
}

.c-comments-bar__count {
  flex: 1;
  padding-left: rem(14);
  line-height: 2.75rem;
}

.c-comments-bar__count__icon {
  display: inline-block;
  vertical-align: middle;
}

.c-comments-bar__count__icon-art {
  width: rem(18);
  height: rem(18);
  fill: $color-grey-300;
  display: block;
}

.c-comments-bar__count__text {
  @include font-gm-sans;
  text-transform: uppercase;
  font-size: rem(12);
  color: $color-grey-660;
  letter-spacing: rem(1);
}

.c-comments-bar__link {
  @include font-gm-sans;
  text-transform: uppercase;
  font-size: rem(12);
  color: $color-grey-660;
  letter-spacing: rem(1);
  text-decoration: none;
  vertical-align: middle;

  &:hover .c-comments-bar__count__text {
    text-decoration: underline;
  }

  &:active .c-comments-bar__count__text {
    color: $color-grey-900;
    text-decoration: underline;
  }
}

.c-comments-bar__control {
  button {
    cursor: pointer;
    width: rem(40);
    height: rem(40);
    padding-left: rem(9);
    padding-right: rem(9);
    border: none;
    background-color: transparent;
    &:hover {
      background-color: transparent;
    }
  }
  svg {
    display: inline-block;
    vertical-align: middle;
    height: rem(20);
    width: rem(20);
    fill: $color-grey-660;
  }
}

.c-comments-bar__control--open {
  svg {
    transform: rotate(180deg);
    // sass-lint:disable no-vendor-prefixes
    -moz-transform: rotate(180deg);
    // sass-lint:enable no-vendor-prefixes
    transform-origin: center center;
  }
}

// panel that holds the preamble and the comments
.c-comments-panel {
  background-color: $color-white;
  border-style: solid;
  border-color: $color-stone-200;
  border-width: 0 1px 1px 1px;
}

.c-comments-panel__preamble,
.c-comments-panel__postamble {
  padding: rem(14);
  @include font-gm-sans;
  font-size: rem(14);
  letter-spacing: .4px;
  color: $color-grey-700;
  a:not(.c-button) {
    transition: all 0.1s ease;
    text-decoration: none;
    color: $color-grey-900;
    border-bottom: 1px solid $color-grey-900;
    &:visited {
      color: $color-grey-660;
      border-bottom: 1px solid $color-grey-660;
    }
    &:hover,
    &:focus {
      color: $color-grey-600;
      border-bottom: 1px solid $color-grey-600;
    }
    &:active {
      color: $color-grey-660;
      border-bottom: 1px solid $color-grey-660;
    }
  }
  p:first-child {
    margin-top: 0;
  }
}

.c-comments-panel__preamble-actions {
  max-width: rem(300);
  margin: rem(20) auto;
  text-align: center;
  .c-button {
    margin-bottom: rem(10);
  }
  .c-button--grey-primary {
    margin-bottom: rem(15);
  }
}

// comments widget wrapper
.c-comments-panel__comments {
  margin: 0 rem(10) rem(14) rem(10);
}
