/*
 * Fitness Project — Signup & Questionnaire styles
 * Shared stylesheet for both [fp_signup] and [fp_questionnaire].
 * All rules scoped under .fp-signup to avoid collisions with the theme.
 */

.fp-signup {
	--fp-bg:       #ffffff;
	--fp-surface:  #ffffff;
	--fp-ink:      #191919;
	--fp-ink-2:    #4D4D4D;
	--fp-ink-3:    #888888;
	--fp-tan:      #E1D3BE;
	--fp-tan-deep: #191919;
	--fp-tan-soft: #F5F1ED;
	--fp-border:   rgba(25, 25, 25, .10);
	--fp-border-2: rgba(25, 25, 25, .22);
	--fp-field-bg: #F5F1ED;
	--fp-danger:   #b54141;
	--fp-success:  #3a7d5a;

	--fp-radius:   14px;
	--fp-radius-s: 10px;

	--fp-sans:    'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--fp-serif:   'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--fp-shadow:  0 1px 2px rgba(25, 25, 25, .03), 0 12px 36px -18px rgba(25, 25, 25, .14);

	background: var(--fp-bg);
	padding: clamp(24px, 5vw, 64px) 16px;
	font-family: var(--fp-sans);
	color: var(--fp-ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.fp-signup *,
.fp-signup *::before,
.fp-signup *::after {
	box-sizing: border-box;
}

/* ===================================================================
 * Shared: headlines, brand, typography
 * =================================================================== */

.fp-signup__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--fp-ink);
	margin-bottom: 32px;
}

.fp-signup__brand-mark {
	display: inline-flex;
	color: var(--fp-tan-deep);
}

.fp-signup__brand-text {
	font-family: var(--fp-serif);
	font-weight: 500;
	letter-spacing: .12em;
	font-size: 13px;
	text-transform: uppercase;
}

.fp-signup__headline {
	margin-bottom: 28px;
}

.fp-signup__title {
	font-family: var(--fp-serif);
	font-weight: 600;
	font-size: clamp(26px, 3.6vw, 34px);
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 10px;
	color: var(--fp-ink);
}

.fp-signup__subtitle {
	font-size: 15px;
	line-height: 1.55;
	color: var(--fp-ink-2);
	margin: 0;
	max-width: 46ch;
}

/* ===================================================================
 * Variant: SIGNUP FORM (simple centered column, no shell)
 * =================================================================== */

.fp-signup--form .fp-signup__column,
.fp-signup--notice .fp-signup__column {
	max-width: 420px;
	margin: 0 auto;
	text-align: center;
}

.fp-signup--form .fp-signup__brand {
	justify-content: center;
}

.fp-signup--form .fp-signup__subtitle {
	margin-left: auto;
	margin-right: auto;
}

.fp-signup--form .fp-signup__fields {
	display: flex;
	flex-direction: column;
	gap: 18px;
	text-align: left;
	margin-top: 4px;
}

/* ===================================================================
 * Variant: NOTICE (logged-in messages, "already a member" etc.)
 * =================================================================== */

.fp-signup--notice {
	text-align: center;
	padding-top: clamp(40px, 8vw, 80px);
	padding-bottom: clamp(40px, 8vw, 80px);
}

.fp-signup--notice .fp-signup__title {
	margin-bottom: 14px;
}

.fp-signup--notice .fp-signup__subtitle {
	margin: 0 auto 26px;
}

/* ===================================================================
 * Variant: WIZARD (questionnaire, card shell)
 * =================================================================== */

.fp-signup--wizard .fp-signup__shell {
	max-width: 640px;
	margin: 0 auto;
	background: var(--fp-surface);
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	box-shadow: var(--fp-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 560px;
}

.fp-signup--wizard .fp-signup__header {
	padding: 22px 28px 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.fp-signup--wizard .fp-signup__brand {
	margin-bottom: 0;
	justify-content: center;
}

.fp-signup--wizard .fp-signup__progress-wrap {
	width: 100%;
}

.fp-signup__progress-wrap {
	display: flex;
	align-items: center;
	gap: 14px;
}

.fp-signup__progress {
	flex: 1;
	height: 4px;
	background: var(--fp-tan-soft);
	border-radius: 999px;
	overflow: hidden;
}

.fp-signup__progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--fp-tan), var(--fp-tan-deep));
	border-radius: inherit;
	transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.fp-signup__step-indicator {
	font-size: 12px;
	letter-spacing: .04em;
	color: var(--fp-ink-3);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.fp-signup__viewport {
	flex: 1;
	padding: clamp(32px, 5vw, 52px) clamp(20px, 5vw, 44px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.fp-signup__step {
	display: none;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	text-align: center;
	animation: fp-step-in .45s cubic-bezier(.25, .8, .25, 1);
}

.fp-signup__step.is-active {
	display: block;
}

.fp-signup__step .fp-signup__subtitle {
	margin-left: auto;
	margin-right: auto;
}

@keyframes fp-step-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
 * Form fields
 * =================================================================== */

.fp-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fp-field__label {
	font-size: 13px;
	font-weight: 500;
	color: var(--fp-ink);
	letter-spacing: .01em;
}

.fp-field__input {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	padding: 13px 15px;
	font-family: var(--fp-sans);
	font-size: 15px;
	color: var(--fp-ink);
	background: var(--fp-field-bg);
	border: 1.5px solid var(--fp-border);
	border-radius: var(--fp-radius-s);
	transition: border-color .2s, box-shadow .2s, background .2s;
}

.fp-field__input:hover {
	border-color: var(--fp-border-2);
}

.fp-field__input:focus {
	outline: none;
	background: #fff;
	border-color: var(--fp-ink);
	box-shadow: 0 0 0 4px rgba(25, 25, 25, .06);
}

.fp-field__input.has-error {
	border-color: var(--fp-danger);
	background: #fdf5f5;
}

.fp-field__hint {
	font-size: 12px;
	color: var(--fp-ink-3);
}

.fp-field__error {
	font-size: 12.5px;
	color: var(--fp-danger);
	line-height: 1.4;
}

.fp-field__error:empty {
	display: none;
}

/* Checkbox (terms) */
.fp-field--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 13.5px;
	color: var(--fp-ink-2);
	line-height: 1.5;
}

.fp-field--checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 1px;
	border: 1.5px solid var(--fp-border-2);
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	transition: all .15s;
	position: relative;
}

.fp-field--checkbox input[type="checkbox"]:checked {
	background: var(--fp-ink);
	border-color: var(--fp-ink);
}

.fp-field--checkbox input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.fp-field--checkbox a {
	color: var(--fp-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.fp-field--checkbox a:hover {
	color: var(--fp-tan-deep);
}

/* Date input in wizard */
.fp-signup__date {
	max-width: 280px;
	margin: 0 auto;
}

.fp-field__input--date {
	font-variant-numeric: tabular-nums;
	text-align: center;
}

/* ===================================================================
 * Social login (Nextend) + divider
 * =================================================================== */

.fp-signup__social {
	margin-bottom: 18px;
}

.fp-signup__social .nsl-container-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fp-signup__divider {
	position: relative;
	text-align: center;
	margin: 4px 0 22px;
	font-size: 12px;
	color: var(--fp-ink-3);
	text-transform: uppercase;
	letter-spacing: .12em;
}

.fp-signup__divider::before,
.fp-signup__divider::after {
	content: "";
	position: absolute;
	top: 50%;
	width: calc(50% - 22px);
	height: 1px;
	background: var(--fp-border);
}

.fp-signup__divider::before { left: 0; }
.fp-signup__divider::after  { right: 0; }

.fp-signup__divider span {
	display: inline-block;
	padding: 0 14px;
	background: var(--fp-bg);
	position: relative;
}

/* ===================================================================
 * Options (single/multi cards) — used in wizard
 * =================================================================== */

.fp-signup__options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	text-align: left;
	max-width: 460px;
	margin: 0 auto;
}

.fp-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #fff;
	border: 1.5px solid var(--fp-border);
	border-radius: var(--fp-radius-s);
	cursor: pointer;
	font-family: inherit;
	font-size: 14.5px;
	color: var(--fp-ink);
	text-align: left;
	transition: transform .15s ease, border-color .15s, background .15s, box-shadow .15s;
	position: relative;
	min-height: 56px;
}

.fp-option:hover {
	border-color: var(--fp-tan);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px -4px rgba(25, 25, 25, .08);
}

.fp-option:focus-visible {
	outline: none;
	border-color: var(--fp-tan);
	box-shadow: 0 0 0 4px rgba(225, 211, 190, .2);
}

.fp-option.is-selected {
	border-color: var(--fp-ink);
	background: var(--fp-ink);
	color: #fff;
}

.fp-option__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	color: var(--fp-ink);
	transition: color .15s;
}

.fp-option__icon svg {
	width: 22px;
	height: 22px;
	display: block;
}

.fp-option.is-selected .fp-option__icon {
	color: #fff;
}

.fp-option__label {
	flex: 1;
	font-weight: 400;
}

.fp-option__check {
	opacity: 0;
	display: inline-flex;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--fp-tan);
	color: var(--fp-ink);
	align-items: center;
	justify-content: center;
	transition: opacity .15s, transform .15s;
	transform: scale(.7);
}

.fp-option.is-selected .fp-option__check {
	opacity: 1;
	transform: scale(1);
}

/* ===================================================================
 * Done step
 * =================================================================== */

.fp-signup__step--done .fp-signup__done {
	text-align: center;
	padding: 20px 0;
}

.fp-signup__done-mark {
	display: inline-flex;
	color: var(--fp-success);
	margin-bottom: 18px;
	animation: fp-done-pop .6s cubic-bezier(.25, 1.5, .35, 1) both;
}

@keyframes fp-done-pop {
	from { transform: scale(.5); opacity: 0; }
	to   { transform: scale(1);  opacity: 1; }
}

.fp-signup__step--done .fp-btn {
	margin-top: 24px;
}

/* ===================================================================
 * Buttons
 * =================================================================== */

.fp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 24px;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 500;
	letter-spacing: .01em;
	border-radius: 999px;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s, transform .15s, opacity .2s;
	text-decoration: none;
	min-height: 46px;
}

.fp-btn--block {
	width: 100%;
	margin-top: 8px;
}

.fp-btn:disabled,
.fp-btn[aria-disabled="true"] {
	opacity: .45;
	cursor: not-allowed;
}

.fp-btn--primary {
	background: var(--fp-ink);
	color: #fff;
}

.fp-btn--primary:hover:not(:disabled) {
	background: #000;
	transform: translateY(-1px);
}

.fp-btn--ghost {
	background: transparent;
	color: var(--fp-ink-2);
	border-color: var(--fp-border);
}

.fp-btn--ghost:hover:not(:disabled) {
	border-color: var(--fp-ink);
	color: var(--fp-ink);
}

.fp-btn[hidden] {
	display: none !important;
}

/* Loading state (spinner) */
.fp-btn.is-loading {
	pointer-events: none;
	position: relative;
}

.fp-btn.is-loading > * {
	opacity: 0;
}

.fp-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: fp-spin .7s linear infinite;
}

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

/* ===================================================================
 * Wizard nav + banner
 * =================================================================== */

.fp-signup__nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 18px clamp(20px, 5vw, 44px) clamp(20px, 4vw, 32px);
	border-top: 1px solid var(--fp-border);
	background: var(--fp-surface);
}

.fp-signup__error-banner {
	padding: 12px 16px;
	background: #fbe9e9;
	color: var(--fp-danger);
	border-radius: var(--fp-radius-s);
	font-size: 14px;
	border: 1px solid rgba(181, 65, 65, .25);
	margin: 12px 0;
}

.fp-signup--wizard .fp-signup__error-banner {
	margin: 0 clamp(20px, 5vw, 44px) 20px;
}

/* ===================================================================
 * Footer link (login / terms)
 * =================================================================== */

.fp-signup__login-link {
	margin: 24px 0 0;
	font-size: 13.5px;
	color: var(--fp-ink-2);
	text-align: center;
}

.fp-signup__login-link a {
	color: var(--fp-ink);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.fp-signup__login-link a:hover {
	color: var(--fp-tan-deep);
}

/* ===================================================================
 * Responsive
 * =================================================================== */

@media (max-width: 520px) {
	.fp-signup {
		padding: 24px 16px;
	}
	.fp-signup--wizard .fp-signup__shell {
		border-radius: var(--fp-radius);
	}
	.fp-signup__options {
		grid-template-columns: 1fr;
	}
	.fp-signup__title {
		font-size: 24px;
	}
}
