/* Global Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  color: var(--clr-text-0);
  background: var(--clr-bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--clr-bg-4);
  border-radius: 3px;

  &:hover {
    background: var(--clr-text-3);
  }
}

/* Selection */
::selection {
  background: var(--clr-accent);
  color: white;
}

/* Links */
a {
  color: var(--clr-accent);
  text-decoration: none;

  &:hover {
    color: var(--clr-accent-hover);
  }
}

/* Inputs */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: var(--clr-text-0);
  background: var(--clr-bg-1);
  border: var(--border-medium);
  border-radius: var(--radius-sm);
  padding: var(--gap-sm) var(--gap-md);
  outline: none;
  transition: border-color var(--transition-fast);

  &:focus {
    border-color: var(--clr-accent);
  }

  &::placeholder {
    color: var(--clr-text-3);
  }
}

/* Buttons */
button {
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--clr-text-0);
  background: var(--clr-bg-3);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--gap-sm) var(--gap-lg);
  cursor: pointer;
  transition: background var(--transition-fast);

  &:hover {
    background: var(--clr-bg-hover);
  }

  &:active {
    background: var(--clr-bg-4);
  }

  &[data-primary] {
    background: var(--clr-accent);
    border-color: transparent;

    &:hover {
      background: var(--clr-accent-hover);
    }

    &:active {
      background: var(--clr-accent-active);
    }
  }
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

th {
  text-align: left;
  font-weight: 500;
  color: var(--clr-text-2);
  padding: var(--gap-sm) var(--gap-md);
  border-bottom: var(--border-medium);
}

td {
  padding: var(--gap-sm) var(--gap-md);
  border-bottom: var(--border-subtle);
}

tr:hover td {
  background: var(--clr-bg-2);
}

/* Utility */
.mono {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge[data-status='deferred'] {
  background: var(--clr-warning-dim);
  color: var(--clr-status-deferred);
}

.badge[data-status='queued'] {
  background: var(--clr-info-dim);
  color: var(--clr-status-queued);
}

.badge[data-status='taken'] {
  background: rgba(156, 39, 176, 0.15);
  color: var(--clr-status-taken);
}

.badge[data-status='processing'] {
  background: var(--clr-success-dim);
  color: var(--clr-status-processing);
}

.badge[data-status='completed'] {
  background: rgba(139, 195, 58, 0.15);
  color: var(--clr-status-completed);
}