@import "settings.colors";

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

.c-article-action {
  @include display-grid;
  @include grid-template-columns(0, rem(20) 1fr);
  @include grid-template-rows(0, 1fr);
  border-top: 1px solid $color-stone-200;
  width: 100%;
}

.o-author-actions__fingerprint {
  @include grid-template-columns(0, 1fr);
  .c-article-action__text {
    @include grid-column(1, 2);
  }
}

.o-author-actions .c-article-action {
  margin-right: 0;
  &::before {
    display: none;
  }
}

.c-indicator-icon {
  @include grid-column(1, 2);
  @include grid-row(1, 2);
  margin-right: rem(5);
}

.o-author-actions .c-indicator-icon__art {
  fill: $color-grey-660;
}

.c-article-action__text {
  @include grid-column(2, 3);
  @include grid-row(1, 2);
}

.o-author-actions .c-article-action {
  &:hover,
  &:focus {
    .o-author-actions__fingerprint-text {
      text-decoration: none;
    }
  }
}

.o-author-actions .c-breadcrumb {
  display: inline-block;
  padding-top: 0;
  margin-left: rem(15);
}

// PGP KEY
.o-author-actions .c-article-action.o-author-actions__pgp {
  @include display-grid;
  @include grid-template-rows(0, grid-repeat(3, auto));
  @include grid-template-columns(0, 1fr);
  padding: 0;
  .c-article-action__pgp-head {
    @include grid-row(1, 2);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    height: rem(44);
    &:hover {
      background-color: $color-stone-150;
    }
  }
  .c-button--transparent {
    background-color: transparent;
  }
  .c-article-action__pgp-body {
    display: none; // initially hidden
    @include grid-row(2, 3);
    @include grid-template-rows(0, grid-repeat(5, auto));
    @include grid-template-columns(0, 1fr);
    .c-article-action__pgp-copy {
      @include grid-column(1, 2);
      @include grid-row(1, 2);
      margin: rem(10) 0 rem(10) 0;
      button {
        width: 100%;
      }
    }
    .c-article-action__pgp-key {
      @include grid-row(3, 4);
      @include grid-column(1, 2);
      word-break: break-word;
      text-transform: none;
      word-wrap: break-word;
      min-width: 0;
    }
    .c-article-action__pgp-textarea {
      height: 0;
      width: 0;
      border: none;
      overflow: auto;
      outline: none;
      box-shadow: none;
      resize: none;
    }

  }
  &:hover,
  &:focus {
    .c-article-action__text {
      text-decoration: none;
    }
  }
  .c-article-action__pgp-footer {
    @include grid-row(3, 4);
    display: none;
  }
}

.o-author-actions .c-article-action.o-author-actions__pgp.o-author-action__pgp--open {
  .c-article-action__pgp-body {
    @include display-grid;
  }
  .c-button__icon {
    transform: rotate(-180deg);
  }
  .c-article-action__pgp-footer {
    display: flex;
    justify-content: flex-end;
  }
}

