@import '../../styles/breakpoints/index';

.list {
  display: grid;
  grid-gap: 12px;
  width: 100%;

  @media (orientation: portrait) {
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: var(--gutter);
    grid-row-gap: 8px;
  }

  @media (orientation: portrait) and ($sm) {
    grid-template-columns: repeat(3, 1fr);
  }

  @media (orientation: landscape) {
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: var(--gutter);
    grid-row-gap: 8px;
  }

  @media (orientation: landscape) and ($md) {
    grid-template-columns: 1fr;
    grid-column-gap: var(--gutter);
    grid-row-gap: 8px;
  }
}

.link {
  display: grid;
  grid-template-columns: min-content auto;
  grid-column-gap: 8px;
  align-items: baseline;
  color: var(--color-link-secondary);
  outline: none;

  &:hover {
    color: var(--color-link-secondary-hover);
  }
}

.category.active {
  font-weight: 500;
  color: var(--color-secondary);
}

.checkbox {
  --checkboxWidth: 13px;
  border: 0;
  border-radius: 3px;
  display: inline-grid;
  background-color: var(--color-gray-light-1);
  appearance: none;
  width: var(--checkboxWidth);
  height: var(--checkboxWidth);
  position: relative;
  outline: none;
  top: 1px;
  margin: 0;
  font-size: 16px;
}

.link:hover .checkbox {
  background-color: var(--color-secondary-light-1);
}

.link:hover .checkbox.active,
.checkbox.active {
  background-color: var(--color-secondary);
}

.checkbox.active::after {
  content: '';
  display: block;
  width: 3px;
  height: 6px;
  top: 1px;
  left: 4.5px;
  border: solid var(--color-white);
  border-width: 0 1.5px 1.5px 0;
  position: absolute;
  transform: rotate(45deg);
}

.input {
  display: none;
  margin-bottom: 16px;
  border-radius: 0;
  appearance: none;
  border: 0;
  font-size: var(--size-2);
  height: 30px;
  padding-bottom: 2px;
  padding-left: 8px;
  padding-right: 8px;
  background-color: transparent;
  box-shadow: inset 0 0 0 1px var(--color-black-10), inset 0 -2px 0 0 var(--color-black-10);
  outline: none;

  @media ($md) {
    display: block;
  }
}

.input:hover {
  box-shadow: inset 0 0 0 1px var(--color-black-10), inset 0 -2px 0 0 var(--color-black-50);
}

.input:focus {
  box-shadow: inset 0 0 0 1px var(--color-black-10), inset 0 -2px 0 0 var(--color-black);
}

.header {
  margin-bottom: 12px;
}
