/* Card help ("?"), the account setup steps and the new-version banner. Loaded after app.css. */

.has-card-help {
  position: relative;
}
.card-help-button {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid #b9c9cf;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  vertical-align: 2px;
}
.card-help-button:hover,
.card-help-button[aria-expanded="true"] {
  border-color: var(--teal);
  color: var(--teal);
}
.card-help-popover {
  position: absolute;
  z-index: 30;
  width: min(440px, calc(100% - 16px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px rgb(16 45 64 / 18%);
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}
.card-help-title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}
.card-help-section + .card-help-section {
  margin-top: 8px;
}
.card-help-heading {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.guide-help h3 {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.guide-help p {
  margin: 2px 0 0;
}

.version-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 10px 4vw;
  border-bottom: 1px solid #b6d8d2;
  background: #e8f3f1;
  color: var(--ink);
  font-size: 13px;
}
.version-banner button {
  padding: 6px 14px;
}

.account-form input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  max-width: 380px;
  margin-bottom: 14px;
}
.account-form .check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
  font-weight: 500;
}
.account-form .check-row input {
  width: auto;
  height: auto;
  margin: 0;
}
.account-form .form-status,
.two-factor-setup .form-status {
  margin: 12px 0 0;
}
.account-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge.on {
  background: #dff3ee;
  color: #0b6b5b;
}
.status-badge.off {
  background: #eef1f2;
  color: var(--muted);
}
.notice.success {
  border-color: #a8d5c7;
  background: #e9f6f1;
  color: #0d5c4d;
}
.account-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.account-section h3 {
  margin-bottom: 10px;
}

.two-factor-steps {
  margin: 0;
  padding-left: 1.2rem;
}
.two-factor-steps > li + li {
  margin-top: 1.25rem;
}
.two-factor-how {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-top: 8px;
}
.two-factor-qr {
  width: 180px;
  height: 180px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.two-factor-instructions {
  flex: 1 1 220px;
  min-width: 0;
}
.two-factor-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.two-factor-key {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f6f9f9;
  font:
    15px ui-monospace,
    monospace;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  user-select: all;
  word-spacing: 0.3em;
}
.login .copy-key {
  width: auto;
}
.login input.two-factor-code,
input.two-factor-code {
  width: 180px;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

@media print {
  .card-help-button,
  .card-help-popover,
  .version-banner {
    display: none !important;
  }
}
