:root {
	--winsho-login-bg: #081224;
	--winsho-login-bg2: #172554;
	--winsho-login-card: #ffffff;
	--winsho-login-ink: #101828;
	--winsho-login-muted: #667085;
	--winsho-login-accent: #f04438;
	--winsho-login-accent2: #f79009;
	--winsho-login-button-text: #ffffff;
	--winsho-login-radius: 24px;
	--winsho-login-logo-width: 64px;
	--winsho-login-line: #dfe3ea;
	--winsho-login-soft: #f7f8fa;
	--winsho-login-success: #067647;
	--winsho-login-danger: #b42318;
	--winsho-login-photo: none;
}

.winsho-link-login-panel,
.winsho-link-shortcode,
.winsho-passkey-login,
.winsho-passkey-manager,
.winsho-link-login-panel *,
.winsho-link-shortcode *,
.winsho-passkey-login *,
.winsho-passkey-manager * {
	box-sizing: border-box;
}

/* Branded wp-login.php: one centered card, native password form first. */
.login.winsho-branded-login {
	display: grid !important;
	place-items: center;
	box-sizing: border-box;
	min-height: 100vh;
	margin: 0;
	padding: 32px 18px;
	background:
		linear-gradient(135deg, rgba(8, 18, 36, 0.92), rgba(23, 37, 84, 0.9)),
		var(--winsho-login-photo),
		radial-gradient(circle at 12% 10%, rgba(240, 68, 56, 0.2), transparent 31%),
		radial-gradient(circle at 88% 4%, rgba(247, 144, 9, 0.2), transparent 31%),
		linear-gradient(145deg, var(--winsho-login-bg), var(--winsho-login-bg2));
	background-attachment: fixed;
	background-position: center;
	background-size: cover;
	color: var(--winsho-login-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login.winsho-branded-login::before {
	position: fixed;
	inset: 0;
	z-index: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
	background-size: 46px 46px;
	content: "";
	pointer-events: none;
}

.winsho-auth-shell {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: min(100%, 440px);
	margin: auto;
}

.winsho-auth-card {
	box-sizing: border-box;
	width: 100%;
	padding: 30px;
	border: 1px solid rgba(255, 255, 255, 0.62);
	border-radius: var(--winsho-login-radius);
	background: var(--winsho-login-card);
	box-shadow: 0 30px 85px rgba(2, 6, 23, 0.38), 0 4px 18px rgba(2, 6, 23, 0.12);
}

.winsho-branded-login #login {
	box-sizing: border-box !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}

.winsho-branded-login #login h1 {
	margin: 0 0 18px;
	padding: 0;
}

.winsho-branded-login #login h1 a {
	width: var(--winsho-login-logo-width);
	height: var(--winsho-login-logo-width);
	margin: 0 auto;
	border: 1px solid #e4e7ec;
	border-radius: 17px;
	background-color: #f8fafc;
	background-position: center;
	background-size: 66%;
	box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
}

/* The intro is moved below the logo by login-ui.js. Without JS it stays hidden. */
.winsho-branded-login:not(.winsho-ui-ready) .winsho-login-intro {
	display: none;
}

.winsho-login-intro {
	margin: 0 0 22px;
	text-align: center;
}

.winsho-login-kicker {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 8px;
	color: #b54708;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.winsho-login-kicker::before {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--winsho-login-accent), var(--winsho-login-accent2));
	box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.11);
	content: "";
}

.winsho-login-intro h2 {
	margin: 0 0 7px;
	color: var(--winsho-login-ink);
	font-size: 28px;
	font-weight: 780;
	line-height: 1.12;
	letter-spacing: -0.035em;
}

.winsho-login-intro > p {
	margin: 0 auto;
	color: var(--winsho-login-muted);
	font-size: 13px;
	line-height: 1.55;
}

/* Native WordPress forms remain the primary method. */
.winsho-branded-login #loginform,
.winsho-branded-login #lostpasswordform,
.winsho-branded-login #registerform,
.winsho-branded-login #resetpassform,
.winsho-branded-login #winsho-complete-profile {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.winsho-hide-password #loginform {
	display: none !important;
}

.winsho-branded-login #loginform p,
.winsho-branded-login #lostpasswordform p,
.winsho-branded-login #registerform p,
.winsho-branded-login #resetpassform p,
.winsho-branded-login #winsho-complete-profile p {
	margin: 0 0 15px;
}

.winsho-link-login-panel label,
.winsho-link-shortcode label,
.winsho-branded-login #loginform label,
.winsho-branded-login #lostpasswordform label,
.winsho-branded-login #registerform label,
.winsho-branded-login #resetpassform label,
.winsho-branded-login #winsho-complete-profile label {
	display: block;
	margin-bottom: 7px;
	color: #344054;
	font-size: 13px;
	font-weight: 680;
}

.winsho-link-login-panel input[type="email"],
.winsho-link-shortcode input[type="email"],
.winsho-branded-login .input,
.winsho-branded-login input[type="text"],
.winsho-branded-login input[type="email"],
.winsho-branded-login input[type="password"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	margin: 6px 0 0;
	padding: 10px 13px;
	border: 1px solid #d0d5dd;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	color: var(--winsho-login-ink);
	background: #ffffff;
	font-size: 15px;
	line-height: 1.3;
}

.winsho-link-login-panel input[type="email"]:focus,
.winsho-link-shortcode input[type="email"]:focus,
.winsho-branded-login .input:focus,
.winsho-branded-login input[type="text"]:focus,
.winsho-branded-login input[type="email"]:focus,
.winsho-branded-login input[type="password"]:focus {
	border-color: var(--winsho-login-accent);
	outline: 0;
	box-shadow: 0 0 0 4px rgba(240, 68, 56, 0.13);
}

.winsho-branded-login .wp-pwd {
	margin-top: 6px;
}

.winsho-branded-login .wp-pwd .input {
	margin-top: 0;
	padding-right: 42px;
}

.winsho-branded-login #loginform .forgetmenot {
	float: none;
	margin: 1px 0 15px;
}

.winsho-branded-login #loginform .forgetmenot label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-weight: 560;
}

.winsho-branded-login #loginform .submit,
.winsho-branded-login #lostpasswordform .submit,
.winsho-branded-login #registerform .submit,
.winsho-branded-login #resetpassform .submit,
.winsho-branded-login #winsho-complete-profile .submit {
	margin: 0;
	padding: 0;
}

.winsho-branded-login .button-primary,
.winsho-link-login-panel form .button-primary,
.winsho-link-shortcode button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 11px 17px !important;
	border: 0 !important;
	border-radius: 10px !important;
	color: var(--winsho-login-button-text) !important;
	background: linear-gradient(100deg, var(--winsho-login-accent), var(--winsho-login-accent2)) !important;
	box-shadow: 0 10px 22px rgba(240, 68, 56, 0.18) !important;
	font-size: 14px !important;
	font-weight: 750 !important;
	line-height: 1.2 !important;
	text-shadow: none !important;
	cursor: pointer;
	transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.winsho-branded-login .button-primary:hover,
.winsho-branded-login .button-primary:focus,
.winsho-link-login-panel form .button-primary:hover,
.winsho-link-login-panel form .button-primary:focus,
.winsho-link-shortcode button:hover,
.winsho-link-shortcode button:focus {
	filter: brightness(1.035) saturate(1.04);
	transform: translateY(-1px);
	box-shadow: 0 14px 27px rgba(240, 68, 56, 0.23) !important;
}

/* Alternative methods are inserted after the password form and before nav links. */
.winsho-auth-alternatives {
	box-sizing: border-box;
	width: 100%;
	margin: 20px 0 0;
}

.winsho-auth-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	color: #98a2b3;
	font-size: 11px;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.winsho-auth-divider::before,
.winsho-auth-divider::after {
	height: 1px;
	flex: 1;
	background: var(--winsho-login-line);
	content: "";
}

.login .winsho-passkey-login,
.login .winsho-link-login-panel {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.winsho-passkey-login + .winsho-link-login-panel {
	margin-top: 10px;
}

.winsho-passkey-login-button,
.winsho-magic-toggle {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 9px;
	box-sizing: border-box;
	width: 100%;
	min-height: 47px;
	margin: 0;
	padding: 10px 14px !important;
	border: 1px solid #d0d5dd !important;
	border-radius: 10px !important;
	color: #344054 !important;
	background: #ffffff !important;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	text-shadow: none !important;
	cursor: pointer;
	transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.winsho-passkey-login-button:hover,
.winsho-passkey-login-button:focus,
.winsho-magic-toggle:hover,
.winsho-magic-toggle:focus {
	border-color: #98a2b3 !important;
	background: #f9fafb !important;
	box-shadow: 0 5px 14px rgba(16, 24, 40, 0.07) !important;
	transform: translateY(-1px);
}

.winsho-passkey-login-button .dashicons,
.winsho-magic-toggle .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	color: var(--winsho-login-accent);
}

.winsho-magic-toggle .winsho-magic-chevron {
	margin-left: auto;
	color: #667085;
	transition: transform 0.18s ease;
}

.winsho-magic-toggle[aria-expanded="true"] .winsho-magic-chevron {
	transform: rotate(180deg);
}

.winsho-ui-ready .winsho-magic-request-panel[hidden] {
	display: none !important;
}

.winsho-magic-request-panel {
	margin-top: 10px;
	padding: 16px;
	border: 1px solid #e4e7ec;
	border-radius: 12px;
	background: #f8fafc;
}

.winsho-magic-request-panel > p {
	margin: 0 0 14px;
	color: var(--winsho-login-muted);
	font-size: 12px;
	line-height: 1.55;
}

.winsho-magic-request-panel form {
	margin: 0;
}

.winsho-magic-request-panel input[type="email"] {
	margin-bottom: 12px;
	background: #ffffff;
}

.winsho-passkey-status {
	min-height: 0;
	margin: 9px 4px 0;
	padding: 0;
	color: var(--winsho-login-muted);
	font-size: 12px;
	line-height: 1.45;
	text-align: center;
}

.winsho-passkey-status:empty {
	display: none;
}

.winsho-passkey-status.is-error { color: var(--winsho-login-danger); }
.winsho-passkey-status.is-success { color: var(--winsho-login-success); }

.winsho-passkey-unavailable {
	display: none !important;
}

/* Notices and native links. */
.winsho-branded-login #login_error,
.winsho-branded-login .message,
.winsho-branded-login .success,
.winsho-branded-login .winsho-login-error {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 17px;
	padding: 12px 13px;
	border: 1px solid #d0d5dd;
	border-left: 4px solid var(--winsho-login-accent);
	border-radius: 10px;
	color: #344054;
	background: #f9fafb;
	box-shadow: none;
	font-size: 13px;
	line-height: 1.5;
}

.winsho-branded-login #login_error,
.winsho-branded-login .winsho-login-error {
	border-color: #fecdca;
	border-left-color: #d92d20;
	background: #fff6f5;
}

.winsho-branded-login #nav,
.winsho-branded-login #backtoblog,
.winsho-branded-login .privacy-policy-page-link {
	margin: 14px 0 0;
	padding: 0;
	color: var(--winsho-login-muted);
	font-size: 12px;
	text-align: center;
}

.winsho-branded-login #nav a,
.winsho-branded-login #backtoblog a,
.winsho-branded-login .privacy-policy-page-link a {
	color: #475467;
	font-weight: 650;
	text-decoration: none;
}

.winsho-branded-login #nav a:hover,
.winsho-branded-login #backtoblog a:hover,
.winsho-branded-login .privacy-policy-page-link a:hover {
	color: var(--winsho-login-accent);
}

.winsho-login-footer-text {
	margin: 17px 8px 0;
	color: rgba(226, 232, 240, 0.78);
	font-size: 11px;
	line-height: 1.45;
	text-align: center;
}

.winsho-auth-card > .winsho-login-footer-text {
	color: #667085;
}

/* Non-login actions use the same clean card without alternative methods. */
.winsho-login-single .winsho-login-intro,
.winsho-login-single .winsho-auth-alternatives {
	display: none !important;
}

/* Layout variants affect only the canvas. */
.login.winsho-layout-light {
	background:
		radial-gradient(circle at 82% 12%, rgba(240, 68, 56, 0.1), transparent 32%),
		linear-gradient(145deg, #f8fafc, #e7ecf4);
}

.winsho-layout-light::before {
	background-image:
		linear-gradient(rgba(30, 64, 175, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(30, 64, 175, 0.035) 1px, transparent 1px);
}

.login.winsho-layout-minimal { background: #f2f4f7; }
.login.winsho-layout-minimal::before { display: none; }
.winsho-layout-minimal .winsho-auth-card { box-shadow: 0 20px 58px rgba(16, 24, 40, 0.13); }

/* --------------------------------------------------------------------------
 * Frontend magic-link shortcode and Gutenberg block
 * -------------------------------------------------------------------------- */
.winsho-link-shortcode {
	max-width: 540px;
	padding: clamp(24px, 5vw, 34px);
	border: 1px solid #e4e7ec;
	border-radius: 18px;
	color: #101828;
	background: #ffffff;
	box-shadow: 0 18px 50px rgba(16, 24, 40, 0.09);
}

.winsho-link-public-notice {
	margin-bottom: 16px;
	padding: 12px 13px;
	border: 1px solid #abefc6;
	border-radius: 9px;
	color: #067647;
	background: #ecfdf3;
	font-size: 13px;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
 * Passkey manager used in profiles, shortcodes, and Gutenberg blocks
 * -------------------------------------------------------------------------- */
.winsho-passkey-manager {
	max-width: 780px;
	padding: clamp(20px, 4vw, 28px);
	border: 1px solid #e4e7ec;
	border-radius: 16px;
	color: #101828;
	background: #ffffff;
	box-shadow: 0 14px 38px rgba(16, 24, 40, 0.07);
}

.form-table .winsho-passkey-manager {
	max-width: 860px;
}

.winsho-passkey-manager-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.winsho-passkey-manager-heading h3 {
	margin: 0 0 5px;
	font-size: 20px;
}

.winsho-passkey-manager-heading p {
	margin: 0;
	color: #667085;
	font-size: 13px;
	line-height: 1.55;
}

.winsho-passkey-manager-heading .button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 39px;
	border-radius: 8px;
}

.winsho-passkey-list {
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.winsho-passkey-item {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 16px;
	border: 1px solid #e4e7ec;
	border-radius: 12px;
	background: #fcfcfd;
}

.winsho-passkey-icon {
	display: grid !important;
	place-items: center;
	width: 46px !important;
	height: 46px !important;
	border-radius: 12px;
	color: #067647;
	background: #ecfdf3;
	font-size: 22px !important;
}

.winsho-passkey-meta {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 4px;
}

.winsho-passkey-meta strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.winsho-passkey-meta small {
	color: #667085;
	font-size: 12px;
	line-height: 1.45;
}

.winsho-passkey-actions {
	display: flex;
	gap: 8px;
}

.winsho-passkey-actions .button {
	border-radius: 7px;
}

.winsho-passkey-empty,
.winsho-passkey-signed-out {
	margin: 0;
	padding: 20px;
	border: 1px dashed #d0d5dd;
	border-radius: 10px;
	color: #667085;
	background: #f9fafb;
	text-align: center;
}

/* --------------------------------------------------------------------------
 * Accessibility, responsive, RTL
 * -------------------------------------------------------------------------- */
.winsho-branded-login :where(a, button, input, select, textarea, [tabindex]):focus-visible,
.winsho-link-shortcode :where(a, button, input, select, textarea, [tabindex]):focus-visible,
.winsho-passkey-manager :where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--winsho-login-accent);
	outline-offset: 3px;
	box-shadow: 0 0 0 2px #ffffff;
}

@media screen and (max-width: 520px) {
	.login.winsho-branded-login {
		place-items: start center;
		padding: 14px 10px 34px;
	}

	.winsho-auth-card {
		padding: 24px 20px;
		border-radius: 20px;
	}

	.winsho-branded-login #login h1 a {
		width: 58px;
		height: 58px;
		border-radius: 15px;
	}

	.winsho-login-intro h2 {
		font-size: 26px;
	}

	.winsho-login-intro > p {
		font-size: 12px;
	}

	.winsho-login-footer-text {
		margin: 14px 8px 0;
	}

	.winsho-passkey-manager-heading,
	.winsho-passkey-item {
		align-items: stretch;
		grid-template-columns: 1fr;
	}

	.winsho-passkey-manager-heading {
		flex-direction: column;
	}

	.winsho-passkey-actions {
		flex-wrap: wrap;
	}
}

.rtl .winsho-branded-login #login_error,
.rtl .winsho-branded-login .message,
.rtl .winsho-branded-login .success {
	border-right: 4px solid var(--winsho-login-accent);
	border-left-width: 1px;
}

.rtl .winsho-branded-login #login_error,
.rtl .winsho-branded-login .winsho-login-error {
	border-right-color: #d92d20;
	border-left-color: #fecdca;
}

.rtl .winsho-login-security-note,
.rtl .winsho-passkey-manager-heading,
.rtl .winsho-passkey-item {
	direction: rtl;
}

@media (prefers-reduced-motion: reduce) {
	.winsho-branded-login *,
	.winsho-link-shortcode *,
	.winsho-passkey-manager * {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media (forced-colors: active) {
	.winsho-auth-card,
	.winsho-link-shortcode,
	.winsho-passkey-manager,
	.winsho-passkey-item {
		border: 1px solid CanvasText;
	}

	.winsho-passkey-login-button,
	.winsho-link-login-panel button,
	.winsho-link-shortcode button,
	.winsho-branded-login .button-primary {
		border: 1px solid ButtonText !important;
	}
}

/* Native WordPress login fallback when branding is disabled. */
.login:not(.winsho-branded-login) .winsho-auth-alternatives {
	box-sizing: border-box;
	width: 100%;
	margin-top: 20px;
}

.login:not(.winsho-branded-login) #login .winsho-auth-alternatives {
	width: 100%;
}
