::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--f3-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--f3-border); }
* { scrollbar-width: thin; scrollbar-color: var(--f3-bg) transparent; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--f2-bg);
  color: var(--text);
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

body, button, input, select, textarea, #input {
  font-family: var(--font);
  color: var(--text);
}

body {
  font-size: var(--font-size);
}

button, input, select, textarea, #input, h1, h2, h3, h4, h5 {
  font-size: 1em;
}

h1, h2, h3, h4, h5 {
  color: var(--text-accent);
}

body, button, input, select, textarea, p {
  line-height: 1.5;
}

button, input, select, textarea {
  border: var(--border-width) solid var(--f3-border);
  background: var(--f3-bg);
  outline: none;
  border-radius: var(--border-radius);
}

input, select, textarea {
  padding: var(--input-padding);
}

button {
  line-height: 1.25;
  padding: var(--button-padding);
}

button:not(:disabled) {
  cursor: pointer;
}

button:not(:disabled):hover, select:hover, input:hover, textarea:hover {
  border-color: var(--primary);
  filter: var(--hover-filter);
}

button:disabled {
  opacity: var(--semi-transparent);
}

input {
  min-width: 0;
}

.icon-btn {
  width: 2em;
  aspect-ratio: 1;
  padding: 0;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}

.icon-btn:has(i + i) {
  width: 3em;
  height: 2em;
  aspect-ratio: unset;
  margin-right: var(--badge-spacing);
}

button.icon-btn,
button.icon-btn:hover {
  border-color: transparent;
}

textarea, code, pre, .tool-input, .tool-diff, .tool-result, .fe-line-numbers {
  font-family: var(--mono);
  font-size: var(--mono-size);
}

textarea {
  height: 12em;
  min-height: 12em;
  max-height: 12em;
  resize: none;
}

.fa-hourglass-half {
  animation: spin 1.5s ease infinite;
}

@keyframes spin {
  0%, 50%, 100% { scale: 1; }
  25%, 75% { scale: .9; }
  0% { rotate: 0; }
  50% { rotate: 180deg; }
  100% { rotate: 360deg; }
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  margin-left: 1.5em;
}
