@charset "utf-8";

/*
 * 파워볼헬퍼 모바일 로그인
 * - 평소: 세로 중앙 / 포커스 시: 하단 배치 (adjustPan 잘림 완화)
 * - 사이트 헤더 유지, visualViewport 높이 동기화
 */

.pbh-login {
	--pbh-navy: #0c0546;
	--pbh-accent: #facc15;
	--pbh-ink: #1a1a2e;
	--pbh-muted: #6b7280;
	--pbh-line: rgba(12, 5, 70, 0.12);
	--pbh-bg: #f3f4f8;
	--pbh-card: #ffffff;

	position: relative;
	isolation: isolate;
	height: 100%;
	margin: 0 !important;
	padding: 0;
	text-align: center;
	background: var(--pbh-bg);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}

.pbh-login__stage {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	min-height: 0;
	padding: 16px 18px max(16px, env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
}

.pbh-login__top {
	flex: 0 0 auto;
	padding: 0 0 8px;
	text-align: center;
}

.pbh-login__title-text {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	font-size: 1.125rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--pbh-navy);
}

/* 입력 시트: 모바일·PC 모두 세로 중앙 (키보드 pan 시 잘리면 하단 배치로 되돌릴 수 있음) */
.pbh-login__sheet {
	flex: 0 0 auto;
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
	text-align: left;
}

.pbh-login #flogin,
.pbh-login__form {
	margin: 0;
	padding: 20px 18px 16px;
	background: var(--pbh-card);
	border: 1px solid rgba(12, 5, 70, 0.08);
	border-radius: 20px;
	box-shadow: 0 12px 32px -18px rgba(12, 5, 70, 0.35);
}

.pbh-login #login_frm,
.pbh-login__fields {
	padding: 0 !important;
	position: static;
}

.pbh-login__field {
	margin: 0 0 12px !important;
}

.pbh-login__label {
	display: block;
	margin: 0 0 5px;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--pbh-navy);
}

.pbh-login .frm_input,
.pbh-login__input {
	width: 100%;
	height: 48px;
	margin: 0 !important;
	padding: 0 14px;
	border: 1.5px solid var(--pbh-line);
	border-radius: 12px;
	background: #fff;
	font-size: 16px; /* iOS/Android 줌 방지 */
	color: var(--pbh-ink);
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.pbh-login .frm_input::placeholder {
	color: #9ca3af;
}

.pbh-login .frm_input:focus {
	outline: none;
	border-color: var(--pbh-navy);
	box-shadow: 0 0 0 3px rgba(12, 5, 70, 0.12);
}

.pbh-login__auto {
	margin: 2px 0 14px !important;
}

.pbh-login__auto label {
	padding-left: 26px !important;
	font-size: 0.875rem;
	color: var(--pbh-muted);
	cursor: pointer;
	user-select: none;
}

.pbh-login__auto.chk_box input[type="checkbox"] + label span {
	top: 1px;
	left: 0;
	width: 18px;
	height: 18px;
	border-radius: 5px;
	border-color: rgba(12, 5, 70, 0.25);
}

.pbh-login__auto.chk_box input[type="checkbox"]:checked + label {
	color: var(--pbh-navy);
}

.pbh-login__auto.chk_box input[type="checkbox"]:checked + label span {
	background-color: var(--pbh-navy);
	border-color: var(--pbh-navy);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23facc15' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
}

.pbh-login .btn_submit,
.pbh-login__submit {
	display: block;
	width: 100%;
	height: 50px !important;
	margin: 0 !important;
	padding: 0 16px;
	border: 0;
	border-radius: 14px !important;
	background: var(--pbh-navy) !important;
	color: #fff !important;
	font-size: 1.0625rem !important;
	font-weight: 800 !important;
	line-height: 50px !important;
	cursor: pointer;
}

.pbh-login .btn_submit:active,
.pbh-login__submit:active {
	filter: brightness(1.05);
}

.pbh-login .mb_login_join,
.pbh-login__links {
	padding: 14px 0 0 !important;
	margin: 0;
	text-align: center;
	clear: both;
}

.pbh-login .mb_login_join:after {
	display: none;
}

.pbh-login__link-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

#mb_login.pbh-login .mb_login_join a {
	float: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--pbh-muted) !important;
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	text-decoration: none;
}

#mb_login.pbh-login .mb_login_join a:active {
	color: var(--pbh-navy) !important;
}

.pbh-login__link-dot {
	color: #c4c9d4;
	font-weight: 700;
}

.pbh-login #sns_login {
	margin: 14px 0 0 !important;
	padding: 14px 0 0 !important;
	border: 0 !important;
	border-top: 1px solid var(--pbh-line) !important;
	clear: both;
}

#mb_login.pbh-login #sns_login:after {
	display: none !important;
	content: none !important;
}

#mb_login.pbh-login #sns_login .sns-wrap {
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	margin: 0 !important;
	text-align: center !important;
}

#mb_login.pbh-login #sns_login .sns-icon {
	float: none !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 100% !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 44px !important;
	box-sizing: border-box;
	border-radius: 12px !important;
	border-bottom: 0 !important;
	line-height: 1 !important;
	text-align: center !important;
	font-size: 0.875rem;
	font-weight: 700;
}

#mb_login.pbh-login #sns_login .sns-icon .ico {
	position: absolute !important;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
}

#mb_login.pbh-login #sns_login .sns-google .ico {
	top: 50% !important;
	left: 7px !important;
	width: 30px !important;
	height: 30px !important;
	border-radius: 8px !important;
}

#mb_login.pbh-login #sns_login .txt {
	display: inline !important;
	float: none !important;
	width: auto !important;
	padding: 0 !important;
	border: 0 !important;
	border-left: 0 !important;
	text-align: center !important;
	font-size: inherit !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
}

/* —— 페이지 셸: 항상 visualViewport 높이(--pbh-vv-height)에 맞춤 —— */
html.pbh-login-html,
html.pbh-login-html body {
	height: var(--pbh-vv-height, 100dvh) !important;
	max-height: var(--pbh-vv-height, 100dvh) !important;
	overflow: hidden !important;
}

body.pbh-login-page #ft,
body.pbh-login-page #container_title,
body.pbh-login-page #mobileBottomNav,
body.pbh-login-page #top_btn {
	display: none !important;
}

body.pbh-login-page #wrapper,
html.pbh-login-html #wrapper {
	height: max(160px, calc(var(--pbh-vv-height, 100dvh) - var(--pbh-hd-h, 50px))) !important;
	max-height: max(160px, calc(var(--pbh-vv-height, 100dvh) - var(--pbh-hd-h, 50px))) !important;
	min-height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
}

body.pbh-login-page #container,
html.pbh-login-html #container {
	height: 100% !important;
	min-height: 0 !important;
	overflow: hidden !important;
	padding: 0 !important;
	margin: 0 !important;
}

.pbh-login {
	min-height: 0;
}

/* 포커스(키보드) 시: 폼 하단 배치는 모바일 화면에서만 적용 */
@media (max-width: 767.98px) {
	body.pbh-login-page.pbh-login-kb .pbh-login__stage {
		justify-content: flex-end;
		min-height: 100%;
		height: auto;
		padding-top: 8px;
		padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
	}

	body.pbh-login-page.pbh-login-kb .pbh-login__top {
		display: none;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login #flogin,
	body.pbh-login-page.pbh-login-kb .pbh-login__form {
		padding: 14px 14px 12px;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login__field {
		margin-bottom: 8px !important;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login .frm_input,
	body.pbh-login-page.pbh-login-kb .pbh-login__input {
		height: 44px;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login .btn_submit,
	body.pbh-login-page.pbh-login-kb .pbh-login__submit {
		height: 46px !important;
		line-height: 46px !important;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login #sns_login {
		display: none !important;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login__auto {
		margin-bottom: 10px !important;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login__links {
		padding-top: 8px !important;
	}
}

/* PC는 포커스해도 중앙 유지 (물리 키보드) */
@media (min-width: 768px) {
	body.pbh-login-page.pbh-login-kb .pbh-login__stage {
		justify-content: center;
		padding: 32px 24px 48px;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login__top {
		display: block;
		padding-bottom: 12px;
	}

	body.pbh-login-page.pbh-login-kb .pbh-login #sns_login {
		display: block !important;
	}
}

/* 태블릿·PC: 여백·타이포만 조정 (배치는 공통 중앙) */
@media (min-width: 768px) {
	.pbh-login__stage {
		max-width: 440px;
		margin: 0 auto;
		padding: 32px 24px 48px;
	}

	.pbh-login__top {
		padding-bottom: 12px;
	}

	.pbh-login__title-text {
		font-size: 1.35rem;
	}

	.pbh-login #flogin,
	.pbh-login__form {
		padding: 28px 24px 22px;
	}
}

@media (min-width: 1024px) {
	.pbh-login__stage {
		padding-top: 48px;
		padding-bottom: 64px;
	}
}
