:root {
  --border: #ccc;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

main {
  padding-bottom: 1rem;
}

section {
  &:last-child {
    margin-bottom: 0;
  }
}

input[type=number] {
  width: 4rem;
}

svg {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

table {
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  width: 100%;

  th, td {
    padding: 0.1rem 0.5rem;
  }

  td {
    border: 1px solid var(--border);
  }
}

#controls {
  margin-bottom: 1rem;
}

.load {
  display: block;
  width: 100%;
  height: 1.2rem;
  border-radius: 0.25rem;
  position: relative;
  overflow: hidden;

  background: var(--color-gray-lighter);

  .load__slider {
    font-size: 10pt;
    border-radius: 0.25rem;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;

    position: absolute;
    top: 0;
    bottom: 0;

    background: var(--accent-primary);
    color: white;
  }

  .load__handle {
    width: 1.2rem;
    border-radius: 0.25rem;

    position: absolute;
    top: 0;
    bottom: 0;

    background: hsl(from var(--accent-primary) h s calc(l + 15));
  }
}

.rate-graph {
  display: flex;
  flex-direction: row;
  align-items: end;
  gap: 0.2rem;

  .rate-graph__bar {
    text-align: center;

    background: var(--accent-primary);
  }

  .rate-graph__label {
    color: white;
  }
}

.bg-red { background: var(--color-red) }
.bg-green { background: var(--color-green) }
.mb-1 { margin-bottom: 1rem }
