a,
button,
input,
select,
textarea {
  color: inherit;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
.button {
  background: light-dark(rgb(195, 195, 195), rgb(60, 60, 60));
  border: 1px solid rgb(60, 60, 60);
  border-radius: 0.25rem;
  cursor: pointer;
  height: auto;
  padding: 0.25rem;
}

dd,
dialog,
h1,
h2,
h3,
h4,
ol,
p,
ul {
  margin: 0;
}

dialog {
  border: none;
  box-sizing: border-box;
  height: 100vh;
  max-height: none;
  max-width: none;
  padding: 1rem;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 101;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;

  @media (min-width: 1441px) {
    font-size: 2rem;
  }
}

h2 {
  font-size: 1.0625rem;

  @media (min-width: 1441px) {
    font-size: 1.625rem;
  }
}

h4 {
  font-size: 1rem;
}

img {
  display: block;
}

input,
select,
textarea {
  background: light-dark(rgb(221, 221, 221), rgb(34, 34, 34));
  border: 1px solid rgb(60, 60, 60);
  border-radius: 0.1875rem;
  outline: none;
  padding: 0.5rem 1rem;
}

input,
select {
  font-family: inherit;
}

label {
  &.checkbox {
    align-items: center;
    display: flex;
    gap: 0.5rem;

    input:not(:checked) + lucide-icon {
      svg {
        display: none;
      }
    }

    lucide-icon {
      background: light-dark(rgb(221, 221, 221), rgb(34, 34, 34));
      border: 1px solid rgb(60, 60, 60);
      border-radius: 0.1875rem;
    }
  }

  &.toggler {
    cursor: pointer;

    &:has(input:checked) {
      lucide-icon:first-of-type {
        display: none;
      }
    }

    &:has(input:not(:checked)) {
      lucide-icon:last-of-type,
      + ul {
        display: none;
      }
    }
  }
}

ol,
ul {
  list-style: none;
  padding: 0;
}

select {
  appearance: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

tbody > tr:nth-child(odd) {
  background: light-dark(rgb(221, 221, 221), rgb(34, 34, 34));
}

textarea {
  font-family: "SF Mono", Menlo, Consolas, Monaco, monospace;
  overflow-wrap: normal;
  overflow-x: scroll;
  resize: none;
  white-space: pre;
}

th {
  font-weight: inherit;
  text-align: left;
}

.field {
  > div,
  > label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}
