/* Magic Link Sign-In block — front end + editor preview. */

.gk-magic-login {
	--gk-pink: #d91556;
	--gk-pink-hover: #9e0f3e;
	max-width: 460px;
}

/* "OR" divider (kept from the previous sign-in design): a centered label
   flanked by hairlines, separating password login from the magic link. */
.gk-magic-login__or {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1.4rem;
	color: #9ca3af;
	font-size: .8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.gk-magic-login__or::before,
.gk-magic-login__or::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: #e5e7eb;
}

.gk-magic-login__heading {
	margin: 0 0 .35em;
	font-size: 1.25rem;
	line-height: 1.25;
}

/* Reset page: make the split-screen columns fill the viewport like /sign-in/
   (which scopes the same min-height to body.sign-in). Scoped to the columns
   block that contains the reset form so no other layout is affected. */
.wp-block-columns:has( .gk-magic-login--reset ),
.wp-block-columns:has( .gk-magic-login--reset ) > .wp-block-column {
	min-height: 100vh;
}

/* "Back to login" link on the password-reset form (Gravity Wiz pattern). */
.gk-magic-login__back {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin: 0 0 1.25rem;
	color: var(--gk-pink);
	text-decoration: none;
	font-weight: 600;
	font-size: .9rem;
}

.gk-magic-login__back:hover {
	color: var(--gk-pink-hover);
	text-decoration: underline;
}

.gk-magic-login__back svg {
	flex: 0 0 auto;
}

.gk-magic-login__desc {
	margin: 0 0 1.1em;
	color: #4b5563;
	line-height: 1.55;
	font-size: .95rem;
}

.gk-magic-login__form {
	margin: 0;
}

.gk-magic-login__label {
	display: block;
	margin-bottom: .4em;
	font-weight: 600;
	font-size: .85rem;
	color: #374151;
}

/* Combined field: the email input and submit button read as one rounded
   control (button sits inside the field, flush to the right edge). */
.gk-magic-login__row {
	display: flex;
	align-items: stretch;
	background: #fff;
	border: 1.5px solid #d1d5db;
	border-radius: 10px;
	overflow: hidden;
	transition: none;
}

.gk-magic-login__row:focus-within {
	border-color: var(--gk-pink);
	box-shadow: 0 0 0 3px rgba(217, 21, 86, .14);
}

.gk-magic-login__input {
	flex: 1 1 auto;
	min-width: 0;
	border: none;
	background: transparent;
	padding: .85rem 1rem;
	font-size: 1rem;
	line-height: 1.2;
	color: #111827;
	outline: none;
}

.gk-magic-login__input::placeholder {
	color: #9ca3af;
}

.gk-magic-login__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	flex: 0 0 auto;
	border: none;
	border-radius: 0;
	background: var(--gk-pink);
	color: #fff;
	padding: 0 1.15rem;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
	transition: none;
}

.gk-magic-login__button:hover,
.gk-magic-login__button:focus {
	background: var(--gk-pink-hover);
}

.gk-magic-login__button:disabled {
	opacity: .7;
	cursor: default;
}

.gk-magic-login__button.is-loading {
	cursor: progress;
}

.gk-magic-login__icon {
	flex: 0 0 auto;
}

.gk-magic-login__status {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
	margin-top: 1rem;
	padding: .85rem 1rem;
	border-radius: 10px;
	font-size: .92rem;
	line-height: 1.45;
}

.gk-magic-login__status svg {
	flex: 0 0 auto;
	margin-top: 1px;
}

.gk-magic-login__status.is-success {
	background: #ecfdf3;
	border: 1px solid #bbf7d0;
	color: #166534;
}

.gk-magic-login__status.is-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
}

/* On narrow screens, collapse the button to just its icon to keep the input
   usable inside the combined field. */
@media (max-width: 420px) {
	.gk-magic-login__btn-label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.gk-magic-login__button {
		padding: 0 1rem;
	}
}

/* Sign-in page: put "Remember me" and "Forgot password?" on one row above the
   Login button, sized with the theme's filter-sm token. The fields container
   is a 12-col grid and both span 1/-1 (stacking), so we give each half the row.
   Scoped via :has(.gf_login_links) so other Gravity Forms are untouched. */
.gform_wrapper:has( .gf_login_links ) .gform_fields > .gfield--type-remember_me {
	grid-column: 1 / span 6;
	align-self: center;
}

.gform_wrapper:has( .gf_login_links ) .login-options {
	grid-column: span 6 / -1;
	align-self: center;
	margin: 0;
}

.gform_wrapper:has( .gf_login_links ) .gfield--type-remember_me label {
	font-size: var( --wp--preset--font-size--filter-base );
}

.gform_wrapper:has( .gf_login_links ) .login-options,
.gform_wrapper:has( .gf_login_links ) .gf_login_links,
.gform_wrapper:has( .gf_login_links ) .gf_login_links a {
	font-size: var( --wp--preset--font-size--filter-sm );
	line-height: 1.3;
}

.gform_wrapper:has( .gf_login_links ) .gform_footer {
	margin-top: 10px !important;
	padding-top: 0 !important;
}
