/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  line-height: 1.5;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

#root,
#__next {
  isolation: isolate;
}

/* Variables */
:root {
  /* Colors */
  --light: #ffffff;
  --light-dust: #fefef9;
  --dust: #f4f1ef;
  --medium-dust: #dadada;
  --dark-dust: #bfbfbf;
  --fade: #878787;
  --twilight: #4a4a4a;
  --dark-twilight: #2f2f2f;
  --dark: #2a2a2a;
  --dark-dark: #121212;
  --light-custard: #eee7d5;
  --custard: #f0dcac;
  --dark-custard: #d4c7a9;
  --water: #a8f3f4;
  --splash: #4b3aba;

  /* Sizes */
  --space: 12px;
  --double-space: calc(var(--space) * 2);
  --half-space: calc(var(--space) / 2);
  --quarter-space: calc(var(--space) / 4);
  --outer-space: var(--double-space);
}

/* Media queries */
@media (min-width: 1380px) {
  :root {
    --outer-space: 15%;
  }
}

@media (max-width: 720px) {
  body header h1 {
    font-size: 1em;
  }
}

html,
body {
  height: 100%;
  /* font-size: 1.05em; */
  font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--twilight);
}

a {
  font-weight: 500;
  color: var(--splash);
  text-decoration: none;
  cursor: pointer;
}

hr {
  margin: var(--double-space) 0;
  height: 0;
  border: 0;
  border-bottom: 1px solid var(--dark-custard);
}

body {
  margin: 0;
  padding: 0;
  background: var(--custard);
  font-family: Inter;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark);
}

header {
  display: flex;
  padding: var(--double-space) var(--outer-space);
  background: var(--light);
  justify-content: space-between;
  align-items: center;
}

header>h1 {
  font-size: 1.44em;
}

#switch-icon {
  width: 30px;
  height: 30px;
  display: inline-block;
  vertical-align: middle;
  margin: 0 var(--space);
  top: -2px;
  position: relative;
}

#switch-icon #layer1 path {
  fill: var(--twilight);
}

header>div>a#logout {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--twilight);
  text-decoration: none;
  color: var(--dust);
  transition: background 0.2s;
}

header>div>a#logout:hover {
  background: var(--splash);
  color: var(--light);
}

aside {
  padding: 0 var(--outer-space) var(--double-space) var(--outer-space);
  background: var(--light);
}

aside>div {
  background: var(--dust);
  padding: var(--double-space);
  border-radius: var(--quarter-space);
  overflow: hidden;
}

aside>div>h2 {
  font-size: 1.22em;
  margin: 0 0 6px 0;
}

aside>div>figure {
  width: 100px;
  height: 100px;
  border: 1px solid var(--dark-dust);
  float: left;
  margin-right: var(--double-space);
}

aside>div>dl {
  overflow: hidden;
}

aside>div>dl>dt {
  float: left;
  clear: left;
  margin: 0 var(--double-space) 0 0;
  width: 180px;
  font-weight: 600;
  color: var(--twilight);
}

nav {
  display: block;
  border-bottom: 1px solid var(--dark-custard);
  background: var(--light);
}

nav ol {
  margin: 0 calc(var(--outer-space));
  padding: 0;
  list-style-type: none;
  overflow: hidden;
}

nav ol li {
  margin: 0;
  padding: 0;
  float: left;
  position: relative;
}

nav>ol>li>a {
  display: block;
  padding: var(--half-space) var(--half-space) var(--quarter-space);
  margin: 0 var(--space);
  border-bottom: var(--half-space) solid transparent;
  text-decoration: none;
  color: var(--dark);
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.04em;
}

nav>ol>li:first-child>a {
  margin-left: 0;
}

nav ol li a:hover {
  border-color: rgba(0, 0, 0, 0.6);
}

nav ol li a.current {
  font-weight: bold;
  border-color: var(--splash);
  color: var(--splash);
}

/* Submenu styles */
nav ol li ol {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--light);
  border: 1px solid var(--dark-custard);
  border-top: none;
  border-radius: 0 0 var(--quarter-space) var(--quarter-space);
  padding: var(--half-space) 0;
  min-width: 200px;
  z-index: 1000;
}

nav ol li:hover ol {
  display: block;
}

nav ol li ol li {
  float: none;
  margin: 0;
}

nav ol li ol li a {
  display: block;
  padding: var(--half-space) var(--double-space);
  margin: 0;
  border: none;
  border-left: var(--half-space) solid transparent;
  font-weight: normal;
}

nav ol li ol li a:hover {
  border-color: var(--splash);
  background: var(--dust);
}

nav ol li ol li a.current {
  border-color: var(--splash);
  background: var(--dust);
}

/* Admin submenu styles */
.admin-submenu {
  display: block;
  border-bottom: 1px solid var(--dark-custard);
  background: var(--light);
  margin-bottom: var(--space);
}

.admin-submenu ol {
  margin: 0 calc(var(--outer-space));
  padding: 0;
  list-style-type: none;
  overflow: hidden;
}

.admin-submenu ol li {
  margin: 0;
  padding: 0;
  float: left;
}

.admin-submenu ol li a {
  display: block;
  padding: var(--half-space) var(--space);
  margin: 0;
  border-bottom: var(--half-space) solid transparent;
  text-decoration: none;
  color: var(--dark);
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.admin-submenu ol li a:hover {
  border-color: rgba(0, 0, 0, 0.6);
}

.admin-submenu ol li a.current {
  font-weight: bold;
  border-color: var(--splash);
  color: var(--splash);
}

article {
  padding: var(--double-space) var(--outer-space);
}

div.content-view {
  background: var(--dust);
  padding: var(--double-space);
  margin-bottom: var(--space);
}

div.content-view>h2 {
  margin: 0 0 var(--space) 0;
}

div.services {
  display: flex;
  justify-content: start;
  gap: var(--double-space);
  flex-wrap: wrap;
}

div.services>div,
div.infobox {
  background: var(--light);
  padding: var(--double-space);
  border-radius: 6px;
  flex: 240px;
  max-width: 420px;
  display: flex;
  flex-flow: column;
  justify-content: space-between;
}

div.infobox button {
  margin-top: var(--double-space);
}

div.services>div>div.description {
  margin-bottom: var(--double-space);
}

div.services>div>div.description>p {
  margin-top: var(--half-space);
}

div.services>div>a,
a.button,
button {
  display: block;
  color: var(--light);
  background: var(--splash);
  padding: var(--space) var(--double-space);
  border-radius: var(--quarter-space);
  opacity: 0.85;
  cursor: pointer;
  text-align: center;
  border: 0;
  font-weight: 600;
  text-decoration: none;

  transition: opacity 0.15s;
}

button.small {
  font-size: 0.78em;
  padding: var(--half-space) var(--space);
}

div.services>div>a:hover,
a.button:hover,
button:hover {
  opacity: 1.0;
}

button:disabled {
  opacity: 0.6;
  background: var(--twilight);
  cursor: default;
}

button.secondary {
  background: var(--twilight);
}

article table {
  width: 100%;
  border-spacing: 0;
  margin: var(--space) 0;
}

article table thead th {
  background: var(--twilight);
  color: var(--medium-dust);
}

article table thead th a {
  color: var(--light);
}

article table thead th:first-child {
  border-radius: var(--half-space) 0 0 0;
}

article table thead th:last-child {
  border-radius: 0 var(--half-space) 0 0;
}

article table tbody {
  background: var(--light-dust);
}

article table tbody tr:nth-child(odd) {
  background: var(--light-custard);
}

article table tbody tr:nth-child(odd) td {
  border-top: 1px solid var(--dark-custard);
  border-bottom: 1px solid var(--dark-custard);
}

article table tbody tr:last-child td {
  border-bottom: var(--half-space) solid var(--twilight);
}

article table thead th,
article table tbody td {
  padding: var(--space);
  text-align: left;
}

article table#user_email_table tbody tr td:first-child {
  text-align: center;
}

article table tbody td input[type="radio"] {
  width: var(--double-space);
  height: var(--double-space);
  vertical-align: middle;
}

form>div {
  margin: 0 0 var(--double-space);
}
form>div.checkbox {
  margin: 0 0 var(--space);
}

form>div>label {
  display: block;
  margin: 0 0 6px;
}

form>div>input[type="text"],
form>div>input[type="password"],
form>div>input[type="email"] {
  border: 2px solid var(--twilight);
  border-radius: var(--quarter-space);
  padding: 8px;
  background: var(--light-dust);
  width: 100%;
  color: var(--dark);
}

form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

form div.buttonHolder button, form div.buttonHolder a {
  display: inline-block;
}

.form-group textarea {
  width: 100%;
}

#email-add-overlay {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#email-add-overlay .content-view {
  width: 600px;
  padding: var(--double-space);
}

#email-add-overlay .panel-body div {
  margin: var(--double-space) 0;
}

#login {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 1em 0 1em 0;
}

#login-messages {
  width: 800px;
  max-width: 100%;
  margin-bottom: 20px;
}

#login-messages .message {
  padding: 15px;
  border-radius: var(--space);
  background-color: var(--light-dust);
  margin-bottom: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#login-messages .message.success {
  background-color: #d4edda;
  color: #155724;
}

#login-messages .message.error {
  background-color: #f8d7da;
  color: #721c24;
}

#login-messages .message.warning {
  background-color: #fff3cd;
  color: #856404;
}

#login-messages .message.info {
  background-color: #d1ecf1;
  color: #0c5460;
}

#loginbox {
  border-radius: var(--space);
  border: 6px solid white;
  width: 800px;
  height: 500px;

  display: flex;
  flex-flow: row;
}

#loginbox>div {
  padding: var(--double-space);
  flex: 1;
}

#loginbox label {
  color: var(--twilight);
}

#loginbox>div.login {
  background: var(--light-dust);
  display: flex;
  flex-flow: column;
  justify-content: space-between;
}

#loginbox>div.signup {
  background: var(--water);
  display: flex;
  flex-flow: column;
  align-items: center;
}

#loginbox>div:first-child {
  border-radius: var(--half-space) 0 0 var(--half-space);
}

#loginbox>div:last-child {
  border-radius: 0 var(--half-space) var(--half-space) 0;
}

#loginbox>div:last-child>* {
  flex: 1;
}

#loginbox div.new_here {
  margin-top: var(--double-space);
}

#loginbox div.new_here h2 {
  margin: var(--double-space) 0;
}

#loginbox button {
  width: 100%;
}

#loginbox img {
  padding: 0 var(--double-space);
}

/* Application box styling - matches loginbox */
#applicationbox {
  border-radius: var(--space);
  border: 6px solid white;
  width: 800px;
  height: auto;
  display: flex;
  flex-flow: row;
  max-width: 100%;
}

#applicationbox>div {
  padding: var(--double-space);
  flex: 1;
  overflow-y: visible;
}

#applicationbox>div.application-form {
  background: var(--light-dust);
  display: flex;
  flex-flow: column;
  justify-content: flex-start;
}

#applicationbox>div.application-info {
  background: var(--water);
}

#applicationbox>div:first-child {
  border-radius: var(--half-space) 0 0 var(--half-space);
}

#applicationbox>div:last-child {
  border-radius: 0 var(--half-space) var(--half-space) 0;
}

#applicationbox>div:last-child>* {
  flex: 1;
}

#applicationbox div.about {
  margin-top: var(--double-space);
}

#applicationbox h2 {
  margin: var(--double-space) 0 var(--space);
}
#applicationbox p {
  margin: 0 0 var(--space);
}

#applicationbox button {
  width: 100%;
}

#applicationbox img {
  padding: 0 var(--double-space);
}

footer {
  margin: var(--space) var(--outer-space);
  padding: var(--space);
  border-radius: var(--quarter-space);
  background: var(--dark);
  color: var(--dust);
  font-size: 0.78em;
  opacity: 0.8;
}

footer a,
footer a:visited,
footer a:active {
  color: var(--dust);
  text-decoration: underline;
}

span.time_remaining {
  color: var(--fade);
}

.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: var(--half-space) 0;
  margin: 0;
}

.pagination>li {
  margin: 0 var(--half-space);
}

.pagination>li:first-child {
  margin-right: var(--double-space);
}

.pagination>li:last-child {
  margin-left: var(--double-space);
}

.pagination .page-item {
  border: 1px solid var(--fade);
  padding: var(--quarter-space) var(--half-space);
  border-radius: var(--half-space);
  background: var(--light-dust);
  font-size: 0.78em;
}

.pagination .page-link {
  padding: var(--half-space);
  color: var(--twilight);
}

.pagination .page-item.active {
  background: var(--twilight);
}

.pagination .page-item.active .page-link {
  color: var(--light-dust);
  font-weight: bold;
}

.pagination .page-item.disabled {
  opacity: 0.6;
}

.pagination .page-item.disabled .page-link {
  cursor: default;
}

@media (max-width: 800px) {
  #applicationbox {
    flex-flow: column;
    width: 100%;
    height: auto;
  }

  #applicationbox>div:first-child {
    border-radius: var(--half-space) var(--half-space) 0 0;
  }

  #applicationbox>div:last-child {
    border-radius: 0 0 var(--half-space) var(--half-space);
  }
}
