@import url("./generated-brand.css");

* {
  box-sizing: border-box;
}

[data-auth-i18n="pending"] body {
  visibility: hidden;
}

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 16% -8%, rgba(39, 67, 54, 0.45), transparent 48%),
    linear-gradient(180deg, var(--shell-top) 0%, var(--shell-mid) 50%, var(--page-bg) 100%);
  color: var(--text);
  font-family: var(--font-family);
  min-height: 100vh;
  display: block;
}

.shell {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--shell-pt-desktop) var(--shell-px-desktop) var(--shell-pb-desktop);
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.brand {
  display: grid;
  justify-items: center;
  gap: var(--logo-name-gap);
  margin-top: 27px;
  margin-bottom: var(--brand-bottom-desktop);
}

.brand-logo {
  width: var(--logo-size);
  height: var(--logo-size);
  border-radius: var(--logo-radius);
  display: block;
}

.brand-name {
  font-size: var(--brand-size);
  font-weight: var(--brand-weight);
  letter-spacing: 0.2px;
}

h1 {
  margin: 0 auto var(--title-bottom-desktop);
  font-size: clamp(2.1rem, 6vw, var(--title-size-desktop));
  line-height: 1.04;
  letter-spacing: var(--title-letter-spacing-desktop);
  font-weight: var(--title-weight);
  max-width: var(--title-max-width);
}

p {
  margin: 0 auto var(--body-bottom-desktop);
  color: var(--text-muted);
  line-height: 1.56;
  max-width: var(--content-max-width);
  font-size: var(--body-size-desktop);
  font-weight: 400;
}

.status {
  margin: 0 auto var(--status-bottom-desktop);
  min-height: 52px;
  padding: 8px 0;
  border-radius: 14px;
  font-size: var(--meta-size-desktop);
  line-height: 1.4;
  max-width: var(--content-max-width);
  text-align: left;
  transition: color 160ms ease, opacity 160ms ease;
  opacity: 0;
}

.status--idle {
  color: transparent;
  opacity: 0;
}

.status--ok {
  color: #c8f4dd;
  opacity: 1;
}

.status--error {
  color: #ffd0d0;
  opacity: 1;
}

.row {
  display: grid;
  gap: var(--row-gap);
  margin: 0 auto var(--row-bottom);
  max-width: var(--content-max-width);
  text-align: left;
}

.form-stack {
  width: min(100%, 320px);
  max-width: none;
  margin: 20px auto 0;
}

.form-stack .row {
  max-width: none;
  width: 100%;
  margin: 0 0 var(--row-bottom);
}

.field-note,
.field-error {
  margin: 0 auto 10px;
  width: 100%;
  max-width: 320px;
  padding-left: 10px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.field-note {
  color: var(--text-muted);
}

.field-note::before {
  content: "✗";
  display: inline;
  color: currentColor;
}

.field-note--valid {
  color: var(--text-muted);
}

.field-note--valid::before {
  content: "✓";
  color: currentColor;
}

.field-error {
  color: #ffd0d0;
  min-height: 18px;
  margin-bottom: 0;
}

.field-note--hidden {
  display: none;
}

.field-note--shake {
  animation: field-note-shake 420ms ease;
}

@keyframes field-note-shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.field-with-toggle {
  position: relative;
  width: 100%;
}

label {
  font-size: var(--meta-size-desktop);
  color: var(--text-soft);
}

input {
  width: 100%;
  border-radius: 999px;
  border: 0;
  background: rgba(31, 56, 45, 0.92);
  color: var(--text);
  padding: 14px 48px 14px 18px;
  font-size: var(--input-size);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
}

input:focus {
  outline: 2px solid rgba(242, 199, 75, 0.44);
}

.input-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.input-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: translateY(-50%);
}

.input-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: var(--actions-y-desktop) 0 var(--actions-y-desktop);
}

.form-actions {
  max-width: 580px;
  margin: var(--actions-y-desktop) auto var(--actions-y-desktop);
}

button,
.button-link {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--highlight-text);
  font-weight: var(--cta-weight);
  font-size: var(--cta-size-desktop);
  line-height: 1;
  padding: var(--cta-py-desktop) var(--cta-px-desktop);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-actions button {
  width: 100%;
  min-width: 0;
}

button[disabled] {
  opacity: 1;
  cursor: pointer;
}

button:hover:not(.input-toggle),
.button-link:hover {
  transform: none;
}

.meta {
  margin: 0 auto var(--meta-bottom-desktop);
  font-size: var(--meta-size-desktop);
  color: var(--text);
  max-width: var(--content-max-width);
}

.meta-hint {
  color: var(--text-muted);
  margin-bottom: var(--body-bottom-desktop);
  font-weight: 400;
}

.meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.meta a:hover {
  text-decoration: underline;
}

.meta-legal {
  margin-top: auto;
  padding-top: 20px;
  margin-bottom: 0;
}

.shell > :nth-child(2) {
  margin-top: auto;
}

.shell > :nth-last-child(2) {
  margin-bottom: auto;
}

@media (max-width: 520px) {
  .shell {
    padding: var(--shell-pt-mobile) var(--shell-px-mobile) var(--shell-pb-mobile);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .brand {
    margin-top: 18px;
    margin-bottom: var(--brand-bottom-mobile);
  }

  h1 {
    margin-bottom: var(--title-bottom-mobile);
    font-size: var(--title-size-mobile);
    letter-spacing: var(--title-letter-spacing-mobile);
  }

  p {
    font-size: var(--body-size-mobile);
    margin-bottom: var(--body-bottom-mobile);
  }

  .status {
    margin-bottom: var(--status-bottom-mobile);
  }

  .actions {
    margin: var(--actions-y-mobile) 0 var(--actions-y-mobile);
  }

  .form-actions {
    margin: var(--actions-y-mobile) auto var(--actions-y-mobile);
  }

  button,
  .button-link {
    font-size: var(--cta-size-mobile);
    padding: var(--cta-py-mobile) var(--cta-px-mobile);
  }

  .meta {
    font-size: var(--meta-size-mobile);
    margin-bottom: var(--meta-bottom-mobile);
  }

  .meta-hint {
    margin-bottom: var(--body-bottom-mobile);
  }

  .meta-legal {
    padding-top: 16px;
  }
}
