/* Authentication forms */
.formArea {
  width: min(100%, 440px);
}

.headingBlock {
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #4f6f63;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.headingBlock h1 {
  margin: 0;
  color: #093a2a;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(42px, 4vw, 54px);
  font-weight: 610;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.description {
  max-width: 410px;
  margin: 15px 0 0;
  color: #53605b;
  font-size: 14px;
  line-height: 1.55;
}

.backButton,
.recoveryLink,
.notice button,
.successNotice button {
  padding: 0;
  border: 0;
  color: #164f3b;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.oauthBlock {
  display: grid;
  gap: 13px;
  margin-bottom: 22px;
}

.googleButton {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 51px;
  padding: 0 22px;
  border: 1px solid #cbd4ce;
  border-radius: 8px;
  color: #17251f;
  background: #fff;
  box-shadow: 0 1px 2px rgb(26 48 39 / 4%);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.googleButton:hover {
  border-color: #91a79d;
  background: #fbfdfb;
  box-shadow: 0 7px 18px rgb(26 48 39 / 8%);
  transform: translateY(-1px);
}

.googleButton[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.googleButton:focus-visible {
  outline: 3px solid rgb(39 116 90 / 18%);
  outline-offset: 2px;
}

.oauthTerms {
  margin: -2px 20px 0;
  color: #6a7771;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.oauthTerms a {
  color: #164f3b;
  font-weight: 700;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 11px;
  align-items: center;
  color: #7b8781;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  height: 1px;
  background: #dfe5e1;
  content: "";
}

.backButton {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 24px;
  font-size: 13px;
}

.errorSummary,
.notice,
.successNotice {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 22px;
  padding: 13px 14px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 12px;
}

.errorSummary {
  grid-template-columns: 22px 1fr;
  border-color: #e5afa7;
  color: #7d261d;
  background: #fff5f2;
}

.notice {
  border-color: #e8c889;
  color: #6e4a08;
  background: #fff9ed;
}

.successNotice {
  border-color: #9fc8aa;
  color: #155439;
  background: #f1faf3;
}

.errorSummary > svg,
.notice > svg,
.successNotice > svg {
  margin-top: 1px;
}

.errorSummary div,
.notice div,
.successNotice div {
  display: grid;
  gap: 2px;
}

.errorSummary strong,
.notice strong,
.successNotice strong {
  font-size: 13px;
}

.errorSummary span,
.notice span,
.successNotice span {
  color: inherit;
  line-height: 1.45;
  opacity: 0.82;
}

.notice button,
.successNotice button {
  align-self: center;
  font-size: 11px;
}

.form {
  display: grid;
  gap: 22px;
}

.fieldGroup {
  display: grid;
  gap: 8px;
}

.fieldGroup > label,
.labelRow label {
  color: #1c2a25;
  font-size: 13px;
  font-weight: 700;
}

.labelRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recoveryLink {
  font-size: 12px;
}

.inputWrap {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 51px;
  padding: 0 14px;
  border: 1px solid #cfd7d1;
  border-radius: 8px;
  color: #607069;
  background: #fff;
  box-shadow: 0 1px 2px rgb(26 48 39 / 3%);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.inputWrap:focus-within {
  border-color: #27745a;
  box-shadow: 0 0 0 3px rgb(39 116 90 / 12%);
}

.inputWrap.invalid {
  border-color: #bf5b50;
  background: #fffafa;
}

.inputWrap input {
  width: 100%;
  min-width: 0;
  height: 49px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #10211d;
  background: transparent;
  font-size: 14px;
}

.inputWrap input::placeholder {
  color: #89958f;
}

.passwordToggle {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #5e6e67;
  background: transparent;
  cursor: pointer;
}

.passwordToggle:hover {
  color: #0d4633;
  background: #edf4ef;
}

.passwordToggle:disabled,
.recoveryLink:disabled {
  cursor: wait;
  opacity: 0.55;
}

.hint,
.fieldError {
  font-size: 11px;
}

.hint {
  color: #6b7872;
}

.fieldError {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #a13f35;
  line-height: 1.4;
}

.fieldError svg {
  flex: 0 0 auto;
}

.termsField {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 10px;
  row-gap: 7px;
  align-items: start;
}

.termsField input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #0d563e;
}

.termsField label {
  color: #4d5a55;
  font-size: 12px;
  line-height: 1.55;
}

.termsField a,
.switchPrompt a {
  color: #0d4a36;
  font-weight: 750;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.termsField .fieldError {
  grid-column: 2;
}

.submitButton {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #0d563e;
  box-shadow: 0 10px 24px rgb(13 70 51 / 16%);
  cursor: pointer;
  font-family: var(--font-display), Georgia, serif;
  font-size: 17px;
  font-weight: 650;
  transition:
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.submitButton:hover:not(:disabled) {
  background: #146246;
  box-shadow: 0 12px 28px rgb(13 70 51 / 22%);
  transform: translateY(-1px);
}

.submitButton:disabled {
  cursor: wait;
  opacity: 0.72;
}

.switchPrompt {
  margin: 24px 0 0;
  color: #68746f;
  font-size: 13px;
  text-align: center;
}

.securityNote {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 31px;
  padding-top: 20px;
  border-top: 1px solid #e2e6e2;
  color: #718079;
}

.securityNote svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.securityNote p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .formArea {
    width: 100%;
  }

  .headingBlock {
    margin-bottom: 26px;
  }

  .headingBlock h1 {
    font-size: 43px;
  }

  .description {
    font-size: 13px;
  }

  .errorSummary,
  .notice,
  .successNotice {
    grid-template-columns: 21px 1fr;
  }

  .notice button,
  .successNotice button {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inputWrap,
  .googleButton,
  .submitButton {
    transition: none;
  }
}
