/* ============================================================
   YimCore Login Page - Background + Right-Aligned Layout
   Hook-injected CSS (no source code modified)
   Covers: login / forgot-password / email-login / reset-password / signup
   ============================================================ */

/* ---- Page background ---- */
html:has(body.yimcore-login),
html.yimcore-login,
body.yimcore-login {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	overflow: hidden !important;            /* kill page scrollbars */
}

body.yimcore-login {
	background-image: url("/assets/yimcore_login_ui/images/login_bg.png");
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

/* Wrappers fill viewport */
body.yimcore-login .main-section,
body.yimcore-login .page_content {
	min-height: 100vh;
	margin: 0;
	padding: 0;
}

/* The stock layout wraps page content in .container which has max-width + auto margins;
   on the login page we need full viewport width so the flex card can align right. */
body.yimcore-login .container {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ============================================================
   All login-related sections (login, forgot, email-login,
   reset-password, signup) share the SAME layout:
     - desktop: card pushed to the right
     - mobile : card centered
   ============================================================ */
body.yimcore-login section.for-login,
body.yimcore-login section.for-forgot,
body.yimcore-login section.for-login-with-email-link,
body.yimcore-login section.for-email-login,
body.yimcore-login section.for-reset-password,
body.yimcore-login section.for-signup {
	display: flex;
	justify-content: flex-end;          /* card to the right on desktop */
	align-items: center;                /* vertical center */
	min-height: 100vh;
	padding: 0 6vw 0 0;
	margin: 0;
}

/* ============================================================
   The card itself — applies to ALL variants.
   The default login stylesheet sets:
     min-height: 100svh; max-width: 100%; margin: 0 auto;
     background-color: var(--bg-color);
   We override to a compact, semi-transparent, right-aligned panel.
   ============================================================ */
body.yimcore-login section[class*="for-"] .page-card {
	min-height: auto !important;
	height: auto !important;
	width: 400px !important;
	max-width: 90vw !important;
	margin: 0 !important;
	padding: 20px 24px !important;
	border-radius: 12px !important;
	border: 1px solid rgba(255, 255, 255, 0.4) !important;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18) !important;
	background-color: rgba(255, 255, 255, 0.3) !important;
	background-image: none !important;
	backdrop-filter: blur(14px) !important;
	-webkit-backdrop-filter: blur(14px) !important;
}

/* Tighten internal spacing so the card is not too tall */
body.yimcore-login section[class*="for-"] .page-card .page-card-head {
	margin-bottom: 12px !important;
}
body.yimcore-login section[class*="for-"] .page-card form {
	gap: 12px !important;
}

/* Move the card slightly upward for better visual balance */
body.yimcore-login section[class*="for-"] .page-card {
	transform: translateY(-4vh);
}

/* Logo sizing */
body.yimcore-login .app-logo {
	max-width: 64px;
	max-height: 64px;
}

/* ============================================================
   Post-login splash / transition screen
   The splash markup has class "centered splash" where .centered
   sets position:absolute + transform:translate(-50%,-50%).
   We override to full-viewport fixed with a SOLID background so
   the login background image is no longer visible, and center
   the Y logo.
   ============================================================ */
body.yimcore-login .centered.splash,
body.yimcore-login .splash {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	transform: none !important;
	-webkit-transform: none !important;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	background: #f4f7fb !important;        /* solid light bg, covers login bg */
	z-index: 99999 !important;
}

body.yimcore-login .splash img {
	max-width: 140px !important;
	width: auto !important;
}

/* ============================================================
   Mobile: center the card, keep it compact (no long stretch)
   ============================================================ */
@media (max-width: 768px) {
	body.yimcore-login section.for-login,
	body.yimcore-login section.for-forgot,
	body.yimcore-login section.for-login-with-email-link,
	body.yimcore-login section.for-email-login,
	body.yimcore-login section.for-reset-password,
	body.yimcore-login section.for-signup {
		justify-content: center;
		padding: 0;
	}

	body.yimcore-login section[class*="for-"] .page-card {
		width: 90vw !important;
		max-width: 400px !important;
		max-height: 88vh !important;
		overflow-y: auto !important;
		transform: translateY(-2vh);
	}
}
