/**
 * Create The Future — login card styles.
 * Self-contained, no third-party frameworks. Page background comes from the
 * --ctf-bg variable set inline by the template (configurable in settings).
 */

:root {
	--ctf-bg: #F2F6FF;
	--ctf-card-bg: #ffffff;
	--ctf-text: #1f2733;
	--ctf-muted: #6b7280;
	--ctf-border: #d6dce5;
	--ctf-primary: #2f6df6;
	--ctf-primary-hover: #2357d4;
	--ctf-error-bg: #fdecec;
	--ctf-error-border: #f3b4b4;
	--ctf-error-text: #a11a1a;
	--ctf-success-bg: #e9f7ef;
	--ctf-success-border: #aadcc0;
	--ctf-success-text: #1d6f42;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
}

body.ctf-login {
	min-height: 100vh;
	background-color: var(--ctf-bg);
	color: var(--ctf-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.ctf-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ctf-card {
	width: 100%;
	max-width: 400px;
	background: var(--ctf-card-bg);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(31, 39, 51, 0.08), 0 1px 3px rgba(31, 39, 51, 0.06);
	padding: 32px 32px 28px;
}

.ctf-card__header {
	text-align: center;
	margin-bottom: 24px;
}

.ctf-logo {
	max-width: 200px;
	max-height: 90px;
	width: auto;
	height: auto;
}

.ctf-logo-text {
	font-size: 22px;
	font-weight: 700;
	color: var(--ctf-text);
}

.ctf-card__body {
	margin: 0;
}

.ctf-intro {
	margin: 0 0 18px;
	color: var(--ctf-muted);
}

.ctf-field {
	margin-bottom: 16px;
}

.ctf-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.ctf-input {
	width: 100%;
	padding: 11px 12px;
	font-size: 15px;
	color: var(--ctf-text);
	background: #fff;
	border: 1px solid var(--ctf-border);
	border-radius: 8px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ctf-input:focus {
	outline: none;
	border-color: var(--ctf-primary);
	box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.15);
}

.ctf-field--checkbox label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	color: var(--ctf-muted);
	cursor: pointer;
}

.ctf-field--checkbox input {
	margin: 0;
}

.ctf-button {
	position: relative;
	display: block;
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--ctf-primary);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ctf-button:hover,
.ctf-button:focus {
	background: var(--ctf-primary-hover);
}

.ctf-message {
	padding: 11px 14px;
	border-radius: 8px;
	margin-bottom: 18px;
	font-size: 14px;
	border: 1px solid transparent;
}

.ctf-message--error {
	background: var(--ctf-error-bg);
	border-color: var(--ctf-error-border);
	color: var(--ctf-error-text);
}

.ctf-message--success {
	background: var(--ctf-success-bg);
	border-color: var(--ctf-success-border);
	color: var(--ctf-success-text);
}

.ctf-hint {
	margin: -6px 0 16px;
	font-size: 13px;
	color: var(--ctf-muted);
}

.ctf-card__footer {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid #eef1f6;
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: center;
}

.ctf-link {
	color: var(--ctf-primary);
	text-decoration: none;
	font-size: 14px;
}

.ctf-link:hover {
	text-decoration: underline;
}

/* Submit button spinner. */
.ctf-button.ctf-loading {
	color: transparent !important;
	pointer-events: none;
}

.ctf-button.ctf-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, 0.55);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ctf-spin 0.6s linear infinite;
}

@keyframes ctf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Wordfence Login Security 2FA prompt.
   When active, hide our original login fields and let the prompt flow naturally
   inside the card instead of being absolutely positioned over it. */
#loginform.ctf-2fa-active > .ctf-field {
	display: none !important;
}

body.ctf-has-2fa .ctf-card__body > .ctf-message {
	display: none;
}

#loginform.ctf-2fa-active #wfls-prompt-overlay {
	position: static !important;
	inset: auto !important;
	background: transparent !important;
	padding: 0 !important;
}

#wfls-prompt-wrapper {
	width: 100%;
}

#wfls-prompt-wrapper p {
	margin: 0 0 14px;
}

#wfls-prompt-wrapper label[for="wfls-token"] {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

#wfls-token {
	width: 100%;
	padding: 11px 12px;
	font-size: 15px;
	border: 1px solid var(--ctf-border);
	border-radius: 8px;
}

#wfls-token:focus {
	outline: none;
	border-color: var(--ctf-primary);
	box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.15);
}

.wfls-remember-device-wrapper label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--ctf-muted);
}

#wfls-token-submit {
	width: 100%;
	padding: 12px 16px;
	font-weight: 600;
	color: #fff !important;
	background: var(--ctf-primary) !important;
	border: none !important;
	border-radius: 8px;
	cursor: pointer;
}

#wfls-token-submit.disabled,
#wfls-token-submit.ctf-loading {
	opacity: 0.75;
	cursor: default;
}

/* Show/hide password eye toggle. */
.ctf-input-wrap {
	position: relative;
}

.ctf-input--password {
	padding-right: 44px;
}

.ctf-eye {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 6px;
	color: var(--ctf-muted);
	cursor: pointer;
}

.ctf-eye:hover {
	color: var(--ctf-text);
}

.ctf-eye:focus-visible {
	outline: 2px solid var(--ctf-primary);
	outline-offset: 1px;
}

.ctf-eye .ctf-eye-closed {
	display: none;
}

.ctf-eye.ctf-eye--on .ctf-eye-open {
	display: none;
}

.ctf-eye.ctf-eye--on .ctf-eye-closed {
	display: block;
}

/* Wordfence message anchor — render inline where the password fields are,
   not in Wordfence's full-screen fallback modal. */
#login {
	display: block;
	margin: 0;
}

#login > h1 {
	display: none;
}

.wfls-login-message,
.ctf-wfls-error,
#wfls-token-error {
	display: block;
	margin: 0 0 14px;
	padding: 11px 14px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.4;
	background: var(--ctf-error-bg);
	border: 1px solid var(--ctf-error-border);
	color: var(--ctf-error-text);
}

.wfls-login-message.notice-success,
.wfls-login-message.message {
	background: var(--ctf-success-bg);
	border-color: var(--ctf-success-border);
	color: var(--ctf-success-text);
}

.wfls-login-message a,
.ctf-wfls-error a {
	color: inherit;
	text-decoration: underline;
}

/* Never show Wordfence's full-screen fallback modal; JS lifts its text inline. */
#wfls-login-modal {
	display: none !important;
}

@media (max-width: 480px) {
	.ctf-card {
		padding: 24px 20px 20px;
	}
}
