/* Externalise (passe 2) — bloc inline #39 — position inchangee */

/* G6M_LOGIN_FORUM_CHROME_V409f
   Login = same site top + palms as forum (scroll-perf chrome).
   Not Vice City. Not a transparent black-sky slab.
*/

/* —— 1) Keep Vice City stage dead —— */
html#XF[data-template="login"] #g6m397-stage-bg,
html body[data-template="login"] #g6m397-stage-bg,
html body.template-login #g6m397-stage-bg {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	background: none !important;
	background-image: none !important;
}

/* —— 2) Forum palms fixed layer (exact scroll-perf palms89) —— */
html#XF[data-template="login"] body #g6m-scroll-perf-bg,
html body[data-template="login"] #g6m-scroll-perf-bg,
html body.template-login #g6m-scroll-perf-bg {
	position: fixed !important;
	inset: 0 !important;
	z-index: -1 !important;
	pointer-events: none !important;
	contain: strict !important;
	transform: translateZ(0);
	background-color: #0a0a0b !important;
	background-image: url("/site/public/assets/img/hero/gta6modding-forum-bg.webp?v=palms89") !important;
	background-position: center bottom !important;
	background-size: cover !important;
	background-repeat: no-repeat !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

@media (max-width: 1100px) {
	html#XF[data-template="login"] body #g6m-scroll-perf-bg,
	html body[data-template="login"] #g6m-scroll-perf-bg {
		background-image: url("/site/public/assets/img/hero/gta6modding-forum-bg-tablet.webp?v=palms89") !important;
	}
}

@media (max-width: 640px) {
	html#XF[data-template="login"] body #g6m-scroll-perf-bg,
	html body[data-template="login"] #g6m-scroll-perf-bg {
		background-image: url("/site/public/assets/img/hero/gta6modding-forum-bg-mobile.webp?v=palms89") !important;
	}
}

/* —— 3) Wrappers: transparent so fixed palms show (same as forum) —— */
html#XF[data-template="login"] body,
html body[data-template="login"],
html body.template-login,
html#XF[data-template="login"] body .p-pageWrapper,
html#XF[data-template="login"] body .uix_pageWrapper,
html#XF[data-template="login"] body .uix_pageWrapper--fixed,
html body[data-template="login"] .p-pageWrapper,
html body[data-template="login"] .uix_pageWrapper,
html body[data-template="login"] .uix_pageWrapper--fixed,
html body.template-login .p-pageWrapper,
html body.template-login .uix_pageWrapper,
html body.template-login .uix_pageWrapper--fixed {
	background-color: transparent !important;
	background-image:
		radial-gradient(ellipse 120% 65% at 50% 0%, rgba(8, 8, 10, 0.5) 0%, rgba(8, 8, 10, 0.15) 45%, transparent 100%),
		linear-gradient(180deg, rgba(10, 10, 12, 0.38) 0%, rgba(10, 10, 12, 0.1) 40%, rgba(8, 8, 10, 0.28) 100%) !important;
	background-size: 100% 100%, 100% 100% !important;
	background-position: center top, center top !important;
	background-repeat: no-repeat !important;
	background-attachment: scroll, scroll !important;
}

/* —— 4) Header metrics = forum logo-home (72px) —— */
html#XF[data-template="login"] body .p-header,
html#XF[data-template="login"].g6m-login-v397 body .p-header,
html#XF[data-template="login"] body.g6m-login-v397 .p-header,
html.g6m-login-v397 body .p-header,
html body[data-template="login"] .p-header,
html body.template-login .p-header {
	min-height: 72px !important;
	height: auto !important;
	max-height: none !important;
	padding: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	box-sizing: border-box !important;
}

html#XF[data-template="login"] body .p-header-inner,
html#XF[data-template="login"].g6m-login-v397 body .p-header-inner,
html#XF[data-template="login"] body.g6m-login-v397 .p-header-inner,
html.g6m-login-v397 body .p-header-inner,
html body[data-template="login"] .p-header-inner,
html body.template-login .p-header-inner {
	min-height: 72px !important;
	height: 72px !important;
	max-height: none !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	align-items: center !important;
	box-sizing: border-box !important;
}

/* —— 5) Header/nav = exact forum scroll-perf chrome —— */
html#XF[data-template="login"] body .p-header,
html#XF[data-template="login"] body .p-header-inner,
html#XF[data-template="login"] body .p-header-content,
html body[data-template="login"] .p-header,
html body[data-template="login"] .p-header-inner,
html body[data-template="login"] .p-header-content,
html body.template-login .p-header,
html body.template-login .p-header-inner,
html body.template-login .p-header-content {
	background: linear-gradient(180deg, rgba(8, 8, 12, 0.94) 0%, rgba(8, 8, 12, 0.98) 100%) !important;
	background-color: rgba(8, 8, 12, 0.98) !important;
	background-image: linear-gradient(180deg, rgba(8, 8, 12, 0.94) 0%, rgba(8, 8, 12, 0.98) 100%) !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	box-shadow: none !important;
}

/* V417: one seam only — on .p-header, never on inners */
html#XF[data-template="login"] body .p-header,
html body[data-template="login"] .p-header,
html body.template-login .p-header {
	border-bottom: 1px solid rgba(255, 11, 139, 0.4) !important;
}

html#XF[data-template="login"] body .p-header-inner,
html#XF[data-template="login"] body .p-header-content,
html body[data-template="login"] .p-header-inner,
html body[data-template="login"] .p-header-content,
html body.template-login .p-header-inner,
html body.template-login .p-header-content {
	border-bottom: 0 !important;
}

html#XF[data-template="login"] body .p-nav,
html#XF[data-template="login"] body .p-navSticky,
html#XF[data-template="login"] body .p-nav-inner,
html#XF[data-template="login"] body .p-sectionLinks,
html body[data-template="login"] .p-nav,
html body[data-template="login"] .p-navSticky,
html body[data-template="login"] .p-nav-inner,
html body[data-template="login"] .p-sectionLinks,
html body.template-login .p-nav,
html body.template-login .p-navSticky,
html body.template-login .p-nav-inner,
html body.template-login .p-sectionLinks {
	background: rgba(6, 6, 9, 0.96) !important;
	background-color: rgba(6, 6, 9, 0.96) !important;
	background-image: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	box-shadow: none !important;
}

/* Captcha stays centered in the form column */
html#XF[data-template="login"] .g6m397-col--form .g6m406-captcha,
html#XF[data-template="login"] .g6m397-col--form .g6m405-captcha,
html#XF[data-template="login"] .g6m397-col--form .formRow[context="xf_login"] {
	justify-content: center !important;
	align-items: center !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Keep OU divider in the grid column — never float over captcha/form */
html#XF[data-template="login"] .g6m397-grid {
	display: grid !important;
	grid-template-columns: minmax(0, 1.05fr) 28px minmax(0, 0.95fr) !important;
	align-items: stretch !important;
	position: relative !important;
}

html#XF[data-template="login"] .g6m397-divider {
	position: relative !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	transform: none !important;
	float: none !important;
	inset: auto !important;
	z-index: 1 !important;
	pointer-events: none !important;
	justify-self: center !important;
	align-self: stretch !important;
	width: 28px !important;
	margin: 0 !important;
}

html#XF[data-template="login"] .g6m397-col--form,
html#XF[data-template="login"] .g6m397-col--present {
	position: relative !important;
	z-index: 2 !important;
}

html#XF[data-template="login"] body .p-body,
html#XF[data-template="login"] body .p-body-main,
html#XF[data-template="login"] body .p-body-content,
html body[data-template="login"] .p-body,
html body[data-template="login"] .p-body-main,
html body[data-template="login"] .p-body-content {
	background: transparent !important;
}

/* END G6M_LOGIN_FORUM_CHROME_V409f */

