@import (reference) '../../styles/custom.less';
@import (reference) '../../styles/modules/variables.less';

.Story {
  background-color: @white;
  color: #353535;
  border-top: @base-border;
  border-bottom: @base-border;
  @media @small {
    border-radius: 4px;
    border: @base-border;
  }

  &__content {
    position: relative;
  }

  &__reblog {
    margin: 8px 0 -8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #99aab5;

    & > i {
      font-size: 18px;
      margin-right: 4px;
    }

    & > span {
      vertical-align: 2px;
    }
  }

  &:not(:first-child) {
    margin-top: 12px;
  }

  &:last-child {
    margin-bottom: 12px;
  }

  &__more {
    position: absolute;
    right: 16px;
    top: 20px;
    font-size: 20px !important;
    color: #c2ccd3;
    line-height: 12px;

    &:hover {
      cursor: pointer;
      color: darken(#c2ccd3, 15%);
    }
  }

  &__header {
    padding: 16px;
    display: flex;

    &__flex {
      display: flex;
    }

    &__text {
      margin: 0 6px;
      width: 100%;

      @media @small {
        margin-left: 0 12px;
      }

      a > h4 > .ant-tag {
        font-weight: bold;
        margin-left: 6px;
        font-size: 12px;
        vertical-align: 1px;
        padding: 0 4px;

        @media @small {
          padding: 0 8px;
        }
      }
    }
  }

  &__date {
    position: relative;
    top: -2px;
    font-size: 14px;
    color: #99aab5;
  }

  &__topics {
    margin-left: auto;
  }

  &__topics > button {
    margin: 0 2px;
  }

  &__content {
    word-wrap: break-word;

    &__title {
      color: #353535;

      &:hover,
      &:focus,
      &:active {
        color: #353535;
        text-decoration: none;
      }

      &:visited {
        h2 {
          color: #99aab5;
        }
      }

      & > h2 {
        font-weight: bold;
        font-size: 20px;
        margin: 0 16px 8px;

        .ant-tag {
          vertical-align: 1px;
        }
      }
    }

    &__preview {
      font-family: Source Serif Pro, serif;
      font-weight: 400;
      font-size: 16px;
      line-height: 1.4;
      color: @grey-mortar;

      &:hover,
      &:focus,
      &:active,
      &:visited {
        color: @grey-mortar;
        text-decoration: none;
      }

      video {
        width: 100%;
        max-height: 400px;
      }
    }

    &__body {
      padding: 4px 16px;
    }

    & &__img-container {
      width: 100%;

      & > img {
        display: block;
        max-width: 100%;
        max-height: 400px;
        margin: 4px auto;
      }
    }
  }

  &__footer {
    padding: 0 16px;
  }

  &__warning__message {
    padding: 10px 16px;
  }
}

div[data-dir='rtl'] .Story {
  &__reblog {
    direction: ltr;
  }

  &__topics {
    margin-right: auto;
    margin-left: 0;
  }

  &__content {
    &__title {
      & > h2 {
        .ant-tag {
          margin-right: 0;
          margin-left: 8px;
        }
      }
    }
  }
}

@import 'Story-nightmode';
