:root {
  --primary-color: rgb(199, 0, 67);
  --secondary-color: #a2005b;
  --font-color: rgb(51, 51, 51);
  --bg-color: #fff;
  --border-color: #eee;
  --button-border-color: #ccc;
  --button-font-color: rgb(51, 51, 51);
  --input-background: #fff;
  --input-border: rgb(221, 221, 221);
  --input-color: rgb(157, 157, 157);
  --link-color: #3369e7;

  --loading-grad-dark: #eee;
  --loading-grad-light: #eee;
  --loading-grad-bg: #f6f7f8;
}


body {
    font-family: sans-serif;
    margin: 0;
    min-height: 100vh;
    /* transition: all 0.3s ease-in-out; */
}


header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    justify-content: space-between;
    align-items: center;
}

header h2 {
    margin: 0 auto;
}
header svg {
    max-width: 160px;
    width: 100%;
}

main {
  margin: 0 auto;
  max-width: 800px;
}


#form,
#loading {
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 5px;
  margin: 40px 0;
  display: none;
}

#form.active,
#loading.active {
  display: block;
}

#loading {
  text-align: center;
}
.loader {
  margin: 0 auto;
}

h2, label, p {
  color: var(--font-color);
}

label {
  display: block;
  margin-bottom: 5px;
}

input {
  padding: 10px;
  font-size: 1rem;
  background: var(--input-background);
  border: 1px solid var(--input-border);
  color: var(--input-color);
  width: calc(100% - 20px);
  border-radius: 5px;
}



.field {
  margin: 1rem 0;
}

.hint {
  font-size: 0.7rem;
  color: var(--font-color);
  opacity: 0.7;
  display: none;
}
.hint.active {
  display: block;
}

button {
  background: var(--primary-color);
  color: white;
  padding: 10px 40px;
  font-size: 1rem;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
}


.infopanel.success {
  border: 1px solid green;
  color: green;
  background: lightgreen;
  padding: 10px;
  border-radius: 5px;
}

.infopanel.error {
  border: 1px solid #aa5e5e;
  color: #aa5e5e;
  background: #ffe2e2;
  padding: 10px;
  border-radius: 5px;
}

fieldset {
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 1rem;

  legend {
    padding: 0 5px;
    color: var(--font-color);
  }
}

.loader {
  position: relative;
  width: 48px;
  height: 48px;
}
.loader:before{
    content: "";
    border-left: 24px solid var(--font-color);
    border-right: 24px solid var(--font-color);
    position: absolute;
    height: 24px;
    width: 0;
    left: 50%;
    transform: translateX(-50%);
    top: 0px;
    animation: splitX 1s  linear infinite alternate;
}
.loader:after{
  content: '';
  width: 48px;
  height: 24px;
  background: var(--font-color);
  position: absolute;
  left: 0;
  bottom:0;
  animation:moveY 1s linear infinite alternate;
}
@keyframes splitX {
  0% {width: 0; transform: translate(-50% , 0)}
  33% {width: 100%; transform: translate(-50% , 0)}
  66% {width: 100%; transform: translate(-50% , 24px)}
  100% {width: 0; transform: translate(-50% , 24px)}
}

@keyframes moveY {
  0% , 33% {transform: translateY(0)}
  66% , 100% {transform: translateY(-24px)}
}

.spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 4px solid #FFF;
  border-bottom-color: transparent;
  margin-left: 10px;
  border-radius: 50%;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  margin-bottom: -4px;
}
.spinner.active {
  display: inline-block;
}

@keyframes rotation {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
} 

@media (prefers-color-scheme: dark) {

  :root {
    --secondary-color: #ff60ba;
    --font-color: rgb(210, 210, 210);
    --bg-color: #212a34;
    --border-color: #465566;
    --button-border-color: #677382;
    --button-font-color:  #fff;
    --input-background: rgb(48, 59, 72);
    --input-border: #5d6c7d;
    --input-color: #fff;
    --link-color: #A0DFFF;

    --loading-grad-dark: rgb(72, 84, 98);
    --loading-grad-light: rgba(176, 90, 119, 0.39);
    --loading-grad-bg: #212a34;
  }

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

  .logo-text path,
  .logo-text rect {
    fill: var(--font-color);
  }
 
}