* {
  margin: 0;
  padding: 0;
}

:root {
  --background: #f5f5f5;
  --footer-background: #e4e4e4;
  --panel-background: white;
  --input-background: var(--background);
  --foreground: black;
  --foreground-dimmed: rgb(53, 53, 53);
  --primary: #681887;
  --primary-foreground: white;
  --link: #2da8ed;
  --error: #ff2020;
  --success: #1cc838;
  --warning: #ffa318;
  --border: #e4e4e4;
  --error-border: #e31e1e;
  --input-border: #e4e4e4;
  --focus-border: #8225aa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #161616;
    --footer-background: #131313;
    --panel-background: #1a1a1a;
    --input-background: #222222;
    --foreground: white;
    --foreground-dimmed: rgb(212, 212, 212);
    --primary: #4d016b;
    --primary-foreground: white;
    --link: #2da8ed;
    --error: #ff2020;
    --success: #1cc838;
    --warning: #ffa318;
    --border: #1d1d1d;
    --error-border: #8d1111;
    --input-border: #2c2c2c;
    --focus-border: #631c80;
  }
}

html {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Roboto';
}

body {
  min-height: calc(100vh + 50px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

header {
  background-color: var(--primary);
  height: 50px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
  font-weight: bold;
  justify-content: space-between;
}

.nav-link {
  color: var(--primary-foreground);
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  font-size: 14pt;
  display: inline-block;
  margin-left: 15px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: inherit;
}

nav {
  text-align: right;
  width: 70%;
}

footer {
  text-align: center;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--footer-background);
  font-size: 10pt;
  font-weight: 200;
}

main {
  flex-grow: 1;
  max-width: 1024px;
  width: 100%;
  align-self: center;
}

a {
  color: var(--link);
}

#profilePictureContainer {
  text-align: center;
}

#profilePicture {
  height: 22vh;
  border-radius: 5%;
}

#profilePage > .input-label {
  font-weight: 500;
  font-size: 18px;
}

#profilePage .link {
  margin-top: 2%;
  display: inline-block;
}

#profilePage #email {
  display: block;
  width: calc(100% - 18px);
  padding: 8px;
  margin-left: 0;
  margin-right: 0;
  background-color: var(--input-background);
  color: var(--foreground);
  border: 1px solid var(--input-border);
  border-radius: 5px;
  font-size: 16px;
  line-height: 18px;
  font-family: 'Roboto', sans-serif;
  text-decoration: none;
}

.hint-label-error {
  color: var(--error);
}

.hint-label-success {
  color: var(--success);
}

.hint-label-warning {
  color: var(--warning);
}

#nav-brand {
  font-size: 20pt;
  text-decoration: none;
  color: var(--primary-foreground);
}

.form-panel {
  background-color: var(--panel-background);
  border: solid 1px var(--border);
  border-radius: 20px;
  padding: 3% 5%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 5%;
  height: 75vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2.5%;
}

@media screen and (max-width: 500px) {
  .form-panel {
    background: none;
    border: none;
  }
  html{
    background-color: var(--panel-background);
  }
}

.form-title {
  font-size: 32pt;
  text-align: center;
}

.form {
  text-align: left;
  display: flex;
  flex-direction: column;
  margin-top: 2vh;
  justify-content: space-between;
  flex-grow: 1;
}

.error-list {
  color: var(--error);
  margin-top: 3%;
}

.input-label {
  display: block;
  margin-top: 3%;
  margin-bottom: 1%;
}

.h-captcha {
  margin-top: 3%;
  margin-bottom: -1%;
}

.error-label {
  display: block;
  margin-top: 1%;
  font-size: 11pt;
  color: var(--error);
}

.hint-label {
  display: block;
  margin-top: 1%;
  font-size: 11pt;
}



.invisible {
  display: none !important;
}

.invalid-field {
  border: 1px solid var(--error-border) !important;
}

textarea,
select,
input[type=text],
input[type=number],
input[type=password],
input[type=date],
input[type=url],
input[type=email] {
  display: block;
  width: calc(100% - 18px);
  padding: 8px;
  margin-left: 0;
  margin-right: 0;
  background-color: var(--input-background);
  color: var(--foreground);
  border: 1px solid var(--input-border);
  border-radius: 5px;
  font-size: 16px;
  line-height: 18px;
  font-family: 'Roboto', sans-serif;
}

input:disabled {
  color: var(--foreground-dimmed);
}

#otp-secret {
  display: block;
  width: calc(100% - 18px);
  padding: 8px;
  margin-left: 0;
  margin-right: 0;
  background-color: var(--input-background);
  color: var(--foreground);
  border: 1px solid var(--input-border);
  border-radius: 5px;
  font-size: 16px;
  line-height: 18px;
  font-family: 'Roboto', sans-serif;
  text-overflow: ellipsis;
  overflow: hidden;
  cursor: copy;
}

#activate-otp-page form {
  margin-top: 0;
}

textarea {
  resize: none;
}

textarea:focus,
select:focus,
input[type=text]:focus,
input[type=number]:focus,
input[type=password]:focus,
input[type=date]:focus,
input[type=url]:focus,
input[type=email]:focus,
select:focus {
  outline-style: none;
  border: 1px solid var(--focus-border) !important;
}

.clickable {
  cursor: pointer;
}

.btn {
  display: inline-block;
  outline: none;
  background-color: var(--primary);
  border: none;
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 14pt;
  text-align: center;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
}

.btn-green {
  background-color: var(--success);
}

.btn-red {
  background-color: var(--error);
}

.btn:hover,
.clickable:hover {
  filter: brightness(0.95)
}

.btn:active,
.clickable:active {
  filter: brightness(0.90)
}

.submit-div {
  text-align: center;
  display: flex;
  justify-content: space-evenly;
}


.submit-div .btn {
  width: 40%;
  padding: 10px 15px;
}

.consent-h3 {
  margin-top: 4%;
  margin-bottom: 3%;
}

#qr-code-container {
  height: 27vh;
  text-align: center;
  margin-bottom: 1vh;
  margin-top: 2vh;
}

#qr-code {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

#left-aligned {
  text-align: left;
}

#forgotPasswordPanel .hint-label-success {
  margin-top: 2vh;
  margin-bottom: -1.5vh;
}

#recoveryCodesContainer {
  flex-grow: 1;
  display: flex;
  margin-top: 2vh;
  margin-bottom: 8vh;
}

textarea#recoveryCodes {
  display: block;
  resize: none;
  flex-grow: 1;
  line-height: 30px;
  text-align: center;
  padding-top: 2vh;
}
#recoveryCodesExplanation {
  text-align: center;
}

#list-apps-page {
  text-align: left;
  display: flex;
  flex-direction: column;
}

#list-apps-page-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
}

#list-apps-create {
  margin-top: 2vh;
}

#app-list {
  margin-top: 1vh;
  flex-grow: 1;
  overflow-y: auto;
  min-height: 0;
}

#appForm {
  margin-top: -1vh;
}

.app-list-entry {
  display: block;
  text-decoration: none;
  color: var(--foreground);
  background-color: var(--input-background);
  padding: 12px;
  border-radius: 5px;
  margin-top: 1vh;
}

#deleteAppBtn {
  margin-top: 1.5vh;
  display: inline-block;
}

#confirmText {
  text-align: center;
}

#cancel-btn {
  text-decoration: underline;
}

#use-passkey-btn {
  display: block;
  width: 100%;
}

.or-label {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 20px;
  margin-top: 2%;
  margin-bottom: -1%;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Regular.ttf');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Italic.ttf');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Bold.ttf');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Light.ttf');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-LightItalic.ttf');
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Medium.ttf');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-MediumItalic.ttf');
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Medium.ttf');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-MediumItalic.ttf');
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Medium.ttf');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-MediumItalic.ttf');
  font-weight: 500;
  font-style: italic;
}
