/* Global variables. */
:root {
  --standard-border-radius: 5px;
  --border: #898EA4;
  --border-width: 1px;

  /* Default (light) theme */
  --bg: #fff;
  --text: #212121;
  /* We've switched the link colours to what exists in Bootstrap */
  --accent: #0a58ca;
  --accent-hover: #0d6efd;
  --accent-text: var(--bg);
  --alert-border: #a3cfbb;
  --alert-bg: #d1e7dd;
  --alert-color: #75b798;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #212121;
    --text: #dcdcdc;
    --accent: #6ea8fe;
    --accent-hover: #8bb9fe;
    --alert-border: #0f5132;
    --accent-text: var(--bg);
    --alert-bg: #051b11;
    --alert-color: #75b798;
  }
}

body {
  color: var(--text);
  background-color: var(--bg);
  /* https://modernfontstacks.com */
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  font-weight: normal;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.5;
}

a,
a:visited {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

button,
input,
textarea {
  font-size: inherit;
  font-family: inherit;
  padding: 0.5em;
  margin: 10px 0;
  border-radius: var(--standard-border-radius);
}

input,
textarea {
  color: var(--text);
  background-color: var(--bg);
  border: var(--border-width) solid var(--border);
}

button {
  border: var(--border-width) solid var(--accent);
  background-color: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 0.9rem;
}

button:enabled:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  cursor: pointer;
}

.container {
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.content {
  /* This is necessary as some pages such as /contact ride right up against the footer */
  padding-bottom: 1rem;
}

.post {
  border: var(--border-width) solid var(--border);
  border-radius: var(--standard-border-radius);
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: .5rem;
}

.alert {
  margin: 1rem 0;
  padding: 1rem;
  border: var(--border-width) solid var(--alert-border);
  border-radius: var(--standard-border-radius);
  color: var(--alert-color);
  background-color: var(--alert-bg);
}

.pagination {
  text-align: center;
}

.header {
  padding-bottom: 1rem;
  border-bottom: var(--border-width) solid var(--border);
  text-align: center;
}

.footer {
  padding-top: 1rem;
  border-top: var(--border-width) solid var(--border);
  text-align: center;
}

/* This is a Django form class */
.errorlist {
  color: #ea868f;
}
