@import '../config/import';

.mod-center-heading {
  margin-top: var(--su-6);
  margin-bottom: var(--su-6);
}

.mod-index-header {
  @media (min-width: $breakpoint-m) {
    padding: var(--su-2) 0 var(--su-2);
  }
}

.mod-index-list-header,
.moderation-single-article {
  border: none;
  box-shadow: 0 0 0 1px var(--card-border);
}

.mod-index-list-header {
  background-color: var(--base-0);
  display: grid;
  grid-column-gap: var(--su-2);
  padding: var(--su-2) var(--su-4);

  @media (min-width: $breakpoint-m) {
    grid-template-columns: 4fr 2fr 1fr;
  }

  &__label {
    font-size: var(--fs-s);
    font-weight: var(--fw-medium);
    color: var(--base-50);
  }
}

.mod-index-list {
  margin: 0;
  width: 100%;
}

.moderation-single-article {
  align-items: center;
  background-color: var(--base-inverted);
  color: var(--base-100);
  text-align: left;
  width: 100%;

  > summary {
    &::-webkit-details-marker {
      display: none;
    }

    &::marker {
      content: '';
    }

    .link-icon {
      width: var(--su-7);
      height: auto;

      &:hover {
        color: var(--link-branded-color);
      }
    }

    .article-details-container {
      cursor: pointer;
      display: grid;
      grid-column-gap: var(--su-2);
      grid-template-columns: 1fr;
      grid-template-rows: auto;
      grid-row-gap: var(--su-1);
      padding: var(--su-4);

      @media (min-width: $breakpoint-m) {
        grid-template-columns: 0.25fr 4fr 2fr 1fr;
        grid-row-gap: 0;
        grid-template-rows: 1fr;
      }
    }
  }

  &:hover {
    background: var(--base-0);

    .article-title {
      color: var(--link-branded-color);
    }
  }

  .article-title--label {
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    line-height: var(--lh-tight);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .article-author {
    color: var(--base-80);
    font-size: var(--fs-s);
    line-height: var(--lh-tight);

    grid-row: 2;

    @media (min-width: $breakpoint-m) {
      grid-row: inherit;
    }
  }

  .article-published-at {
    font-size: var(--fs-s);
    line-height: var(--lh-tight);
    align-self: flex-start;

    @media (min-width: $breakpoint-m) {
      font-weight: var(--fw-bold);
      align-self: center;
      justify-self: center;
    }
  }

  .article-iframes-container {
    border-radius: var(--radius);
    box-sizing: border-box;
    grid-column-start: 1;
    grid-column-end: 4;
    width: 100%;
    display: flex;
    flex-direction: column;

    &.opened {
      margin-top: -5px;
      border: 1px solid var(--base-20);
      box-shadow: 0 0 4px 2px var(--base-10);
    }

    iframe {
      border: none;
    }

    .iframes-container {
      display: flex;
      height: 780px;
      width: 100%;
      background-color: var(--base-0);
      max-height: calc(100vh - 180px);

      .article-iframe {
        width: 100%;
        height: 780px; // height is arbitrary, will be removed for modal-esque view
        max-height: calc(100vh - 180px);
        border: 2px solid var(--base-40);
        border-right: 0;
      }

      .actions-panel-iframe {
        width: 40%;
        height: 780px; // height is arbitrary, will be removed for modal-esque view
        max-height: calc(100vh - 180px);
        border: 2px solid var(--base-40);
      }
    }
  }
}

.mod-center--nav {
  overflow: hidden;
  margin-bottom: 0;

  @media (min-width: $breakpoint-m) {
    margin-bottom: var(--su-9);
  }

  hr {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: var(--base-20);
    color: var(--base-80);
  }

  .tags-box {
    max-height: 12rem;
    overflow-y: auto;
    margin-bottom: var(--su-2);
  }
}

.mod-feedback {
  margin-top: var(--su-6);
  margin-left: var(--su-3);
}

.mod-filter {
  display: grid;
  gap: var(--layout-gap);
  grid-template-columns: var(--layout);
  padding-top: var(--layout-padding);
  padding-bottom: var(--layout-padding);

  &__item {
    display: flex;
    align-items: center;
  }

  &__label {
    font-weight: var(--fw-medium);
    margin-right: var(--su-3);
  }
}
