/*
 * Site styles, shared by every page. Page-specific layout lives in each
 * page's own <style>. The measurements come from Bootstrap 4, which the
 * site used before.
 */

/*
 * Colors. Each one is light-dark(<light>, <dark>): the color-scheme meta in
 * layout.hbs makes the page follow the system's light or dark setting.
 */
:root {
  --color-primary: #B72427;
  --color-on-primary: white;
  --color-primary-subtle: light-dark(rgb(255, 211, 212), #4a2224);

  --color-background: light-dark(#fff, #18191c);
  --color-foreground: light-dark(#212529, #e3e3e6);
  --color-foreground-muted: light-dark(#6c757d, #a3a4ab);
  --color-accent: light-dark(#b72427, #ff8a8c);
  --color-accent-hover: light-dark(#8f1c1f, #ffb0b2);
  --color-focus-ring: rgba(0, 123, 255, 0.25);
  --color-surface: light-dark(#e9ecef, #232428);
  --color-surface-raised: light-dark(#fff, #232428);
  --color-surface-muted: light-dark(#e9ecef, #2c2d32);
  --color-border: light-dark(#dee2e6, #3a3b41);
  --color-stripe: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.04));

  --color-secondary: light-dark(#efefef, #34353b);
  --color-secondary-border: light-dark(transparent, #4a4b52);

  --color-field: light-dark(#fff, #2c2d32);
  --color-on-field: light-dark(#495057, #e3e3e6);
  --color-field-border: light-dark(#ced4da, #4a4b52);
  --color-field-border-focus: light-dark(#80bdff, #5a9bf0);

  --color-success: light-dark(#28a745, #6fcf8c);
  --color-danger: light-dark(#dc3545, #ff7b80);

  --color-success-container: light-dark(#d4edda, #17331f);
  --color-success-container-border: light-dark(#c3e6cb, #24502f);
  --color-on-success-container: light-dark(#155724, #a8e2b8);
  --color-danger-container: light-dark(#f8d7da, #3d1a1c);
  --color-danger-container-border: light-dark(#f5c6cb, #5e2629);
  --color-on-danger-container: light-dark(#721c24, #ffb3b6);
  --color-warning-container: light-dark(#fff3cd, #3a2f12);
  --color-warning-container-border: light-dark(#ffeeba, #5a4a1b);
  --color-on-warning-container: light-dark(#856404, #f5d78a);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-display: 'Satisfy', cursive;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Base elements */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-family: sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-foreground);
  text-align: left;
  background-color: var(--color-background);
}
h1, h2, h3, h4, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}
h1, h2, h3 {
  font-family: var(--font-display);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h6 { font-size: 1rem; }
p,
ul,
pre {
  margin-top: 0;
  margin-bottom: 1rem;
}
blockquote {
  margin: 0 0 1rem;
}
b,
strong {
  font-weight: bolder;
}
a {
  color: var(--color-accent);
  text-decoration: underline;
  background-color: transparent;
}
a:hover {
  color: var(--color-accent-hover);
}
pre {
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 87.5%;
  color: var(--color-foreground);
}
img {
  vertical-align: middle;
  border-style: none;
}
table {
  border-collapse: collapse;
}
th {
  text-align: inherit;
}
label {
  display: inline-block;
  margin-bottom: 0.375rem;
}
input,
button,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
button {
  border-radius: 0;
}
button:focus {
  outline: 1px dotted;
  outline: 5px auto -webkit-focus-ring-color;
}
/* checkboxes come before their label text */
input[type="checkbox"] {
  padding: 0;
  margin-right: 0.5rem;
}
textarea {
  overflow: auto;
  resize: vertical;
}

/* Layout */

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) {
  .container { max-width: 540px; }
}
@media (min-width: 768px) {
  .container { max-width: 720px; }
}
@media (min-width: 992px) {
  .container { max-width: 960px; }
}
@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}

/* Header and footer */

.site-header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-on-primary);
}
.site-header > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.site-header a {
  color: var(--color-on-primary);
  text-decoration: none;
}
.site-title {
  display: inline-block;
  margin: 0;
  line-height: inherit;
  white-space: nowrap;
}
.site-content {
  display: block;
  margin-bottom: 6rem;
}
/* pages that do not open with a banner */
.site-content > .container:first-child {
  padding-top: 2rem;
}
/* A full-width band, for the top of a page. */
.banner {
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  background-color: var(--color-surface);
}
@media (min-width: 576px) {
  .banner { padding: 4rem 2rem; }
}
.site-footer {
  padding: 2.5rem 1rem;
  background-color: var(--color-surface);
}
.site-footer p:last-child {
  margin-bottom: 0;
}

/* Text */

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}
.quote {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.quote p {
  margin-bottom: 0;
}
.quote-author {
  display: block;
  font-size: 80%;
  color: var(--color-foreground-muted);
}
.quote-author::before {
  content: "\2014 \00A0";
}

/* Forms */

.field {
  margin-bottom: 1rem;
}
.input {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-on-field);
  background-color: var(--color-field);
  background-clip: padding-box;
  border: 1px solid var(--color-field-border);
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.input:focus {
  border-color: var(--color-field-border-focus);
  outline: 0;
  box-shadow: 0 0 0 0.2rem var(--color-focus-ring);
}
.input::placeholder {
  color: var(--color-foreground-muted);
  opacity: 1;
}
.input:disabled,
.input[readonly] {
  background-color: var(--color-surface-muted);
  opacity: 1;
}
select.input:not([size]):not([multiple]) {
  height: calc(2.25rem + 2px);
}
/* A label and its input on one line, from phone landscape width up. */
.field-inline {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  column-gap: 0.5rem;
}
@media (min-width: 576px) {
  .field-inline label {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
  }
  .field-inline .input {
    display: inline-block;
    width: auto;
    vertical-align: middle;
  }
}

/* Buttons */

.button {
  display: inline-block;
  font-weight: 400;
  color: var(--color-foreground);
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  background-color: var(--color-secondary);
  border: 1px solid var(--color-secondary-border);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.button:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem var(--color-focus-ring);
}
.button.disabled,
.button:disabled {
  opacity: 0.65;
}
.button:not(:disabled):not(.disabled) {
  cursor: pointer;
}
.button-large {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.3rem;
}
.button.button-accent {
  color: var(--color-accent);
}
.button.button-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

/* Alerts */

.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}
.alert > :last-child {
  margin-bottom: 0;
}
.alert-success {
  color: var(--color-on-success-container);
  background-color: var(--color-success-container);
  border-color: var(--color-success-container-border);
}
.alert-warning {
  color: var(--color-on-warning-container);
  background-color: var(--color-warning-container);
  border-color: var(--color-warning-container-border);
}
.alert-danger {
  color: var(--color-on-danger-container);
  background-color: var(--color-danger-container);
  border-color: var(--color-danger-container-border);
}

/* Cards */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--color-surface-raised);
  background-clip: border-box;
  border-radius: 0.25rem;
}
.card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}
.card-title {
  margin-bottom: 0.75rem;
}
.card-subtitle {
  margin-top: -0.375rem;
  margin-bottom: 0.5rem;
}
.card-text:last-child {
  margin-bottom: 0;
}

/* Tables */

.participants {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
  background-color: transparent;
}
.participants th,
.participants td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid var(--color-border);
}
.participants thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--color-border);
}
.participants tbody tr:nth-of-type(odd) {
  background-color: var(--color-stripe);
}

/* Dashboard statuses */

.status-yes {
  color: var(--color-success);
}
.status-no {
  color: var(--color-danger);
}

[hidden] {
  display: none !important;
}
