li {
  font-size: 14px;
  line-height: 1.5;
}

#content {
  max-width: 600px;
  font-family: Arial, sans-serif;
}

#content ul {
  margin: 1rem 0;
  padding: 0;
}

#content ul > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

#content ul > li > form > button {
  margin-bottom: 0.5rem;
}

#content h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

#content hr {
  margin: 1rem 0;
}

form div {
  margin-block: 1.2rem;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 14px;
  font-weight: bold;
}

form input[type="text"],
form input[type="password"],
form input[type="email"] {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

form .submit-row {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

form button[type="submit"],
form input[type="submit"],
form input[type="button"] {
  background: var(--button-bg);
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  color: var(--button-fg);
  cursor: pointer;
  transition: background 0.15s;
}

form button[disabled],
form input[type="submit"][disabled],
form input[type="button"][disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

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

form a.default {
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

form a.default:hover {
  text-decoration: underline;
}

form input[type="submit"].submit-link {
  background: none;
  color: var(--link-fg);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  padding: 0;
  border: none;
  cursor: pointer;
}

form input[type="submit"].submit-link:hover {
  color: var(--link-hover-color);
}

form .helptext {
  margin-block: 0.5rem;
  color: #757575;
}

form .helptext ul {
  margin: 0 !important;
}

/* Increase distance between button and Cancel/Back link */
form div button + a {
  margin-left: 1rem;
}

/*
Target checkbox/label combo's inside divs and paragraphs to make the checkbox
appear on the left side of the label
*/
div:has(> label + input[type="checkbox"]),
p:has(> label + input[type="checkbox"]) {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 1rem;
  justify-content: start;
}

div:has(> label + input[type="checkbox"]) label,
p:has(> label + input[type="checkbox"]) label {
  margin: 0;
}
