/* Tera Chat account pages (/account/ and /account/signin/).
   Loaded only on those pages, on top of styles.css and its tokens. */

.account {
  max-width: 560px;
}

.account h1 {
  font-size: clamp(32px, 5vw, 44px);
}

.account-form {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.account-form label {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.account-form label:first-child {
  margin-top: 0;
}

.account-form .optional {
  font-weight: 400;
  color: var(--faint);
}

.account-form input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--hairline-strong);
  background: var(--canvas-raised);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.account-form input::placeholder {
  color: var(--faint);
}

.account-form input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-color: transparent;
}

.account-form > .btn {
  margin-top: 18px;
  justify-content: center;
}

.account-form button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.doc p.account-status {
  min-height: 1.5em;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.doc p.account-status.ok {
  color: var(--success);
}

.doc p.account-hint {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--faint);
}

.doc p.account-switch {
  margin-top: 22px;
  font-size: 15px;
}

.doc p.account-note {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--pane);
  font-size: 14px;
}

.account .doc-cta {
  justify-content: flex-start;
}

/* The account page */

.account-who {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.account-who h1 {
  margin-top: 0;
  font-size: clamp(26px, 4vw, 34px);
  overflow-wrap: anywhere;
}

.doc p.account-email {
  margin-top: 2px;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

.account-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-deep);
  color: var(--blue);
  font: 600 20px/1 var(--display);
  letter-spacing: 0.02em;
}

.account-card {
  margin-top: 24px;
  padding: 22px 22px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--pane);
}

.account-card h2 {
  margin-top: 0;
  font-size: 18px;
}

.doc p.account-plan-name {
  margin-top: 10px;
  font: 600 20px/1.3 var(--display);
  color: var(--ink);
}

.doc p.account-plan-name + p {
  margin-top: 4px;
}

.doc p.account-usage {
  margin-top: 4px;
  font-size: 14px;
  color: var(--faint);
}

.doc p.account-usage:empty {
  display: none;
}

.doc .account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.account-inline {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.account-inline label {
  font-weight: 400;
  color: var(--muted);
}

.account-row {
  display: flex;
  gap: 8px;
}

.account-row input {
  flex: 1;
  height: 36px;
  font-size: 14px;
  font-family: var(--mono);
}

.account-danger {
  border-color: rgba(255, 107, 79, 0.28);
}

.account-danger > .btn {
  margin-top: 16px;
}

.btn.account-destructive {
  background: #ff6b4f;
  color: #120604;
  box-shadow: none;
}

.btn.account-destructive:hover {
  background: #ff8166;
  box-shadow: none;
}

@media (max-width: 520px) {
  .account-row {
    flex-direction: column;
  }

  .account-row .btn {
    justify-content: center;
  }

  .account-card {
    padding: 18px 16px;
  }
}

/* The emailed code: big, spaced digits, easy to check against the email. */
.account-form input.account-code {
  font-size: 24px;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
  max-width: 224px;
}

.doc p.account-sent {
  margin: 0 0 4px;
}

/* Continue with Apple / Google, as in the Mac app (TeraChatWelcomeScreen) and
   as each brand's guidelines draw them: Apple white with its logo, Google its
   dark style with the four-colour G. */
.account-oauth {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.btn.account-provider {
  justify-content: center;
  width: 100%;
}

.btn.account-provider svg {
  width: 18px;
  height: 18px;
}

.btn.account-provider-apple {
  background: #fff;
  color: #000;
}

.btn.account-provider-apple:hover {
  background: #e8e8ed;
}

.btn.account-provider-google {
  border: 1px solid #8e918f;
  background: #131314;
  color: #e3e3e3;
}

.btn.account-provider-google:hover {
  background: #1e1f20;
}

.doc p.account-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--faint);
}

.account-or::before,
.account-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* The email form sits closer under the "or". */
.account-oauth:not([hidden]) + .account-form {
  margin-top: 10px;
}

/* Why the last Apple or Google sign-in came back here. Gone when empty. */
.doc p.account-alert {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 189, 54, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 189, 54, 0.06);
  font-size: 14.5px;
  color: var(--ink);
}

.doc p.account-alert:empty {
  display: none;
}
