/* nexopt-auth additions to the nexopt login theme (login.css comes unchanged from the Keycloak theme in
   software/internal/keycloak, themes/nexopt/login). Only what Keycloak has no markup for. */

[hidden] { display: none !important; }

/* passkey button: the look of Keycloak's #authenticateWebAuthnButton */
.nx-passkey {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 11px 20px;
  border: 1px solid var(--nx-line-strong);
  border-radius: var(--nx-radius-sm);
  background: var(--nx-surface);
  color: var(--nx-ink);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.nx-passkey::before {
  content: '';
  width: 1.15em; height: 1.15em;
  background-color: var(--nx-orange-600);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='12' r='4.2'/%3E%3Cpath d='M12.2 12H21M18 12v3.2M15.2 12v2.4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='12' r='4.2'/%3E%3Cpath d='M12.2 12H21M18 12v3.2M15.2 12v2.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nx-passkey:hover { background: var(--nx-surface-2); border-color: var(--nx-ink-3); }
.nx-passkey[aria-disabled='true'] { opacity: 0.55; pointer-events: none; }
#pk-form .nx-alert { margin-bottom: 14px; }

/* identity providers (e.g. "Keycloak Login") below the passkey button */
.idps.nx-social { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

.nx-backlink + .nx-backlink { margin-top: 8px; }
.nx-mt { margin-top: 28px; }

/* account page */
.nx-h2 {
  margin: 26px 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--nx-ink);
}
.nx-passkeys { list-style: none; margin: 0 0 16px; padding: 0; }
.nx-passkeys li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius-sm);
  background: var(--nx-surface-2);
}
.nx-passkeys li + li { margin-top: 8px; }
.nx-passkeys li > .nx-i { color: var(--nx-orange-600); font-size: 1.1rem; }
.nx-passkeys__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.nx-passkeys__body strong { font-size: 0.925rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.nx-passkeys__body .nx-help { margin: 2px 0 0; }
.nx-passkeys form { margin: 0; }

/* setup: QR code, key, recovery codes */
.nx-qr img { display: block; background: #fff; padding: 8px; border-radius: var(--nx-radius-sm); border: 1px solid var(--nx-line); }
#secret { font-family: var(--nx-mono); word-break: break-all; color: var(--nx-ink); }
#secret span + span { margin-left: 0.6ch; }
.nx-codes {
  list-style: none;
  margin: 0 0 18px;
  padding: 14px 16px;
  columns: 2;
  font-family: var(--nx-mono);
  font-size: 0.9rem;
  background: var(--nx-surface-2);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius-sm);
}
