/* =============================================================
   Procure.build — Base
   Sensible element defaults. No classes.
   ============================================================= */

/* ----- Headings ----- */

h1 { font-size: var(--font-size-lg); font-weight: 600 !important; margin-bottom: 1rem; }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-md); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

/* ----- Body copy ----- */

p {
  max-width: var(--content-width-sm);
  line-height: var(--line-height-normal);
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-subtle);
}

strong {
  font-weight: var(--font-weight-semibold);
}

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

code {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

pre {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* ----- Horizontal rule ----- */

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-6);
}

/* ----- Tables ----- */

th {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-subtle);
  text-align: left;
  padding: var(--space-2) var(--space-4);
  white-space: nowrap;
}

th {
  font-size: var(--font-size-xs);
}

td {
  padding: var(--space-2) var(--space-4);
  vertical-align: middle;
}

td:first-child, th:first-child {
  padding-left: 1rem;
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

tbody tr:last-child td {
  border-bottom: none;
}

tr.clickable {
  cursor: pointer;

  td:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
  }

  td:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
  }

  &:hover td {
    background-color: var(--gray-1);
  }
}

td:has(input) {
  padding-top: 0;
  padding-bottom: 0;
}

td input {
  padding: 4px !important;
  width: 5rem !important;
}

/* ----- Forms ----- */

label {
  display: block;
  /* font-size: var(--font-size-xs); */
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="search"],
input[type="password"],
input[type="url"],
select,
textarea {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-2);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

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

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-accent);
  cursor: pointer;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23868e96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

/* ----- Buttons ----- */

/* button,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  background-color: var(--color-accent);
  color: white;
} */

/* button:hover,
input[type="submit"]:hover {
  background-color: var(--color-accent-hover);
} */

button.add-button {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text);

  &:hover {
    background-color: var(--color-border-subtle);
  }
}

/* ----- Misc ----- */

details summary {
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  user-select: none;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

mark {
  background-color: var(--color-warning-subtle);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.25em;
}


body {
  &>aside {
    width: var(--sidebar-width);
    border-right: 1px solid var(--color-border);
  }
}
main {
  flex-grow: 1;
}