@use "_theme.scss";
@import "react-loading-skeleton/dist/skeleton.css";

.drafts-skeleton {
  padding: 50px;
  max-width: 1080px;
  margin: 0 auto;

  @media (max-width: theme.$xl) {
    padding: 50px 0;
  }

  @media (max-width: theme.$lg) {
    padding: 0;
    width: 100%;
  }

  .drafts-skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;

    @media (max-width: theme.$lg) {
      padding: 25px 25px 25px 30px;
      margin-bottom: 0;
    }

    @media (max-width: theme.$md) {
      padding: 20px;
    }
  }

  .drafts-skeleton-section {
    margin-bottom: 30px;

    @media (max-width: theme.$lg) {
      margin-bottom: 0;
    }
  }

  .drafts-skeleton-section-header {
    background-color: var(--color-fill);
    border-top: solid 1px var(--color-line);
    border-bottom: solid 1px var(--color-line);
    height: 50px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    @media (min-width: theme.$md) and (max-width: theme.$lg) {
      padding: 0 25px 0 30px;
    }
  }

  .drafts-skeleton-item {
    padding: 20px;
    border-bottom: 2px solid var(--color-line);
    display: flex;
    flex-direction: row;
    height: 140px;

    @media (max-width: theme.$lg) {
      padding: 20px 30px;
    }

    @media (max-width: theme.$md) {
      padding: 20px;
    }

    .thumbnail {
      width: 120px;
      min-width: 90px;
      height: 100px;
      margin-right: 20px;

      @media (max-width: theme.$lg) {
        width: 90px;
        min-width: 90px;
      }

      @media (max-width: theme.$md) {
        width: 60px;
        min-width: 60px;
        height: 60px;
      }
    }

    .skeleton {
      --base-color: var(--skeleton-base-color);
      --highlight-color: var(--skeleton-highlight-color);
    }
  }

  .drafts-skeleton-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;

    .name {
      width: 162px;
      height: 32px;
      margin-bottom: 15px;
    }

    .description-1 {
      width: 80%;
      height: 20px;
      margin-bottom: 15px;
    }

    .description-2 {
      width: 100%;
      height: 20px;
    }

    .description-3 {
      display: none;

      @media (max-width: theme.$md) {
        display: block;
      }
    }
  }

  .drafts-skeleton-item-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 160px;
    min-width: 160px;

    @media (max-width: theme.$md) {
      width: 100%;
      flex-direction: row;
      justify-content: flex-end;
      min-width: unset;
    }
  }
}

@media (min-width: theme.$xs) and (max-width: theme.$sm) {
  .drafts-skeleton {
    .drafts-skeleton-item {
      padding: 20px;

      .thumbnail {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin-right: 15px;
      }
    }

    .drafts-skeleton-item-details {
      width: 100%;
      display: flex;
      flex-direction: column;

      .name {
        width: 125px;
        height: 18px;
        margin-bottom: 10px;
      }

      .description-1 {
        width: 151px;
        height: 18px;
        margin-bottom: 10px;
      }

      .description-2 {
        width: 108px;
        height: 18px;
        margin-bottom: 10px;
      }

      .description-3 {
        width: 148px;
        height: 18px;
      }
    }
  }
}
