/* PAFSO – Passkeys */

.pafso-passkeys-login {
	margin: 0 0 16px;
	clear: both;
}

.pafso-passkeys-login[hidden],
.pafso-passkeys-section [hidden] {
	display: none !important;
}

.pafso-passkeys-or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 4px 0 12px;
	color: #50575e; /* 7.0:1 on white */
	font-size: 13px;
	text-transform: lowercase;
}

.pafso-passkeys-or::before,
.pafso-passkeys-or::after {
	content: "";
	flex: 1;
	border-top: 1px solid #c3c4c7;
}

.pafso-passkeys-button {
	width: 100%;
	justify-content: center;
	text-align: center;
	cursor: pointer;
}

.pafso-passkeys-button:focus-visible,
.pafso-passkeys-add:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.pafso-passkeys-button[disabled],
.pafso-passkeys-add[disabled] {
	cursor: progress;
	opacity: 0.75;
}

.pafso-passkeys-status {
	min-height: 1.4em;
	margin: 8px 0 0;
	font-size: 14px;
}

.pafso-passkeys-status:empty {
	min-height: 0;
	margin: 0;
}

.pafso-passkeys-status.is-error {
	color: #b32d2e; /* 5.7:1 on white */
}

/* wp-login: the block sits between the password field and "Remember me". */
.login .pafso-passkeys-login--wp-login {
	margin-top: 4px;
}

/* Elementor login widget: match the form's width. */
.pafso-passkeys-login--elementor {
	margin-top: 16px;
}

.pafso-passkeys-login--elementor .pafso-passkeys-button,
.pafso-passkeys-login--woocommerce .pafso-passkeys-button {
	min-height: 44px;
	padding: 10px 16px;
	border: 2px solid currentColor;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	border-radius: 3px;
}

/* Profile section */
.pafso-passkeys-section {
	margin: 2em 0;
	max-width: 760px;
	container: pafso-passkeys / inline-size;
}

/* The emails link to #passkeys (My Details): land below the site's sticky header. */
#passkeys,
#pafso-passkeys {
	scroll-margin-top: 160px;
}

/* The passkey list: one card per passkey, with visible Rename and Remove buttons. */
.pafso-passkeys-items {
	list-style: none;
	margin: 1em 0;
	padding: 0;
	display: grid;
	gap: 10px;
	max-width: 640px;
}

.pafso-passkey {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 6px 14px;
	margin: 0;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	color: #1d2327;
	font-size: 14px;
	line-height: 1.4;
}

.pafso-passkey.is-removing {
	border-color: #b32d2e;
}

.pafso-passkey__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #e7f0f8;
	color: #135e96; /* 6.6:1 on the tint */
}

.pafso-passkey__main {
	min-width: 0;
}

.pafso-passkey p.pafso-passkey__name {
	margin: 0;
	font-weight: 600;
	font-size: 15px;
	overflow-wrap: anywhere;
}

.pafso-passkey p.pafso-passkey__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.2em;
	margin: 2px 0 0;
	color: #50575e; /* 7.0:1 on white */
	font-size: 13px;
}

.pafso-passkey p.pafso-passkey__meta span {
	white-space: nowrap;
}

.pafso-passkey__actions,
.pafso-passkey__panel-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Buttons: own styles so they look the same in wp-admin, MyPAFSO and WooCommerce. */
.pafso-passkey .pafso-passkey__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid #2271b1;
	border-radius: 6px;
	background: #fff;
	color: #135e96; /* 6.4:1 on white */
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	white-space: nowrap;
}

.pafso-passkey .pafso-passkey__btn:hover {
	background: #f0f6fc;
	color: #0a4b78;
}

.pafso-passkey .pafso-passkey__btn--danger {
	border-color: #b32d2e;
	color: #b32d2e; /* 5.9:1 on white */
}

.pafso-passkey .pafso-passkey__btn--danger:hover {
	background: #fcf0f1;
	color: #8a2424;
}

.pafso-passkey .pafso-passkey__btn--primary {
	background: #2271b1;
	color: #fff;
}

.pafso-passkey .pafso-passkey__btn--primary:hover {
	background: #135e96;
	color: #fff;
}

.pafso-passkey .pafso-passkey__btn--danger-solid {
	border-color: #b32d2e;
	background: #b32d2e;
	color: #fff;
}

.pafso-passkey .pafso-passkey__btn--danger-solid:hover {
	border-color: #8a2424;
	background: #8a2424;
	color: #fff;
}

.pafso-passkey .pafso-passkey__btn:focus-visible,
.pafso-passkey .pafso-passkey__input:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.pafso-passkey .pafso-passkey__btn[disabled] {
	cursor: progress;
	opacity: 0.7;
}

.pafso-passkey__svg {
	flex: none;
}

.pafso-passkey__btn .pafso-passkey__svg {
	width: 16px;
	height: 16px;
}

/* The Rename and Remove panels open inside the card, under its name. */
.pafso-passkey__panel {
	grid-column: 1 / -1;
	margin: 6px 0 0;
	padding: 12px 0 0;
	border-top: 1px solid #dcdcde;
}

.pafso-passkey__label {
	display: block;
	margin: 0 0 4px;
	font-weight: 600;
}

.pafso-passkey .pafso-passkey__input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 24rem;
	min-height: 36px;
	margin: 0 0 10px;
	padding: 4px 8px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: #1d2327;
	font: inherit;
}

.pafso-passkey p.pafso-passkey__question {
	margin: 0 0 4px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.pafso-passkey p.pafso-passkey__hint {
	margin: 0 0 10px;
	color: #50575e;
	font-size: 13px;
}

.pafso-passkeys-section .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.pafso-passkeys-section h2:focus,
.pafso-passkeys-section h3:focus {
	outline: none;
}

/* Narrow box (My Details column, French labels) or narrow screen: buttons under the name. */
@container pafso-passkeys (max-width: 36rem) {
	.pafso-passkey {
		grid-template-columns: auto minmax(0, 1fr);
	}
	.pafso-passkey__actions {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.pafso-passkey {
		grid-template-columns: auto minmax(0, 1fr);
	}
	.pafso-passkey__actions {
		grid-column: 1 / -1;
	}
}

/* Hop page (bare page on the main domain) */
body.pafso-passkeys-hop {
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	color: #1d2327;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.pafso-passkeys-hop__box {
	box-sizing: border-box;
	width: 100%;
	max-width: 420px;
	margin: 16px;
	padding: 28px 24px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}

.pafso-passkeys-hop__site {
	margin: 0 0 4px;
	color: #50575e;
	font-size: 14px;
}

.pafso-passkeys-hop h1 {
	margin: 0 0 12px;
	font-size: 24px;
	line-height: 1.25;
}

.pafso-passkeys-hop .pafso-passkeys-button {
	display: block;
	min-height: 44px;
	padding: 10px 16px;
	border: 0;
	border-radius: 3px;
	background: #2271b1;
	color: #fff;
	font: inherit;
	font-weight: 600;
}

.pafso-passkeys-hop .pafso-passkeys-button:hover {
	background: #135e96;
}

.pafso-passkeys-hop__back a {
	color: #2271b1;
}

/* Offer after signing in */
.pafso-passkeys-offer {
	box-sizing: border-box;
	width: min(92vw, 460px);
	padding: 24px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	font-size: 15px;
	line-height: 1.5;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.pafso-passkeys-offer::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.pafso-passkeys-offer h2 {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.3;
	color: #1d2327;
}

.pafso-passkeys-offer p {
	margin: 0 0 12px;
	color: #1d2327;
}

.pafso-passkeys-offer__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0 8px;
}

.pafso-passkeys-offer .button,
.pafso-passkeys-offer .button-primary {
	min-height: 40px;
	padding: 6px 16px;
	font-size: 15px;
	cursor: pointer;
}

.pafso-passkeys-offer .button-link {
	padding: 4px 0;
	border: 0;
	background: none;
	color: #2271b1;
	text-decoration: underline;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.pafso-passkeys-offer :focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Front end: the theme doesn't style WordPress admin buttons. */
.pafso-passkeys-offer .button {
	border: 1px solid #2271b1;
	border-radius: 3px;
	background: #fff;
	color: #2271b1;
}

.pafso-passkeys-offer .button-primary {
	background: #2271b1;
	color: #fff;
}

.pafso-passkeys-offer [hidden] {
	display: none !important;
}

/* ---------- Two-factor authentication (wp-login.php?action=pafso_2fa, profile row) ---------- */
.login .pafso-2fa {
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
}
.login .pafso-2fa-box {
	background: #fff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	padding: 26px 24px;
	margin-top: 20px;
}
.login .pafso-2fa p,
.login .pafso-2fa li {
	margin: 0 0 12px;
}
.login .pafso-2fa label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}
.login .pafso-2fa label:has(input[type="checkbox"]) {
	font-weight: 400;
}
.login .pafso-2fa .pafso-2fa-code {
	font-size: 24px;
	letter-spacing: 0.15em;
	font-variant-numeric: tabular-nums;
	width: 100%;
	margin: 0 0 4px;
}
.login .pafso-2fa .description,
.login .pafso-2fa-note {
	color: #50575e;
	font-size: 13px;
}
.login .pafso-2fa .submit {
	margin: 16px 0;
	overflow: hidden;
}
.login .pafso-2fa .submit .button {
	float: none;
	width: 100%;
	margin: 0;
}
.login .pafso-2fa .pafso-2fa-alt {
	text-align: center;
}
.login .pafso-2fa-alt .button-link {
	font-size: 14px;
}
.login .pafso-2fa-steps {
	margin: 0 0 16px 1.25em;
	padding: 0;
}
.login .pafso-2fa-qr-wrap {
	display: block;
	margin: 12px 0;
	text-align: center;
}
.login .pafso-2fa-qr {
	width: 220px;
	max-width: 100%;
	height: auto;
	border: 1px solid #c3c4c7;
}
.login .pafso-2fa-key summary {
	cursor: pointer;
	color: #2271b1;
	text-decoration: underline;
}
.login .pafso-2fa-secret,
.login .pafso-2fa-codes code {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 16px;
	letter-spacing: 0.05em;
	background: #f0f0f1;
	padding: 2px 6px;
	word-break: break-all;
}
.login .pafso-2fa-codes {
	columns: 2;
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}
.login .pafso-2fa .pafso-2fa-codes li {
	margin: 0 0 8px;
}
.pafso-2fa-done {
	border-left: 4px solid #00a32a;
	background: #f0f6fc;
	padding: 8px 12px;
}
.pafso-2fa-actions .button {
	margin: 0 6px 6px 0;
}
@media (max-width: 320px) {
.login .pafso-2fa-codes {
		columns: 1;
	}
}
.login .pafso-2fa .pafso-2fa-title {
	font-size: 20px;
	line-height: 1.3;
	font-weight: 600;
	margin: 0 0 16px;
}
.login .pafso-2fa-notice {
	margin: 20px 0 0;
}
.login .pafso-2fa-notice p {
	margin: 0;
}
.login .pafso-2fa .pafso-2fa-form label {
	margin-top: 12px;
}
.login .pafso-2fa .pafso-2fa-alt {
	margin: 12px 0;
}
/* 2FA page: the passkey way out,
under the code form. */
.login .pafso-2fa-passkey {
	border-top: 1px solid #dcdcde;
	margin-top: 20px;
	padding-top: 16px;
}
.login .pafso-2fa .pafso-passkeys-login--2fa {
	margin: 0 0 12px;
}
.login .pafso-2fa .pafso-passkeys-login--2fa .pafso-passkeys-button {
	width: 100%;
}
