.catalogue-page {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 8);
  color: var(--text);
  background: var(--background);

  &__header {
    max-width: 980px;
    margin: 0 auto calc(var(--spacing-unit) * 10);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 3);

    > p:not(.catalogue-page__eyebrow) {
      max-width: 560px;
      color: var(--text-secondary);
    }
  }

  &__eyebrow {
    color: var(--primary);
    text-transform: uppercase;
  }

  &__sections {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 5);
  }

  &__section {
    border: 1px solid var(--secondary-border);
    border-radius: calc(var(--spacing-unit) * 3);
    background-color: var(--background);
    overflow: visible;
  }

  &__section-header {
    padding: calc(var(--spacing-unit) * 5);
    border-bottom: 1px solid var(--secondary-border);
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    gap: calc(var(--spacing-unit) * 6);

    > p {
      max-width: 420px;
      color: var(--text-secondary);
      text-align: right;
    }
  }

  &__section-content {
    padding: calc(var(--spacing-unit) * 5);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 4);
  }

  &__component-row,
  &__block-row,
  &__input-row,
  &__cards {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 3);
  }

  &__input-row {
    align-items: flex-start;

    > .input-container {
      width: min(230px, 100%);
    }
  }

  &__block-row {
    align-items: stretch;

    > .checkbox {
      width: min(320px, 100%);
    }
  }

  &__typography-sample {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }

  &__filter-preview {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }

  &__filter-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: 500;
  }

  &__filter-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
  }

  &__filter-row {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 3);
    border: 1px solid var(--secondary-border);
    border-radius: calc(var(--spacing-unit) * 2);
    background-color: rgba(255, 255, 255, 0.02);

    > p {
      color: var(--text-secondary);
    }

    &--solid {
      background-color: rgba(255, 255, 255, 0.035);
    }
  }

  &__clear-filters {
    padding: calc(var(--spacing-unit) * 2);
    color: var(--text);
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;

    &:hover {
      opacity: 0.8;
    }

    p {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
  }

  &__narrow,
  &__anchor-stack {
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 3);
  }

  &__accordion-content {
    > p {
      color: var(--text-secondary);
      line-height: 1.5;
    }
  }

  &__cards {
    align-items: stretch;

    > :not(.vertical-game-card) {
      width: min(420px, 100%);
    }

    > .user-profile-container {
      max-width: 420px;
    }
  }

  &__scroll-area {
    width: min(520px, 100%);
    height: 220px;
    border: 1px solid var(--secondary-border);
    border-radius: calc(var(--spacing-unit) * 2);
    background-color: var(--background);
  }

  &__scroll-item {
    min-height: 44px;
    padding: 0 calc(var(--spacing-unit) * 4);
    border-bottom: 1px solid var(--secondary-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);

    &:last-child {
      border-bottom: 0;
    }
  }

  &__divider-composed-sample {
    width: min(360px, 100%);
    height: 116px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 4);
    color: var(--text-secondary);
  }

  &__divider-composed-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 3);
  }

  &__modal-content {
    width: min(420px, calc(100vw - calc(var(--spacing-unit) * 12)));
    padding: calc(var(--spacing-unit) * 6);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 5);

    > p {
      color: var(--text-secondary);
    }
  }

  &__lightbox-close {
    position: fixed;
    top: calc(var(--spacing-unit) * 6);
    right: calc(var(--spacing-unit) * 6);
    z-index: 10000;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary);
    color: var(--text);
    cursor: pointer;
  }

  &__floating-note {
    position: fixed;
    right: calc(var(--spacing-unit) * 5);
    bottom: calc(var(--spacing-unit) * 5);
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    border: 1px solid var(--secondary-border);
    border-radius: 999px;
    background-color: var(--background);
    color: var(--text-secondary);
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .catalogue-page {
    padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 4);

    &__section-header {
      flex-direction: column;

      > p {
        text-align: left;
      }
    }

    &__input-row > .input-container,
    &__block-row > .checkbox,
    &__cards > * {
      width: 100%;
    }

    &__floating-note {
      display: none;
    }
  }
}
