/* Additions for the MFA pages. Loaded after /auth/style.css, which owns the
 * palette, the fonts, the card and every control the login form already uses.
 * Nothing here redeclares a colour: every value below is one of that file's
 * custom properties, so the three themes keep working with no second copy of
 * the palette to drift. */

.card-wide { max-width: 560px; }

section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

section:first-of-type { border-top: none; padding-top: 0; }

h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--text-primary);
}

.note {
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
}

/* The rule above `.fine` is a divider between blocks, and inside a section it
 * reads as a second border a few pixels from the first one. */
.fine.no-rule { border-top: none; padding-top: 0; margin-top: 8px; }

.btn-secondary {
  width: 100%;
  margin-top: 12px;
  padding: 11px 16px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-secondary:hover { background: var(--input-focus); }
.btn-secondary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-secondary:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; }

.btn-danger {
  padding: 9px 14px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--alert-text);
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.btn-danger:hover { filter: brightness(1.12); }
.btn-danger:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-danger:focus-visible { outline: 2px solid var(--alert-border); outline-offset: 2px; }

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.check input { width: 16px; height: 16px; accent-color: var(--color-blue); }

.qr-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.qr {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  background: #ffffff;   /* the quiet zone a scanner needs, in both themes */
  padding: 8px;
}

.secret {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  word-break: break-all;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 6px 0;
}

.codes {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.codes code {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.rows { list-style: none; margin: 0; padding: 0; }

.rows .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.rows .row:last-child { border-bottom: none; }

.rows .row strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
}

.rows .meta {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

form.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

form.inline input[type="text"] {
  width: 96px;
  margin: 0;
  padding: 9px 10px;
  text-align: center;
}

form.inline input[name="name"] { width: 150px; text-align: left; }

.btn-inline { width: auto; margin-top: 0; padding: 9px 14px; font-size: 13px; }

.recovery {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.recovery summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.recovery summary:hover { color: var(--text-primary); }

.passkey-step, .passkey-signin { margin-top: 18px; }

@media (max-width: 480px) {
  .codes { grid-template-columns: 1fr; }
  .qr-row { justify-content: center; }
  .rows .row { align-items: flex-start; }
}
