html:root {
  --colors-brand: hsl(217, 60%, 53%);
  --colors-brandAccent: hsl(226, 100%, 57%);
  --colors-brandButtonText: rgb(255, 255, 255);
  --colors-defaultButtonBackground: white;
  --colors-defaultButtonBackgroundHover: #eaeaea;
  --colors-defaultButtonBorder: lightgray;
  --colors-defaultButtonText: gray;
  --colors-dividerBackground: #eaeaea;
  --colors-inputBackground: transparent;
  --colors-inputBorder: lightgray;
  --colors-inputBorderHover: gray;
  --colors-inputBorderFocus: gray;
  --colors-inputText: black;
  --colors-inputLabelText: rgb(0, 0, 0);
  --colors-inputPlaceholder: darkgray;
  --colors-messageText: #2b805a;
  --colors-messageBackground: #e7fcf1;
  --colors-messageBorder: #d0f3e1;
  --colors-messageTextDanger: #ff6369;
  --colors-messageBackgroundDanger: #fff8f8;
  --colors-messageBorderDanger: #822025;
  --colors-anchorTextColor: #777;
  --colors-anchorTextHoverColor: black;
  --space-spaceSmall: 4px;
  --space-spaceMedium: 8px;
  --space-spaceLarge: 16px;
  --space-labelBottomMargin: 8px;
  --space-anchorBottomMargin: 4px;
  --space-emailInputSpacing: 4px;
  --space-socialAuthSpacing: 4px;
  --space-buttonPadding: 10px 15px;
  --space-inputPadding: 10px 15px;
  --fontSizes-baseBodySize: 15px;
  --fontSizes-baseInputSize: 14px;
  --fontSizes-baseLabelSize: 14px;
  --fontSizes-baseButtonSize: 14px;
  --fonts-bodyFontFamily: ui-sans-serif, sans-serif;
  --fonts-buttonFontFamily: ui-sans-serif, sans-serif;
  --fonts-inputFontFamily: ui-sans-serif, sans-serif;
  --fonts-labelFontFamily: ui-sans-serif, sans-serif;
  --borderWidths-buttonBorderWidth: 1px;
  --borderWidths-inputBorderWidth: 1px;
  --radii-borderRadiusButton: 4px;
  --radii-buttonBorderRadius: 4px;
  --radii-inputBorderRadius: 4px;
}

body {
  background-attachment: fixed;
  background-size: 100% calc(min(var(--gw-body-height) * 1px, 200%));
  background-image: linear-gradient(var(--gw-bg-cover), var(--gw-bg-cover)),
    var(--gw-gradient);
  background-position-y: calc(
    -100vh * (var(--gw-body-scroll) / var(--gw-body-height))
  );
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}


html {
  /* https://www.joshwcomeau.com/gradient-generator/?colors=00a5ff|ff20ce&angle=135&colorMode=hsl&precision=7&easingCurve=0.29310344827586204|0.7698276125151535|0.5301724137931034|0.3775862332048087 */
  --gw-gradient: linear-gradient(
    135deg,
    hsl(201deg 100% 50%) 0%,
    hsl(211deg 100% 51%) 10%,
    hsl(222deg 100% 51%) 20%,
    hsl(232deg 100% 52%) 28%,
    hsl(242deg 100% 52%) 36%,
    hsl(252deg 100% 53%) 44%,
    hsl(262deg 100% 53%) 52%,
    hsl(272deg 100% 54%) 61%,
    hsl(283deg 100% 55%) 70%,
    hsl(293deg 100% 55%) 79%,
    hsl(303deg 100% 56%) 89%,
    hsl(313deg 100% 56%) 100%
  );

  --gw-code-bg-cover: rgb(255 255 255 / 0.9);
  --gw-code-bg-border: #f8f8f8;
  --gw-main-bg-cover: rgb(255 255 255 / 0.98);
  --gw-bg-cover: rgb(0 0 0 / 0);
  --gw-footer-cover: var(--gw-code-bg-cover);
}

html.dark {
  --gw-code-bg-cover: rgb(10 10 10 / 0.8);
  --gw-code-bg-border: #080808;
  --gw-main-bg-cover: rgb(0 0 0 / 0.5);
  --gw-bg-cover: rgb(0 0 0 / 0.75);
  --gw-footer-cover: rgb(0 0 0 / 0.7);
}

  /*************************/

.user-anon #root {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;

  & > div {
    min-width: 500px;

    &:has(.logged-in) {
      min-width: 0;
    }
  }

  .app-container {
    width: 500px;
  }

  h1 {
    font-weight: bold;
    font-size: 175%;
  }

  h2 {
    font-weight: bold;
    font-size: 150%;
    margin-bottom: 1rem;
  }

  .form-links {
    margin-top: .5em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .5em;
  }
}

#root, main {
  a, .link {
    font-family: var(--fonts-bodyFontFamily);
    font-size: var(--fontSizes-baseBodySize);
    margin-bottom: var(--space-anchorBottomMargin);
    color: var(--colors-anchorTextColor);
    display: inline;

    cursor: pointer;
    text-decoration: underline;

    &:hover {
      color: var(--colors-anchorTextHoverColor);
    }
  }

  p {
    font-family: var(--fonts-labelFontFamily);
    font-size: var(--fontSizes-baseLabelSize);
    margin-bottom: var(--space-labelBottomMargin);
    color: var(--colors-inputLabelText);
  }

  .logged-in {
    text-align: center;
  }

  h1 {
    color: white;
  }

  h3 {
    font-weight: bold;
    margin-bottom: .7rem;
  }

  /************************/

  .app-container > div {
    padding: 2em 5em;
    background-color: var(--gw-main-bg-cover);
    border-radius: 0.5rem;
    box-shadow: rgb(255 255 255/0.25) 0px 0px 40px;
  }

  button {
    font-weight: bold;
  }

  .download-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2em;

    a {
      margin: 0;
      display: flex;
      align-items: center;
    }

    svg {
      display: inline-block;

      height: 24px;
      width: 24px;

      &.apple {
      }
      &.windows {
        scale: 0.6;
      }

      path {
        fill: currentColor;
        stroke: currentColor;
        stroke-width: 0;
      }
    }
  }

  .flash {
    font-weight: bold;
    padding: 0.5em 1em;
    border-radius: 0.3em;
  }
  .flash--success {
    background-color: rgb(209, 255, 209);
    color: rgb(0, 0, 0);
  }
  .flash--error {
    background-color: rgb(255, 209, 209);
    color: rgb(155, 0, 0);
  }

  form {
    &.form {
      display: flex;
      flex-direction: column;
      gap: .5em;
    }

    label {
      display: block;
      font-size: .9em;
    }

    input {
      padding: 0.5em;
      border-radius: 0.2em;
      font-size: 1em;
      border: 1px solid lightgray;
      margin-bottom: 0.7em;
    }
  }

  .button {
    padding: 0.5em 1em;
    border-radius: 0.2em;
    border: 1px solid lightgray;
    background-color: var(--colors-brand);
    color: var(--colors-brandButtonText);
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 1em;
    &:hover {
      background-color: var(--colors-brandAccent);
    }
  }

  button.open-app {
    margin-top: 1em;

    background-color: var(--colors-brand);
    color: var(--colors-brandButtonText);
    border-color: var(--colors-brandAccent);

    font-family: var(--fonts-buttonFontFamily);
    display: inline-block;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radii-borderRadiusButton);
    font-size: var(--fontSizes-baseButtonSize);
    padding: var(--space-buttonPadding);
    cursor: pointer;
    border-width: var(--borderWidths-buttonBorderWidth);
    border-style: solid;
    transition-property: background-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 100ms;

    &:hover {
      background-color: var(--colors-brandAccent);
    }
  }

  button.link {
    border: none;
    margin: 0;
    padding: 0;
    width: auto;
    overflow: visible;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: normal;
    -webkit-font-smoothing: inherit;
    -moz-osx-font-smoothing: inherit;
    appearance: none;
  }
}
