@import 'variables';
@import 'mixins';

.dashboard-listings-container {
  width: 800px;
  max-width: 96%;
  margin: 24px auto;

  .rounded-btn {
    font-size: calc(15px + 0.2vw);
    font-family: $helvetica-condensed;
    font-stretch: condensed;
    padding: 4px 20px;
    border-radius: 100px;
    margin-right: 5px;
    display: inline-block;
    width: fit-content;
    width: -moz-fit-content;
    cursor: pointer;
    margin-bottom: 10px;
    user-select: none;
    color: var(--body-color);
    @include themeable(
      background,
      theme-container-background,
      lighten($light-medium-gray, 5%)
    );
    &:hover {
      @include themeable(
        background,
        theme-container-background-hover,
        $light-medium-gray
      );
    }

    &.active {
      background: var(--card-color-tertiary);
      color: var(--body-color-inverted);
    }
  }

  .dashboard-listings-header-wrapper {
    display: flex;
    flex-direction: row;
    text-align: center;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: $dark-gray;
    padding: 15px 0px;

    @media screen and (max-width: 768px) {
      flex-direction: column;
    }

    .dashboard-listings-header {
      width: 43%;
      text-align: center;
      color: white;
      margin: 5px auto;
      font-size: calc(1.1em + 0.1vw);
      padding: 18px 0px 7px;
      padding-left: 10px;
      font-family: var(--ff-monospace);
      border: 1px solid $light-gray;
      display: block;
      text-align: center;
      margin: 1.2%;
      padding: 1.2%;
      padding-bottom: 30px;

      @media screen and (max-width: 768px) {
        width: 90%;
      }
      a {
        font-size: 0.9em;
        border: 2px solid #2ad7c5;
        color: #25c2b2;
        padding: 6px 16px;
        margin-top: 6px;
        border-radius: 100px;
      }
    }
  }

  .dashboard-listings-actions {
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .listings-dashboard-filter-buttons {
      margin-bottom: -10px;
    }

    @media screen and (max-width: 426px) {
      flex-direction: column;
      align-items: stretch;
    }

    select {
      display: block;
      font-size: 19px;
      padding: 12px;
      border: 1px solid rgb(222, 230, 233);
      border-radius: 3px;
      background-color: white;
      outline: none;
      font-weight: bold;
      color: #333333;
      font-family: 'HelveticaNeue-CondensedBold', 'HelveticaNeueBoldCondensed',
        'HelveticaNeue-Bold-Condensed', 'Helvetica Neue Bold Condensed',
        'HelveticaNeueBold', 'HelveticaNeue-Bold', 'Helvetica Neue Bold',
        'HelveticaNeue', 'Helvetica Neue', 'TeXGyreHerosCnBold', 'Helvetica',
        'Tahoma', 'Geneva', 'Arial Narrow', 'Arial', sans-serif;

      @media screen and (max-width: 426px) {
        text-align-last: center;
        text-align: center;
        -ms-text-align-last: center;
        -moz-text-align-last: center;
        text-align-last: center;
      }
    }
  }

  .dashboard-listings-view {
    .dashboard-listing-row {
      border: 1px solid var(--card-color-tertiary);
      padding: 5px 15px;
      margin-bottom: 13px;
      border-radius: 3px;
      position: relative;
      background: var(--card-bg);

      &.draft {
        background: var(--theme-container-accent-background, #fffeec);
      }

      &.expired {
        opacity: 0.7;
      }

      .listing-org {
        background: var(--card-color-secondary);
        color: var(--body-color-inverted);
        margin-right: 5px;
        padding: 3px 10px;
        border-radius: 100px;
        margin-top: 10px;
        display: inline-block;
        font-size: 0.9em;
      }

      h2 {
        color: var(--card-color);
        font-weight: 500;
        margin-bottom: 10px;
        margin-top: 8px;
        font-size: 22px;
        width: 100%;
        @media screen and (min-width: 800px) {
          font-size: 34px;
        }
      }

      .dashboard-listing-date {
        font-size: 0.85em;
        padding: 3px 0px 6px;
        color: var(--card-color-tertiary);
      }

      .dashboard-listing-category {
        padding: 10px 15px;
        a {
          color: var(--card-color-tertiary);
          background: var(--card-bg);
          display: inline-block;
          margin: 2px;
          padding: 2px 7px;
          font-size: 0.77em;
          border-radius: 3px;
          font-weight: bold;
        }
      }

      .dashboard-listing-tags {
        font-size: 0.85em;
        padding: 3px 0px 6px;
        a {
          color: var(--card-color);
        }
      }

      .listing-row-actions {
        padding: var(--su-2) 0;

        .pill {
          background: $bold-blue;
          padding: 4px 20px;
          border-radius: 100px;
          color: white;
          margin-right: 5px;
          font-size: 14px;
          border: 2px solid transparent;
          margin-top: 6px;
          display: inline-block;

          &.green {
            background: $green;
            color: $black;
          }

          &.yellow {
            background: $yellow;
            color: $black;
          }

          &.red {
            background: $red;
          }

          &.black {
            background: $dark-gray;
          }
        }
      }
    }
  }
}
