@use "../../scss/globals.scss";

.catalogue {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: calc(globals.$spacing-unit * 2);
  width: 100%;
  padding: 16px;
  scroll-behavior: smooth;

  &__filters-container {
    width: 100%;
    padding: 4px;
    align-self: flex-start;
  }

  &__header {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  &__filters-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
  }

  &__filters-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  &__clear-all-button {
    flex-shrink: 0;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    align-self: center;
  }

  &__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 22vw, 380px);
    gap: calc(globals.$spacing-unit * 2);
    align-items: start;
  }

  &__games-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  &__pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
  }

  &__result-count {
    font-size: 12px;
  }

  &__filters-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  &__skeleton {
    height: 105px;
    border-radius: 4px;
    border: solid 1px rgba(255, 255, 255, 0.15);
  }

  @media (max-width: 1024px) {
    &__content {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  @media (max-width: 768px) {
    &__header {
      align-items: stretch;
    }

    &__clear-all-button {
      width: 100%;
    }
  }
}
