:root {
  --darwin-titlebar-height: 36px;
  --radius: 4px;
}

html,
body {
  height: 100vh;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  font-size: 13px;
  line-height: 13px;
  background-color: rgba(255, 255, 255, 0.45);
}

* {
  box-sizing: border-box;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  touch-action: none;
}

p {
  margin: 1rem 0;
}
p:first-child {
  margin-top: 0;
}
p:last-child {
  margin-bottom: 0;
}
p strong {
  font-weight: 700;
}

a {
  color: rgb(0, 0, 204);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

hr {
  border: none;
  border-top: 1px solid #ccc;
  width: 100%;
}

.loading {
  cursor: wait;
}

input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 1;
  color: #444;
}

.button {
  background-color: #00008b;
  border: 1px solid #00008b;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: #fff;
}
.button:focus,
.button:active {
  box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.2);
  outline: none;
}
.button.danger {
  background-color: #c00;
  border: 1px solid #c00;
}
.button.danger:active,
.button.danger:focus {
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.2);
}
.button.secondary {
  border: 1px solid #ccc;
  background-color: #fff;
  color: inherit;
}
.button.secondary:hover {
  background-color: #eee;
}
.button.secondary:active {
  background-color: #ddd;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-small {
  padding: 3px;
  border-radius: 2px;
}
.button-small:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
.button-small:active,
.button-small:focus {
  background-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 2px rgba(0, 0, 139, 0.75);
}
.button-small svg {
  width: 13px;
  height: 13px;
  vertical-align: bottom;
}

.field {
  display: flex;
  white-space: nowrap;
  align-items: stretch;
}
.field > * {
  display: inline-block;
  margin: 0;
  border-radius: 0;
}
.field .label,
.field span.checkbox {
  background-color: #eee;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid #ccc;
  justify-content: center;
}
.field > input,
.field > textarea,
.field > select {
  flex: 1;
  padding: 0 0.5rem;
  border: 1px solid #ccc;
  background-color: #fff;
  appearance: none;
}
.field > input:focus,
.field > textarea:focus,
.field > select:focus {
  outline: none;
  border-color: #00008b;
  box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.2);
}
.field > input.invalid,
.field > textarea.invalid,
.field > select.invalid {
  background-color: rgba(255, 80, 80, 0.3);
  border-color: rgb(255, 80, 80);
}
.field.inline {
  display: inline-flex;
}
.field.inline > input,
.field.inline > textarea,
.field.inline > select {
  max-width: 150px;
}
.field > span.checkbox {
  min-width: 75px;
  background-color: #fff;
}
.field > select {
  appearance: none;
  padding: 0.5rem 2rem 0.5rem 0.5rem;
  background: #fff;
  background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}
.field > :first-child {
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
.field > *:not(:last-child) {
  border-right: none;
}
.field > :last-child {
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

code,
.code {
  font-family: Menlo, monospace;
}

.settinggrid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  align-items: center;
  gap: 0.5rem;
}

@keyframes flashGreen {
  0% {
    color: #0d0;
  }
  100% {
    color: unset;
  }
}
.flash-green {
  animation: 1s ease-out 0s 1 flashGreen;
}
