@use '../../variables' as *;
$focus-border-width: 2px;
$widths:
  'tiny' 256px,
  'small' 512px,
  'medium' 768px,
  'large' 1024px;

body {
  --tile-background: var(--color-neutral-5);
  --tile-background-hover: rgba(var(--color-neutral-5-rgb), 0.32);
  --tile-background-active: rgba(var(--color-neutral-5-rgb), 0.08);
}

.tile {
  position: relative;
  background: var(--tile-background);

  &:focus {
    outline: none;
  }

  &:focus-visible,
  &.selected {
    box-shadow: 0 0 0 1px var(--color-neutral-100);
    border-color: var(--color-neutral-100);
  }
}

.clickable {
  cursor: pointer;
  transition: background ease-in-out 100ms;

  &:hover {
    background-color: var(--tile-background-hover);
  }

  &:active {
    background: var(--tile-background-active);
  }
}

.icon {
  font-size: 16px;
}

.tags {
  position: absolute;
  top: 0;
  right: 0;

  & > *:not(:last-child) {
    margin-right: $space-s;
  }
}

@each $name, $size in $widths {
  .#{$name} {
    max-width: $size;
    width: 100%;
  }
}
