[hidden] {
  display: none !important;
}

html,
body {
  background: var(--black);
}

body > main {
  min-height: 100dvh;
  color: var(--white);
}

a,
button,
input,
label,
select,
summary,
textarea {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

button,
input,
select,
textarea,
:where(a[data-button]) {
  appearance: none;
  min-width: 0;
  border-radius: var(--control-radius);
  padding: var(--control-padding);
  font: inherit;
  font-size: var(--font-size-sm);
  line-height: 1;

  &:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
  }
}

button,
:where(a[data-button]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--button-color);
  background: var(--button-background);
  text-decoration: none;
  text-transform: uppercase;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;

  @media (hover: hover) and (pointer: fine) {
    &:hover {
      background: var(--button-hover-background);
    }
  }

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

  &[data-press] {
    background: var(--button-hover-background);
  }

  &:disabled {
    opacity: 0.5;
    cursor: progress;
  }
}

input,
select,
textarea {
  border: 1px solid var(--field-border-color);
  color: var(--field-color);
  background: transparent;

  @media (hover: hover) and (pointer: fine) {
    &:hover {
      border-color: var(--field-color);
      color: var(--field-color);
    }
  }

  &:active {
    border-color: var(--field-active-color);
    color: var(--field-active-color);
  }

  &[data-press] {
    border-color: var(--field-color);
    color: var(--field-color);
  }

  &[aria-invalid="true"] {
    border-color: var(--red);
    color: var(--red);

    &::placeholder {
      color: var(--red);
    }
  }

  &::placeholder {
    color: color-mix(in oklch, var(--field-color) 70%, transparent);
  }
}

input {
  height: 2.375rem;
}

textarea {
  line-height: var(--line-height-sm);
}

::selection {
  color: var(--black);
  background-color: var(--orange);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray) transparent;
}
