html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

::selection {
  background: var(--color-selection-highlight);
  color: var(--color-dark-mode-text);
}

html,
body,
#app {
  height: 100%;
  width: 100%;
}

body {
  color: var(--default-text-color);
  display: flex;
  flex-direction: column;
  font-family: var(--font-primary);
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: var(--default-line-height);
  position: relative;
}

section {
  padding: var(--section-padding);
}

a[href],
input[type='submit'],
input[type='image'],
label[for],
select,
button {
  cursor: pointer;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-speed-link);
}
a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}
a:focus {
  outline: thin dotted;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  line-height: var(--heading-line-height);
}

h1,
h2,
h3 {
  color: var(--blue-70);
}

h1,
h2 {
  font-weight: bold;
  margin-bottom: var(--layout-3);
}

h1 {
  font-size: var(--font-size-h1);
}
h2 {
  font-size: var(--font-size-h2);
}
h3 {
  font-size: var(--font-size-h3);
  font-weight: 300;
  margin-bottom: var(--layout-2);
}

p {
  margin-bottom: var(--layout-1);
}

mark {
  font-style: normal;
}

small {
  font-size: var(--font-size-small);
}

ul {
  margin-left: 20px; /* Lines up the bullets with where the text itself would normally be */
}

details {
  margin-bottom: var(--layout-1);
}

summary {
  cursor: pointer;
}

label[for]::after {
  content: ':';
}

fieldset {
  margin-bottom: var(--layout-2);
}

input[type='date'],
input[type='datetime-local'],
input[type='email'],
input[type='number'],
input[type='password'],
input[type='tel'],
input[type='text'],
input[type='time'],
input[type='url'],
select,
textarea {
  border: thin solid var(--default-border-color);
  display: block;
  font-size: 1em;
  outline: 0;
  padding: var(--spacing-3);
  transition: border-color var(--transition-speed-input) ease-in-out;
  width: 100%;
}
input[type='date']:focus,
input[type='datetime-local']:focus,
input[type='email']:focus,
input[type='number']:focus,
input[type='password']:focus,
input[type='tel']:focus,
input[type='text']:focus,
input[type='time']:focus,
input[type='url']:focus,
select:focus,
textarea:focus {
  border-color: var(--active-border-color);
}
textarea {
  height: var(--default-textarea-height);
}

select {
  background-color: white;
  height: var(--spacing-8);
}

button:hover,
button:focus,
.button:hover,
.button:focus {
  cursor: pointer;
}

button,
.button {
  align-items: center;
  border: 0;
  display: inline-flex;
  font-size: var(--font-size-body);
  font-weight: bold;
  justify-content: center;
  outline: 0;
  padding: var(--spacing-5);
  text-align: center;
  transition: ease-in background-color var(--transition-speed-button), ease-in transform var(--transition-speed-button);
  white-space: nowrap;
}
button:hover,
.button:hover {
  box-shadow: var(--button-hover-shadow);
  transform: scale(var(--button-hover-scalar));
}
button:focus,
.button:focus {
  outline: var(--button-outline-width) solid var(--button-outline-color);
  outline-offset: var(--button-outline-width);
}
button:focus:active,
.button:focus:active {
  outline: none;
}
button:active,
.button:active {
  box-shadow: var(--button-active-shadow);
  transform: scale(var(--button-click-scalar));
}
button[disabled],
.button[disabled],
button[disabled]:hover,
.button[disabled]:hover,
button[disabled]:active,
.button[disabled]:active,
button[disabled]:focus,
.button[disabled]:focus {
  background-color: var(--cool-gray-30);
  box-shadow: none;
  color: var(--default-text-color);
  cursor: default;
  transform: none;
}

table {
  margin-bottom: var(--layout-2);
  width: 100%;
}

th,
td {
  border-top: thin solid var(--default-border-color);
  padding: var(--spacing-3);
  text-align: center;
}
th:first-child,
td:first-child {
  text-align: left;
}
th:last-child,
td:last-child {
  text-align: right;
}

th {
  border-bottom: 2px solid var(--default-border-color);
}

.table-hover tbody tr:hover {
  cursor: pointer;
  background-color: var(--cool-gray-10);
}

blockquote {
  font-size: var(--font-size-h3);
  line-height: var(--default-line-height);
}

figure {
  margin-bottom: var(--layout-2);
}
figure img {
  display: block;
  margin: 0 auto;
}

figcaption {
  font-size: var(--font-size-body);
  line-height: var(--default-line-height);
  margin-bottom: var(--layout-3);
}

progress {
  --progress-height: var(--layout-2);
  --white-overlay: rgba(255, 255, 255, .25);
  --black-overlay: rgba(0, 0, 0, .25);
  --stripe-overlay: rgba(0, 0, 0, .1);
  --progress-background-size: calc(2 * var(--progress-height)) var(--progress-height), 100% 100%, 100% 100%;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  border: none;
  height: var(--progress-height);
  width: 100%;
}

progress[value]::-webkit-progress-bar {
  background-color: var(--progress-background-color);
  box-shadow: var(--progress-box-shadow);
}
progress[value]::-webkit-progress-value {
  background-image:
      -webkit-linear-gradient(-45deg, transparent 33%, var(--stripe-overlay) 33%, var(--stripe-overlay) 66%, transparent 66%),
      -webkit-linear-gradient(top, var(--white-overlay), var(--black-overlay)),
      -webkit-linear-gradient(left, var(--sea-green-50), var(--blue-60));
  background-size: var(--progress-background-size);
}
progress[value]::-moz-progress-bar {
  background-image:
    -moz-linear-gradient(135deg, transparent 33%, var(--stripe-overlay) 33%, var(--stripe-overlay) 66%, transparent 66%),
    -moz-linear-gradient(top, var(--white-overlay), var(--black-overlay)),
    -moz-linear-gradient(left, var(--sea-green-50), var(--blue-60));
  background-size: var(--progress-background-size);
}

/* Utility Classes */
.clearfix::before {
  content: '';
  display: table;
}
.clearfix::after {
  clear: both;
}

a.danger {
  color: var(--color-error);
}
a.danger:hover {
  color: var(--color-danger);
}

input.highlight,
textarea.highlight {
  border: medium solid var(--color-link);
}

input[disabled],
textarea[disabled] {
  background-color: var(--cool-gray-20);
  border-color: var(--cool-gray-30);
  cursor: not-allowed;
}

.error,
.success {
  font-size: var(--font-size-small);
  line-height: var(--default-line-height);
  padding: var(--spacing-3);
}

.error {
  background-color: var(--color-error-background);
  border: thin solid var(--color-error);
  color: var(--color-error);
}

.noBreak {
  white-space: nowrap;
}

.page {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
}

.pageContent {
  margin-top: var(--header-height);
}

.success {
  --transition-time: 300ms;
  background-color: var(--color-success-background);
  border: thin solid var(--color-success);
  color: var(--color-success);
  transition: opacity var(--transition-time);
}

details[open] .summaryLink {
  margin-bottom: var(--spacing-3);
}

.summaryLink {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-speed-link);
}
.summaryLink:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}
.summaryLink:focus {
  outline: thin dotted;
}

.textShadow {
  text-shadow: var(--contrast-text-shadow);
}

.textCenter {
  text-align: center;
}

.textRight {
  text-align: right;
}

.truncate {
  /* truncate text if it exceeds parent */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop {
  display: var(--desktop-display) !important;
}

.desktopFlex {
  display: var(--desktop-flex-display) !important;
}

.mobile {
  display: var(--mobile-display) !important;
}

.mobileFlex {
  display: var(--mobile-flex-display) !important;
}

.primaryButton:hover,
.darkModePrimaryButton:hover,
.secondaryButton:hover,
.dangerButton:hover {
  text-decoration: none;
}

.primaryButton {
  background-color: var(--color-link);
  color: var(--color-dark-mode-text);
}
.primaryButton:hover {
  background-color: var(--color-link-hover);
  color: var(--color-dark-mode-text);
}

.darkModePrimaryButton {
  background-color: white;
  color: var(--color-link);
}
.darkModePrimaryButton:hover {
  color: var(--color-link);
}

.secondaryButton,
.dangerButton {
  background-color: transparent;
  border-style: solid;
  border-width: medium;
}

.secondaryButton {
  border-color: var(--color-link);
  color: var(--color-link);
}
.secondaryButton:hover {
  border-color: var(--color-link-hover);
  color: var(--color-link-hover);
}

.dangerButton {
  border-color: var(--color-danger);
  color: var(--color-danger);
}
.dangerButton:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.compactButton {
  font-size: var(--font-size-small);
  padding: var(--spacing-2);
}
