/* awalkley.com — account pages */

/* Only this surface uses these, so they live here rather than in site.css. */
:root {
  --danger: #b4483d;
  --danger-fg: #e0796d;
  --success: #2f7d4f;
}

@media (prefers-color-scheme: light) {
  :root {
    --danger-fg: #a33b31;
  }
}

.account {
  max-width: 70rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.account__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.account__lede {
  color: var(--fg-muted);
  margin: 0 0 2.5rem;
  max-width: var(--measure);
}

/* A way past the personal panels to the admin console, shown only when the
   account can use it. */
.account__jump {
  margin: -1.5rem 0 2rem;
  font-size: 0.9rem;
}

.account__jump a {
  color: var(--accent);
}

/* ------------------------------------------------------------ panels */

.panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.panel__title {
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
}

/* A step inside a panel, such as the in-session second-factor prompt. It sits
   below the panel's own heading, so it is deliberately a little smaller. */
.panel__subtitle {
  font-size: 1rem;
  margin: 1.5rem 0 0.75rem;
}

/* A line under a panel that points at the other screen — sign in from
   register, register from sign in. */
.panel__foot {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.panel__foot a {
  color: var(--accent);
}

/* ------------------------------------------------------------- forms */

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit;
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field__hint {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-top: 0.3rem;
}

/* A hint that introduces a panel's controls, rather than one that explains a
   single field. Replaces four copies of an inline margin. */
.field__hint--block {
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

/* --------------------------------------------------- third-party sign-in */

.social {
  margin-top: 1.5rem;
}

/* A rule with a word in the middle, so the two ways of signing in read as
   alternatives rather than as one long form. */
.social__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--fg-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.social__divider::before,
.social__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social__buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.social-btn:hover,
.social-btn:focus-visible {
  border-color: var(--accent);
  background: var(--bg-alt);
}

.social-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.social-btn__icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

/* A provider that is not set up on this deployment yet. Shown, so the list
   of what is coming is visible, but switched off: it is not a link, it
   cannot be followed, and it is out of the tab order. */
.social-btn--off {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.social-btn--off:hover,
.social-btn--off:focus-visible {
  border-color: var(--border);
  background: var(--bg);
  outline: none;
}

.social__hint {
  margin-top: 0.85rem;
}

/* --------------------------------------------------- connected accounts */

.conn-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.conn-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.92rem;
}

.conn-list .none {
  color: var(--fg-muted);
}

.conn-list li.conn--add {
  border-style: dashed;
}

/* A provider that is not set up on this deployment yet. */
.conn-list li.conn--off {
  opacity: 0.5;
}

.conn__name {
  font-weight: 600;
}

/* ------------------------------------------------------------ notices */

.notice {
  padding: 0.8rem 1rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  font-size: 0.93rem;
}

.notice--error {
  border-color: var(--danger);
  background: rgba(180, 72, 61, 0.12);
}

.notice--success {
  border-color: var(--success);
  background: rgba(47, 125, 79, 0.14);
}

/* A link inside a notice, e.g. "Request a new link". */
.notice a {
  color: var(--accent);
  text-decoration: underline;
}

/* -------------------------------------------------------- entitlements */

.tier {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.ent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.ent-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.ent-list .none {
  color: var(--fg-muted);
}

/* ---------------------------------------------------------- chips */

.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  margin-right: 0.3rem;
  white-space: nowrap;
}

/* ------------------------------------------------------------- MFA QR */

.mfa-qr {
  margin: 0.75rem 0 1rem;
}

.mfa-qr svg {
  display: block;
  width: 180px;
  height: 180px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

/* ------------------------------------------------- account section menu */

.account-shell {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.account-sidebar {
  position: sticky;
  top: 1.5rem;
}

.account-menu__label {
  margin: 0 0 0.6rem;
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-menu {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-menu a {
  padding: 0.5rem 0.7rem;
  border-radius: 7px;
  color: var(--fg-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.account-menu a:hover {
  color: var(--fg);
  background: var(--bg-alt);
}

.account-menu a[aria-current="page"] {
  color: var(--fg);
  background: var(--bg-alt);
  font-weight: 600;
}

.account-menu-select {
  display: none;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.account-content {
  min-width: 0;
}

.account-content [id] {
  scroll-margin-top: 1.5rem;
}

.account-sidebar .account__jump {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .account-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .account-sidebar {
    position: static;
  }

  .account-menu {
    display: none;
  }

  .account-menu-select {
    display: block;
  }

  .account-sidebar .account__jump {
    margin-top: 0.75rem;
  }
}
