/* Skool Auth Modern v1.0.0
   Split-panel sliding auth for LearnPress lp-profile.
   Left/right panels swap with a slide, like the reference design:
   purple brand panel + cream form panel, Skool purple #6D5EF8.
   Only restyles the forms. Login, register, lost password and all
   email flows stay exactly as LearnPress / WordPress handle them. */

/* Self-contained sizing: do not depend on the theme's box-sizing reset. */
#learn-press-profile .sam-card,
#learn-press-profile .sam-card *,
#learn-press-profile .sam-card *::before,
#learn-press-profile .sam-card *::after {
	box-sizing: border-box;
}

#learn-press-profile .sam-card {
	--sam-purple: #6d5ef8;
	--sam-purple-deep: #5848e8;
	--sam-purple-soft: #efedfe;
	--sam-purple-light: #a99bff;
	--sam-cream: #fbf6e9;
	--sam-cream-deep: #f5edd7;
	--sam-ink: #23203a;
	--sam-muted: #6f6c85;
	--sam-line: #e3ddc8;
	--sam-danger: #b42318;
	--sam-danger-bg: #fef3f2;
	--sam-ease: cubic-bezier(.22, 1, .36, 1);

	position: relative;
	max-width: 880px;
	margin: 36px auto 48px;
	background: var(--sam-cream);
	border-radius: 28px;
	box-shadow: 0 30px 60px -18px rgba(35, 32, 58, .28), 0 8px 24px -12px rgba(35, 32, 58, .18);
	overflow: hidden;
	font-family: inherit;
	transition: height .55s var(--sam-ease);
	animation: sam-rise .6s var(--sam-ease) both;
}

@keyframes sam-rise {
	from { opacity: 0; transform: translateY(18px) scale(.99); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- form side (slides left <-> right) ---------- */

#learn-press-profile .sam-formside {
	position: absolute;
	top: 0;
	left: 0;
	width: 50%;
	height: 100%;
	background: var(--sam-cream);
	transition: transform .6s var(--sam-ease);
	z-index: 2;
}

#learn-press-profile .sam-card.sam-show-register .sam-formside {
	transform: translateX(100%);
}

/* ---------- overlay / brand side (slides the other way) ---------- */

#learn-press-profile .sam-overlay {
	position: absolute;
	top: 0;
	left: 50%;
	width: 50%;
	height: 100%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 44px 34px;
	text-align: center;
	color: #fff;
	background: linear-gradient(140deg, var(--sam-purple) 0%, #7d6cff 52%, #8b7cff 100%);
	clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%);
	transition: transform .6s var(--sam-ease), clip-path .6s var(--sam-ease);
	overflow: hidden;
}

#learn-press-profile .sam-card.sam-show-register .sam-overlay {
	transform: translateX(-100%);
	clip-path: polygon(0 0, 91% 0, 100% 100%, 0 100%);
}

/* soft decorative blobs on the purple panel */
#learn-press-profile .sam-overlay::before,
#learn-press-profile .sam-overlay::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	pointer-events: none;
}

#learn-press-profile .sam-overlay::before {
	width: 260px;
	height: 260px;
	top: -110px;
	right: -70px;
}

#learn-press-profile .sam-overlay::after {
	width: 190px;
	height: 190px;
	bottom: -90px;
	left: -50px;
	background: rgba(255, 255, 255, .09);
}

#learn-press-profile .sam-oinner {
	position: relative;
	z-index: 1;
	width: 100%;
}

#learn-press-profile .sam-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .04em;
	color: #fff;
	opacity: .95;
	margin-bottom: 26px;
}

#learn-press-profile .sam-brand .sam-dot {
	width: 22px;
	height: 22px;
	border-radius: 7px;
	background: #fff;
	color: var(--sam-purple);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 900;
}

#learn-press-profile .sam-omsg {
	display: none;
}

#learn-press-profile .sam-omsg.sam-active {
	display: block;
	animation: sam-msg-in .5s var(--sam-ease) both;
}

@keyframes sam-msg-in {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

#learn-press-profile .sam-omsg h2 {
	margin: 0 0 10px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 800;
	color: #fff;
	letter-spacing: -.01em;
}

#learn-press-profile .sam-omsg p {
	margin: 0 0 26px;
	font-size: 15px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .88);
}

#learn-press-profile .sam-art {
	width: 100%;
	max-width: 300px;
	height: auto;
	margin: 0 auto;
	display: block;
}

/* ---------- form panels ---------- */

#learn-press-profile .sam-panel {
	position: absolute;
	inset: 0;
	padding: 46px 42px 26px;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateX(26px);
	transition: opacity .45s var(--sam-ease), transform .45s var(--sam-ease), visibility 0s .45s;
}

#learn-press-profile .sam-panel.sam-active {
	opacity: 1;
	visibility: visible;
	transform: translateX(0);
	transition: opacity .45s var(--sam-ease) .12s, transform .45s var(--sam-ease) .12s, visibility 0s 0s;
}

#learn-press-profile .sam-panel h3 {
	margin: 0 0 26px;
	font-size: 24px;
	font-weight: 800;
	color: var(--sam-ink);
	text-align: center;
	letter-spacing: -.01em;
}

#learn-press-profile .sam-panel .form-fields {
	list-style: none;
	margin: 0;
	padding: 0;
}

#learn-press-profile .sam-panel .form-field {
	margin: 0 0 20px;
}

#learn-press-profile .sam-panel label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--sam-muted);
	margin-bottom: 6px;
}

#learn-press-profile .sam-panel label .required {
	color: var(--sam-danger);
}

#learn-press-profile .sam-panel input[type="text"],
#learn-press-profile .sam-panel input[type="email"],
#learn-press-profile .sam-panel input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	border: 0;
	border-bottom: 1.5px solid var(--sam-line);
	border-radius: 0;
	background: transparent;
	padding: 8px 2px;
	font-size: 15px;
	color: var(--sam-ink);
	outline: none;
	box-shadow: none;
	transition: border-color .25s ease;
}

#learn-press-profile .sam-panel input[type="text"]:focus,
#learn-press-profile .sam-panel input[type="email"]:focus,
#learn-press-profile .sam-panel input[type="password"]:focus {
	border-bottom-color: var(--sam-purple);
}

#learn-press-profile .sam-panel input::placeholder {
	color: #a9a49a;
}

/* password eye toggle */
#learn-press-profile .sam-pw {
	position: relative;
	display: block;
}

#learn-press-profile .sam-pw input {
	padding-right: 34px;
}

#learn-press-profile .sam-eye {
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	padding: 6px;
	cursor: pointer;
	color: #9a94a8;
	line-height: 0;
}

#learn-press-profile .sam-eye:hover {
	color: var(--sam-purple);
}

#learn-press-profile .sam-eye svg {
	width: 19px;
	height: 19px;
	display: block;
}

/* remember me row */
#learn-press-profile .sam-panel form > p {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--sam-muted);
}

#learn-press-profile .sam-panel input[type="checkbox"] {
	accent-color: var(--sam-purple);
	margin-right: 6px;
}

/* submit button */
#learn-press-profile .sam-panel button[type="submit"] {
	width: 100%;
	border: 0;
	border-radius: 999px;
	padding: 13px 20px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .01em;
	color: #fff;
	background: linear-gradient(135deg, var(--sam-purple), var(--sam-purple-deep));
	box-shadow: 0 10px 22px -8px rgba(109, 94, 248, .65);
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

#learn-press-profile .sam-panel button[type="submit"]:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
	box-shadow: 0 14px 26px -8px rgba(109, 94, 248, .7);
}

#learn-press-profile .sam-panel button[type="submit"]:active {
	transform: translateY(0);
}

/* lost password: stays exactly as LearnPress outputs it, only styled */
#learn-press-profile .sam-panel a[href*="lostpassword"] {
	display: block;
	text-align: center;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--sam-purple);
	text-decoration: none;
	margin-top: 4px;
}

#learn-press-profile .sam-panel a[href*="lostpassword"]:hover {
	text-decoration: underline;
}

/* switch link under each form */
#learn-press-profile .sam-switch {
	margin: 20px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--sam-line);
	text-align: center;
	font-size: 14px;
	color: var(--sam-muted);
}

#learn-press-profile .sam-switch button {
	border: 0;
	background: transparent;
	padding: 0;
	margin-left: 4px;
	font-size: 14px;
	font-weight: 700;
	color: var(--sam-purple);
	cursor: pointer;
}

#learn-press-profile .sam-switch button:hover {
	text-decoration: underline;
}

/* LearnPress messages (login/register errors) */
#learn-press-profile .sam-panel .learn-press-message {
	border-radius: 12px;
	padding: 12px 14px;
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.5;
}

#learn-press-profile .sam-panel .learn-press-message.error {
	background: var(--sam-danger-bg);
	color: var(--sam-danger);
	border: 1px solid #fecdca;
}

#learn-press-profile .sam-panel .learn-press-message.success {
	background: #ecfdf3;
	color: #027a48;
	border: 1px solid #a6f4c5;
}

/* ---------- mobile: stack, brand banner on top ---------- */

@media (max-width: 820px) {
	#learn-press-profile .sam-card {
		display: flex;
		flex-direction: column;
		margin: 20px auto 32px;
		border-radius: 22px;
		height: auto !important;
		animation: sam-rise .5s var(--sam-ease) both;
	}

	#learn-press-profile .sam-formside,
	#learn-press-profile .sam-overlay {
		position: relative;
		width: 100%;
		height: auto;
		left: auto;
		top: auto;
		transform: none !important;
		clip-path: none;
	}

	#learn-press-profile .sam-overlay {
		order: -1;
		padding: 30px 24px 26px;
	}

	#learn-press-profile .sam-overlay::before {
		width: 170px;
		height: 170px;
		top: -80px;
		right: -50px;
	}

	#learn-press-profile .sam-brand {
		margin-bottom: 14px;
	}

	#learn-press-profile .sam-omsg h2 {
		font-size: 23px;
	}

	#learn-press-profile .sam-omsg p {
		margin-bottom: 0;
		font-size: 14px;
	}

	#learn-press-profile .sam-art {
		display: none;
	}

	#learn-press-profile .sam-formside {
		order: 2;
	}

	#learn-press-profile .sam-panel {
		position: relative;
		display: none;
		padding: 32px 24px 22px;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
		animation: sam-msg-in .4s var(--sam-ease) both;
	}

	#learn-press-profile .sam-panel.sam-active {
		display: block;
	}

	#learn-press-profile .sam-panel h3 {
		margin-bottom: 22px;
		font-size: 21px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#learn-press-profile .sam-card,
	#learn-press-profile .sam-formside,
	#learn-press-profile .sam-overlay,
	#learn-press-profile .sam-panel,
	#learn-press-profile .sam-omsg.sam-active {
		animation: none;
		transition: none;
	}
}
