@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 400;
  src: url(lato-v24-latin-regular.woff2) format(woff2);
}

body, html {
  display: flex;
  flex-direction: column;

  margin: 0;
  min-width: max(100vw, 300px);
  min-height: 100vh;

  font-family: Lato, system-ui;
  font-weight: 400;
  font-style: normal;

  font-size: 16px;

  --fg: #6f6f6f;
  color: var(--fg);
  background: linear-gradient(-45deg, #e7e7dd, #d7e3d7, #d6dfe5, #e9e9d8);

  @media (prefers-color-scheme: dark) {
    --fg: #b7b7b7;
    background: #1e1e1e;
  }

  user-select: none;
}

::selection {
  background: #296ca766;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 1;

  display: flex;
  flex: 0 0 56px;

  box-sizing: border-box;
  padding: 0 16px;

  align-items: center;

  border: 1px solid #d7d7d7;
  background: #ffffff;
  box-shadow: 0 0 4px #0008;

  font-size: 18px;

  @media (prefers-color-scheme: dark) {
    border-color: #1e1e1e;
    background: linear-gradient(#3c3c3c, #333333);
  }
}

.appbar-icon {
  width: 36px;
  height: 36px;

  margin-right: 8px;

  background: url(login-icon.svg);
  background-size: contain;
}

.content {
  display: flex;
  justify-content: center;
  align-items: center;

  flex: 1;
}

.footer {
  position: sticky;
  bottom: 0;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  flex: 0 0 32px;

  box-sizing: border-box;
  padding: 0 16px;

  border: 1px solid #d6d6de;
  background: #e8e8f1;

  @media (prefers-color-scheme: dark) {
    border-color: #1e1e1e;
    background: linear-gradient(#3c3c3c, #333333);
  }
}

.about {
  padding-bottom: 4px;
}

.about-poweredby {
  display: inline-block;

  font-size: 9px;

  vertical-align: middle;
}

.about-logo {
  display: inline-block;

  width: 14px;
  height: 14px;

  background: url(alad-logo-small.svg);
  background-size: contain;

  vertical-align: middle;
}

.about-aladcloud {
  font-size: 12px;
}

.card {
  flex: 1;
  max-width: 500px;

  margin: 16px;
  border-radius: 4px;
  box-shadow: 0 2px 2px #0003;

  background: #ffffff;

  @media (prefers-color-scheme: dark) {
    background: #272727;
  }

  @media (max-width: 550px) {
    max-width: calc(100% - 32px);
    align-self: flex-start;
  }
}
.card-editable {
  background: #f0f4f7;

  @media (prefers-color-scheme: dark) {
    background: #373737;
  }
}

.card-title {
  display: flex;
  align-items: center;

  position: relative;

  height: 48px;
  line-height: 47px;
  padding: 0 16px;

  border-bottom: 1px solid #2196f3;

  &::before {
    content: '';

    pointer-events: none;

    position: absolute;
    inset: 0;

    border-bottom: 1px solid #d3eafc;
  }

  @media (prefers-color-scheme: dark) {
    &::before {
      border-bottom-color: #263d4f;
    }
  }
}

.card-title-text {
  flex: 1;
}

.card-content {
  padding: 32px;
}

.content-block {
  display: flex;
  align-items: center;

  &:not(:first-child) {
    margin-top: 16px;
  }
}

.account-icon {
  flex-shrink: 0;

  width: 32px;
  height: 32px;

  mask-image: url(account-icon.svg);
  background: var(--fg);

  margin-right: 8px;
}
.account-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.center {
  justify-content: center;
}

.fill {
  flex: 1;
}

.button {
  display: inline-block;

  border-radius: 99px;
  padding: 8px 32px;

  font-size: 14px;

  border: 0; /* reset */
  text-decoration: none; /* reset */

  cursor: pointer;
}
.button:not(.button-primary) {
  color: #296ca7;
  background: #296ca700;
  border: 1px solid #d7d7d7;

  transition: 200ms ease background-color;

  @media (prefers-color-scheme: dark) {
    color: #ffc107;
    background: #ffc10700;
    border-color: #3e3c37;
  }

  &:hover {
    background: #eef3f8;

    @media (prefers-color-scheme: dark) {
      background: #383325;
    }
  }

  &:active {
    background: #c8d9e9;

    @media (prefers-color-scheme: dark) {
      background: #5e4f20;
    }
  }

  &:disabled {
    pointer-events: none;

    color: inherit;
  }
}
.button-primary {
  color: white;
  background: #296ca7;
  box-shadow: 0 .5px .5px #0002;

  transition: 200ms ease box-shadow;

  @media (prefers-color-scheme: dark) {
    color: black;
    background: #ffc107;
  }

  &:hover {
    box-shadow: 0 2px 3px #0002;
  }

  &:active {
    box-shadow: 0 .5px .5px #0002;
  }

  &:disabled {
    pointer-events: none;

    color: white;
    background: #6f6f6f;
    box-shadow: none;

    @media (prefers-color-scheme: dark) {
      background: #b7b7b7;
    }
  }
}

.text-field {
  display: flex;

  position: relative;

  border-bottom: 2px solid #c3c5c6;
  background: #e9ecef;

  @media (prefers-color-scheme: dark) {
    border-color: #696969;
    background: #353535;
  }

  &:hover {
    background: #e1e4e7;

    @media (prefers-color-scheme: dark) {
      background: #3d3d3d;
    }
  }

  &:focus-within {
    border-color: #89accb;
    background: #e9ecef;

    @media (prefers-color-scheme: dark) {
      border-color: #9a7b1e;
      background: #353535;
    }
  }

  &.error {
    border-color: #d07a8b;

    @media (prefers-color-scheme: dark) {
      border-color: #cf6679;
    }
  }

  &:has(> input:disabled) {
    pointer-events: none;

    background: transparent;

    > span {
      color: inherit;
    }
  }

  /* label */
  > span {
    position: absolute;
    inset: 6px 12px;

    display: block;
    font-size: 12px;

    pointer-events: none;

    color: #296ca7;

    @media (prefers-color-scheme: dark) {
      color: #f4b90a;
    }
  }

  /* input */
  > input {
    flex: 1;

    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;

    padding: 22px 12px 6px;

    color: inherit;
    font-size: inherit;

    /* HACK: alcuni browser mettono un fastidiosissimo colore di sfondo custom per l'autofill, questo hack lo toglie. */
    &:-webkit-autofill {
      -webkit-transition-delay: 9999s; /* reset */
    }
  }

  /* error */
  + div {
    line-height: 1em;
    min-height: 1em;
    padding: 6px 12px 8px;
    font-size: 12px;

    color: #f45d53;

    @media (prefers-color-scheme: dark) {
      color: #de9090;
    }
  }
}

/* Alad.OidcService.Profiles.CustomProfileBase.BuiltInButton */
.profile-builtin-button {
  margin: 0 0 2em 1em;
}
