/*Variables*/
:root {
  --primary: #00d4a8;
  --primary-dark: #00c79e;

  --gray: #e5e5e5;
  --gray-light: #ededed;
  --gray-dark: #6a6a6a;

  --green: #75b444;
  --red: #bc3b3b;

  --background-color: #ffffff;
  --font-color: #000000;
}

html,
body {
  padding: 0;
  margin: 0;
  height: 100vh;
}

body {
  background-color: var(--background-color);
  color: var(--font-color);
}

body,
.button {
  font-family: "Catamaran", sans-serif;
  font-size: 18px;
  line-height: 28px;
}

/*Layout*/
.layout {
  height: auto;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

main {
  height: auto;
  width: calc(100% - 32px);
  max-width: 1024px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
  margin: 0 auto;
  padding: 0 16px 16px 16px;
}

.page-content {
  padding: 16px;
  width: 100%;
  max-width: 700px;
}

.card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-light);
  border-radius: 16px;
}

/*Header*/
header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  margin: 16px auto;
}

header img {
  width: 64px;
  height: auto;
}

header img:not(:last-child) {
  margin-right: 16px;
}

header .step {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 20px;
}

.step.active-step {
  background-color: var(--gray-light);
}

.step:not(.active-step) {
  display: none;
}

/*Footer*/
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column;
  padding: 16px 8px;
  border-top: 1px solid var(--gray);
}

footer .copyright {
  display: flex;
  flex-flow: column;
  align-items: center;
  white-space: pre;
  margin-top: 16px;
}

.lang-container {
  margin-bottom: 16px;
  margin-right: 0px;
  position: relative;
}

.lang-container img {
  width: 60px;
  height: 42px;
}

.lang-switcher {
  width: 60px;
  position: absolute;
  top: -200px;
  left: -2px;
  border: 1px solid rgb(204, 204, 204);
  background-color: var(--gray-light);
  border-radius: 2px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px 0px;
  padding: 2px;   
}

.lang-switcher img {
  display: block;
  margin-bottom: 5px;
}

.lang-selected {
  display: flex;
}

.lang-selected img {
  border: 1px solid rgb(204, 204, 204);
}

/*General*/
h1 {
  margin-bottom: 48px;
  font-size: 40px;
  line-height: 40px;
}

p {
  margin: 16px 0;
}

a {
  text-decoration: underline;
}

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

/*Overview*/
.overview-info {
  font-size: 28px;
  line-height: 28px;
}

.overview-info__row {
  display: flex;
  flex-flow: column;
  margin-bottom: 8px;
}

/*Util*/
.primary {
  color: var(--primary);
}

.text-lg {
  font-size: 30px;
  color: #6f809c;
  font-weight: 400;
  line-height: 1.2em;
}

.text-b {
  font-weight: 700;
  color: #3d5275;
}

/*Spinner*/
.spinner-container {
  margin: 0 auto;
}

.spinner-img {
  display: block;
  margin: 0 auto;
}

.spinner-text {
  text-align: center;
}

/*Button*/
.button {
  display: inline-block;
  text-decoration: none;
  padding: 8px 32px;
  background-color: var(--primary);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  white-space: pre;
  border: none;
  outline: none;
}

.button.secondary {
  background-color: var(--gray);
  color: var(--gray-dark);
}

.button.secondary:hover {
  background-color: var(--gray-light);
}

.button,
.button:active .button:visited {
  color: #ffffff;
}

.button:hover {
  background-color: var(--primary-dark);
}

.button:disabled,
.button.disabled {
  cursor: not-allowed;
  color: var(--gray-light);
  background-color: var(--gray);
}

.hidden {
  visibility: hidden;
}

.overview-checkbox {
  display: flex;
  justify-content: center;
  align-items: center;
}

.overview-checkbox input {
  cursor: pointer;
  transform: scale(1.2);
}

.overview-checkbox label {
  display: inline-block;
  cursor: pointer;
}

.video-container {
  position: relative;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 172px);
  background-color: #000000;
  color: #ffffff;
  border-radius: 16px;
}

.video-container * {
  box-sizing: inherit;
}

.video-container p,
.video-container .label {
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
}

.video-container video,
.video-container canvas {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 172px);
  object-fit: cover;
  border-radius: 16px;
}

.video-flipped {
  transform: rotateY(180deg);
}

.video-container .button {
  padding: 10px;
}

.video-error {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px;
}

.video-unsupported {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #000;
}

.video-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.video-controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
}

.video-preview-actions {
  display: flex;
  flex-wrap: wrap;
}

.video-preview-actions > * {
  display: inline-block;
  margin: 0 16px 16px 0;
}

.info-page {
  text-align: justify;
}

.info-page__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column;
  margin-top: 32px;
  font-size: 18px;
}

.info-page__actions-link {
  color: var(--font-color);
  font-weight: normal;
}

.info-page__actions > *:not(:last-child) {
  margin-bottom: 16px;
}

.page-actions {
  margin-top: 16px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  align-items: flex-start;
}

.page-actions p {
  margin-top: 0;
}

.page-actions .question {
  width: 100%;
}

.page-actions .actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.page-actions .actions > * {
  margin: 0 16px 16px 0;
}

.page-actions .actions > *:last-child {
  margin-right: 0;
}

.video-countdown {
  position: absolute;
  bottom: 48px;
  right: 16px;
  font-size: 120px;
}

.video-countdown p {
  margin: 0;
}

.video-recording-timer {
  position: absolute;
  top: 32px;
  right: 32px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;

  display: flex;
  align-items: center;
}

.video-recording-timer p {
  margin: 0;
  line-height: 1;
}

.video-recording-timer__icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #e55226;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid #000000;
}

/*Switch*/
.switch input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  height: 20px;
  width: 40px;
  background: var(--gray-light);
  border-radius: 20px;
  transition: all 0.3s linear;
  cursor: pointer;
}

.switch.active {
  background: var(--green);
}

.switch.active div {
  transform: translateX(100%);
}

.switch div {
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.3s linear;
  cursor: pointer;
}

.switch .label {
  position: absolute;
  left: 100%;
  bottom: 0;
  width: max-content;
  line-height: 1;
  padding-left: 8px;
}

.progress-title {
  margin: 0;
}

.progress-container {
  height: 30px;
  width: 100%;
  background-color: #e0e0de;
  border-radius: 50px;
}

.progress-filer {
  height: 100%;
  background-color: var(--primary);
  border-radius: inherit;
  text-align: right;
}

.progress-label {
  padding: 5px;
  color: #ffffff;
  font-weight: bold;
  white-space: nowrap;
}

.divider {
  width: 100%;
  height: 2px;
  background-color: var(--gray);
  margin: 32px auto;
}

.page-actions__center {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}

@media screen and (min-width: 600px) {
  footer {
    flex-flow: row;
  }

  footer .copyright {
    margin-top: 0;
    margin-left: 16px;
  }

  .lang-container {
    margin-bottom: 0px;
    margin-right: 16px;
  }

  .lang-container img {
    width: 40px;
    height: 28px;
  }
  
  .lang-switcher {
    width: 40px;
    top: -140px;
  }

  .overview-info__row {
    display: flex;
    flex-flow: row;
    margin-bottom: 8px;
  }

  .overview-info__row div:first-child {
    width: 40%;
  }

  .info-page {
    font-size: 22px;
  }
}

@media screen and (min-width: 769px) {
  .button {
    padding: 12px 32px;
  }

  .button.lg {
    font-size: 22px;
  }

  .page-actions {
    grid-template-columns: 1fr auto;
  }

  .page-actions p {
    padding-right: 16px;
  }

  .page-actions .question {
    font-size: 20px;
  }
}

@media screen and (min-width: 1025px) {
  .step:not(.active-step) {
    display: block;
  }
}
