/* ============================================================
   Base – Reset, Typography, RTL/LTR, Scrollbars, Form Defaults
   ============================================================ */

/* Box-sizing Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Document */
html {
  height: 100%;
}

body {
  min-height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* Form Elements */
input,
select,
button,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

/* Remove number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Links */
a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Images */
img, svg {
  display: block;
  max-width: 100%;
}

/* Transitions */
.transition-bg {
  transition: background-color 0.25s ease;
}

.transition-color {
  transition: color 0.25s ease;
}

.transition-border {
  transition: border-color 0.25s ease;
}

.transition-all {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Selection */
::selection {
  background: var(--brand);
  color: #FFF;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* RTL adjustments */
[dir="rtl"] {
  text-align: right;
}

[dir="ltr"] {
  text-align: left;
}
