@import url("https://cdn.geheimesite.nl/reset.css");

:root {
  --bright-pink: #f3a8a8;
  --deep-purple: #071632;
  --bright-blue: #7194f0;
  --light-blue: #abc9f1;
  --teal: #008080;
  --dark-teal: #024848;
  --paper: #e6ecef;
  --light-grey: #ced4da;
  --rounded: 0.4125em;
}

body {
  color-scheme: light;
  font-family: sans-serif;
  background: var(--bright-pink);
  color: var(--deep-purple);
  padding: 25px;
  max-width: 80ch;
  margin: 0.5em auto;
}

/* Header */

h1 {
  font-size: 2.5em;
}

@media (min-width: 510px) {
  h1 + .button-wrapper {
    float: right;
    margin-top: -4.3em;
  }
}

@media (max-width: 510px) {
  h1 + .button-wrapper {
    margin-top: -0.5em;
    margin-bottom: 3em;
  }
}

/* Forms */

label {
  margin-top: 1em;
}

form {
  display: flex;
  flex-direction: column;
  width: fit-content;
  gap: 0.3em;
  width: 100%;
}

input,
textarea {
  border: 1px solid var(--deep-purple);
  border-bottom: 4px solid var(--deep-purple);
  border-radius: var(--rounded);
  outline: none;
  padding: 0.5em;
  resize: none;
}

input:focus,
textarea:focus {
  border-color: var(--deep-purple);
  border-bottom-color: var(--bright-blue)
}

/* Buttons */

a,
button,
input[type="button"],
input[type="submit"] {
  --border: 4px;
  --outset: 4px;

  display: block;
  cursor: default;
  text-decoration: none;
  background: var(--light-blue);
  color: var(--deep-purple);
  font-weight: 600;
  padding: 0.5em 1em;
  border: 1px solid var(--bright-blue);
  border-bottom-width: var(--border);
  border-radius: var(--rounded);
  transition: all 0.12s ease-out 0s;

  &:hover {
    filter: brightness(1.05);
    border-bottom-width: calc(var(--border) + var(--outset));
    margin-top: calc(-1 * var(--outset));
  }

  &:active {
    filter: brightness(0.98);
    border-bottom-width: 1px;
    margin-top: var(--border);
    animation: active-press 0.25s;
  }
}

@keyframes active-press {
  0% {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
  }
  50% {
    -webkit-transform: translateY(4px);
    transform: translateY(4px);
  }
  75% {
    -webkit-transform: translateY(2px);
    transform: translateY(2px);
  }
  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

/* Prevents elements below a button from jumping around */
.button-wrapper {
  height: 40px;
  display: flex;
  align-items: flex-end;
}

/* Icons */

.icon {
  width: 1em;
  vertical-align: sub;
}

/* Alignment inside of buttons */
.button-wrapper .icon {
  margin-right: 0.35em;
  margin-left: -0.15em;
}

/* Quotes */

.quote {
  background: var(--paper);
  color: var(--deep-purple);
  max-width: 780px;
  padding: 1.2em;
  margin-bottom: 20px;
  box-shadow: 18px 10px 0 0 var(--deep-purple);
  border-radius: var(--rounded);
}

q {
  font-size: 1.5em;
  margin-bottom: 0.3em;
}

q, cite {
  display: block;
}

.quote:nth-child(10n) { margin-left: -18px }
.quote:nth-child(10n + 1) { margin-left: 18px }
.quote:nth-child(10n + 2) { margin-left: -32px }
.quote:nth-child(10n + 3) { margin-left: -8px }
.quote:nth-child(10n + 4) { margin-left: -38px }
.quote:nth-child(10n + 5) { margin-left: 28px }
.quote:nth-child(10n + 6) { margin-left: -18px }
.quote:nth-child(10n + 7) { margin-left: 18px }
.quote:nth-child(10n + 8) { margin-left: -8px }
.quote:nth-child(10n + 9) { margin-left: 32px }

/* Votes */
.votes {
  display: flex;
  margin-bottom: .6em;
  margin-left: 0.5em;
  width: fit-content;
  height: 40px;
  float: right;
}

.votes button {
  background: var(--light-grey);
  border-color: var(--deep-purple);
  border-radius: 0;
}

.votes.upvoted button:first-child {
  background: #20c997;
  color: #021912;
}

.votes.downvoted button:last-child {
  background:#ff6b6b;
  color: #3d0c0c;
}

.votes button:first-child {
  border-right: 0.5px solid var(--deep-purple);
  border-radius: 1000em 0 0 1000em;
}

.votes button:last-child {
  border-left: 0.5px solid var(--deep-purple);
  border-radius: 0 1000em 1000em 0;
}

.teachers {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  margin-top: -1.2em;
  margin-bottom: 1em;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  height: 48px;
  padding: 4px 0;
}

.teachers::-webkit-scrollbar {
  display: none;
}

.teachers a {
  border-radius: 9999999px;
}

.teachers a.selected {
  border-color: var(--deep-purple);
  background-color: var(--paper);
}
