/*!
 * 账户中心样式
 * 预算沿用站点现有设计语言：
 *   主色 #e6b706 / 正文 #44494b / 次色 #2e2e2e / 浅底 #ebeeef / 描边 #dedede
 *   正文 "Droid Serif" / 标题与按钮 'Montserrat'
 *   圆角 5px（面板）· 3px（控件）· 按钮内边距 0.71em 2.29em
 */

.ja-modal,
.ja-toast,
#jaModal {
	--ja-gold: #e6b706;
	--ja-gold-h: #f2c918;
	--ja-ink: #44494b;
	--ja-ink-2: #2e2e2e;
	--ja-line: #dedede;
	--ja-soft: #ebeeef;
	--ja-muted: #8b9195;
	--ja-font: "Droid Serif", Georgia, serif;
	--ja-head: "Montserrat", Helvetica, Arial, sans-serif;
	--ja-brand: #999;
}

/* 站点原有弹窗由脚本接管，这里做兜底隐藏，避免出现两个入口 */
#memberModalLogin,
.memberModalLogin,
#memberModalRegister,
.memberModalRegister {
	display: none !important;
}

body.ja-lock {
	overflow: hidden;
}

/* ===================== 遮罩与面板 ===================== */

.ja-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1060;
	display: none;
	-webkit-overflow-scrolling: touch;
}

.ja-modal.is-open {
	display: block;
}

.ja-modal__mask {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, .5);
	animation: jaMask .2s ease;
}

@keyframes jaMask {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.ja-modal__box {
	position: relative;
	width: 430px;
	max-width: calc(100% - 28px);
	margin: 6vh auto 30px;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-direction: column;
	flex-direction: column;
	max-height: 88vh;
	background: #fff;
	border-radius: 5px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
	overflow: hidden;
	animation: jaPop .24s cubic-bezier(.2, .8, .3, 1);
}

@keyframes jaPop {
	from { opacity: 0; -webkit-transform: translateY(-14px) scale(.985); transform: translateY(-14px) scale(.985); }
	to   { opacity: 1; -webkit-transform: none; transform: none; }
}

/* ===================== 头部与切换 ===================== */

.ja-modal__head {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: flex-end;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	padding: 0 30px;
	background: var(--ja-soft);
	border-bottom: 1px solid var(--ja-line);
	border-radius: 5px 5px 0 0;
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.ja-tabs {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ja-tab {
	display: inline-block;
	margin: 0 26px 0 0;
	padding: 15px 0 12px;
	font-family: var(--ja-head);
	font-weight: bold;
	font-size: 15px;
	line-height: 1;
	color: var(--ja-muted);
	text-decoration: none;
	border-bottom: 3px solid transparent;
	-webkit-transition: color .18s, border-color .18s;
	transition: color .18s, border-color .18s;
}

.ja-tab:last-child {
	margin-right: 0;
}

.ja-tab:hover,
.ja-tab:focus {
	color: var(--ja-ink);
	text-decoration: none;
}

.ja-tab.is-active {
	color: var(--ja-ink);
	border-bottom-color: var(--ja-gold);
}

.ja-modal__x {
	margin: 0 0 10px;
	padding: 0 0 0 10px;
	border: 0;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: #9aa0a3;
	cursor: pointer;
	-webkit-transition: color .18s, -webkit-transform .18s;
	transition: color .18s, transform .18s;
}

.ja-modal__x:hover {
	color: var(--ja-ink-2);
	-webkit-transform: rotate(90deg);
	transform: rotate(90deg);
}

/* ===================== 主体 ===================== */

.ja-modal__body {
	padding: 26px 30px 30px;
	overflow-y: auto;
	overflow-x: hidden;
}

/* ---- 第三方登录 ---- */

.ja-sso {
	margin-bottom: 4px;
}

.ja-sso__grid {
	display: -ms-grid;
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ja-sso__btn {
	position: relative;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: var(--ja-brand);
	color: #fff;
	cursor: pointer;
	overflow: hidden;
	text-align: left;
	-webkit-transition: -webkit-transform .16s, -webkit-filter .16s;
	transition: transform .16s, filter .16s;
}

.ja-sso__btn.is-wide {
	grid-column: 1 / -1;
}

.ja-sso__btn:hover {
	-webkit-filter: brightness(1.08);
	filter: brightness(1.08);
	-webkit-transform: translateY(-1px);
	transform: translateY(-1px);
}

.ja-sso__btn:active {
	-webkit-transform: translateY(0);
	transform: translateY(0);
}

/* 站点未启用 HTTPS 时：按钮保留但置灰，避免误以为是可用功能 */
.ja-sso__btn.is-off {
	-webkit-filter: grayscale(1) opacity(.55);
	filter: grayscale(1) opacity(.55);
	cursor: not-allowed;
}

.ja-sso__btn.is-off:hover,
.ja-sso__btn.is-off:active {
	-webkit-filter: grayscale(1) opacity(.55);
	filter: grayscale(1) opacity(.55);
	-webkit-transform: none;
	transform: none;
}

.ja-sso__note {
	margin: 10px 0 0;
	padding: 0;
	font-size: 12px;
	line-height: 1.7;
	color: #8a8f92;
	text-align: center;
}

.ja-sso__note .fa {
	margin-right: 5px;
	font-size: 12px;
}

.ja-sso__icon {
	-ms-flex: 0 0 46px;
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	font-size: 20px;
	background: rgba(0, 0, 0, .16);
}

.ja-sso__btn.is-wide .ja-sso__icon {
	-ms-flex: 0 0 52px;
	flex: 0 0 52px;
	width: 52px;
	height: 46px;
}

.ja-sso__text {
	padding: 0 12px;
	font-family: var(--ja-head);
	font-weight: bold;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ja-sso__btn.is-loading {
	opacity: .75;
	pointer-events: none;
}

.ja-sso__btn.is-loading .ja-sso__icon .fa::before {
	content: "\f110";
	-webkit-animation: jaSpin 1s linear infinite;
	animation: jaSpin 1s linear infinite;
}

@-webkit-keyframes jaSpin { to { -webkit-transform: rotate(360deg); } }
@keyframes jaSpin { to { transform: rotate(360deg); } }

.ja-divider {
	position: relative;
	margin: 22px 0 20px;
	text-align: center;
}

.ja-divider::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--ja-line);
}

.ja-divider span {
	position: relative;
	display: inline-block;
	padding: 0 12px;
	background: #fff;
	font-family: var(--ja-head);
	font-weight: bold;
	font-size: 11px;
	letter-spacing: .08em;
	color: #a8adb0;
}

/* ---- 表单 ---- */

.ja-pane {
	display: none;
}

.ja-pane.is-active {
	display: block;
	-webkit-animation: jaFade .22s ease;
	animation: jaFade .22s ease;
}

@-webkit-keyframes jaFade {
	from { opacity: 0; -webkit-transform: translateY(5px); }
	to   { opacity: 1; -webkit-transform: none; }
}

@keyframes jaFade {
	from { opacity: 0; transform: translateY(5px); }
	to   { opacity: 1; transform: none; }
}

.ja-field {
	margin-bottom: 14px;
}

.ja-field > label {
	display: block;
	margin-bottom: 6px;
	font-family: var(--ja-head);
	font-weight: bold;
	font-size: 12px;
	line-height: 1.4;
	color: var(--ja-ink);
	letter-spacing: .02em;
}

.ja-input {
	position: relative;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	background: #fff;
	border: 1px solid var(--ja-line);
	border-radius: 3px;
	-webkit-transition: border-color .18s, box-shadow .18s;
	transition: border-color .18s, box-shadow .18s;
}

.ja-input:focus-within {
	border-color: var(--ja-gold);
	box-shadow: 0 0 0 3px rgba(230, 183, 6, .16);
}

.ja-input.is-error {
	border-color: #d9534f;
	box-shadow: 0 0 0 3px rgba(217, 83, 79, .12);
}

.ja-input > .fa {
	-ms-flex: 0 0 40px;
	flex: 0 0 40px;
	width: 40px;
	text-align: center;
	font-size: 14px;
	color: #adb2b5;
}

.ja-input input {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 42px;
	margin: 0;
	padding: 0 10px 0 0;
	border: 0;
	outline: 0;
	background: none;
	font-family: var(--ja-font);
	font-size: 14px;
	line-height: 42px;
	color: var(--ja-ink);
	box-shadow: none;
}

.ja-input input::-webkit-input-placeholder { color: #b3b8bb; }
.ja-input input::-moz-placeholder { color: #b3b8bb; opacity: 1; }
.ja-input input:-ms-input-placeholder { color: #b3b8bb; }
.ja-input input::placeholder { color: #b3b8bb; }

.ja-eye {
	-ms-flex: 0 0 38px;
	flex: 0 0 38px;
	width: 38px;
	height: 42px;
	padding: 0;
	border: 0;
	background: none;
	color: #adb2b5;
	cursor: pointer;
	-webkit-transition: color .18s;
	transition: color .18s;
}

.ja-eye:hover {
	color: var(--ja-gold);
}

/* ---- 密码强度 ---- */

.ja-strength {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 5px;
	margin-top: 8px;
}

.ja-strength i {
	-ms-flex: 1 1 0;
	flex: 1 1 0;
	height: 4px;
	border-radius: 2px;
	background: #e5e8e9;
	-webkit-transition: background .2s;
	transition: background .2s;
}

.ja-strength em {
	min-width: 34px;
	font-family: var(--ja-head);
	font-size: 11px;
	font-style: normal;
	text-align: right;
	color: #a8adb0;
}

.ja-strength[data-level="1"] i:nth-child(-n+1) { background: #d9534f; }
.ja-strength[data-level="2"] i:nth-child(-n+2) { background: #f0ad4e; }
.ja-strength[data-level="3"] i:nth-child(-n+3) { background: var(--ja-gold); }
.ja-strength[data-level="4"] i { background: #5cb85c; }

/* ---- 勾选 ---- */

.ja-check {
	position: relative;
	display: -webkit-inline-box;
	display: -ms-inline-flexbox;
	display: inline-flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 8px;
	font-family: var(--ja-font);
	font-size: 13px;
	line-height: 1.5;
	color: #7d8386;
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.ja-check--block {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	margin: 4px 0 18px;
}

.ja-check input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.ja-check > i {
	position: relative;
	-ms-flex: 0 0 16px;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	background: #fff;
	border: 1px solid #c3c3c3;
	border-radius: 3px;
	-webkit-transition: background .15s, border-color .15s;
	transition: background .15s, border-color .15s;
}

.ja-check > i::after {
	content: "";
	position: absolute;
	top: 1px;
	left: 5px;
	width: 4px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	-webkit-transform: rotate(45deg) scale(.4);
	transform: rotate(45deg) scale(.4);
	opacity: 0;
	-webkit-transition: opacity .15s, -webkit-transform .15s;
	transition: opacity .15s, transform .15s;
}

.ja-check input:checked ~ i {
	background: var(--ja-gold);
	border-color: var(--ja-gold);
}

.ja-check input:checked ~ i::after {
	opacity: 1;
	-webkit-transform: rotate(45deg) scale(1);
	transform: rotate(45deg) scale(1);
}

.ja-check input:focus-visible ~ i {
	box-shadow: 0 0 0 3px rgba(230, 183, 6, .3);
}

/* ---- 身份选择 ---- */

.ja-seg {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	border: 1px solid var(--ja-line);
	border-radius: 3px;
	overflow: hidden;
}

.ja-seg label {
	position: relative;
	-webkit-box-flex: 1;
	-ms-flex: 1 1 50%;
	flex: 1 1 50%;
	margin: 0;
}

.ja-seg input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.ja-seg span {
	display: block;
	padding: 11px 6px;
	background: #fff;
	font-family: var(--ja-head);
	font-weight: bold;
	font-size: 13px;
	line-height: 1.2;
	text-align: center;
	color: #7d8386;
	cursor: pointer;
	-webkit-transition: background .18s, color .18s;
	transition: background .18s, color .18s;
}

.ja-seg label + label span {
	border-left: 1px solid var(--ja-line);
}

.ja-seg label:hover span {
	color: var(--ja-ink);
}

.ja-seg input:checked ~ span {
	background: var(--ja-gold);
	color: var(--ja-ink);
}

/* ---- 提示信息 ---- */

.ja-msg {
	display: none;
	margin-bottom: 14px;
	padding: 10px 13px;
	border-radius: 3px;
	border-left: 3px solid;
	font-family: var(--ja-font);
	font-size: 13px;
	line-height: 1.6;
}

.ja-msg.is-on {
	display: block;
}

.ja-msg.is-err {
	background: #fdecea;
	border-left-color: #d9534f;
	color: #a94442;
}

.ja-msg.is-ok {
	background: #f2f8f2;
	border-left-color: #5cb85c;
	color: #3c763d;
}

.ja-hint {
	margin: 0 0 16px;
	padding: 0;
	font-family: var(--ja-font);
	font-size: 13px;
	font-style: italic;
	line-height: 1.65;
	color: #8b9195;
}

/* ---- 按钮与页脚 ---- */

.ja-btn {
	display: block;
	width: 100%;
	height: 45px;
	margin: 0;
	padding: 0.71em 2.29em;
	border: 0;
	border-radius: 3px;
	font-family: var(--ja-head);
	font-weight: bold;
	font-size: 14px;
	line-height: 1;
	letter-spacing: .08em;
	text-align: center;
	cursor: pointer;
	-webkit-transition: background .18s, color .18s, opacity .18s;
	transition: background .18s, color .18s, opacity .18s;
}

.ja-btn--primary {
	margin-top: 6px;
	background: var(--ja-gold);
	color: var(--ja-ink);
}

.ja-btn--primary:hover {
	background: var(--ja-gold-h);
	color: var(--ja-ink);
}

.ja-btn--primary[disabled],
.ja-btn--primary.is-busy {
	opacity: .65;
	cursor: not-allowed;
}

.ja-btn.is-busy .fa {
	margin-right: 6px;
	-webkit-animation: jaSpin 1s linear infinite;
	animation: jaSpin 1s linear infinite;
}

.ja-foot {
	margin: 18px 0 0;
	font-family: var(--ja-font);
	font-size: 13px;
	font-style: italic;
	line-height: 1.6;
	text-align: center;
	color: #8b9195;
}

.ja-row {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	margin: 2px 0 16px;
}

.ja-link {
	color: var(--ja-ink-2);
	text-decoration: none;
	-webkit-transition: color .18s;
	transition: color .18s;
}

.ja-row .ja-link {
	font-family: var(--ja-font);
	font-size: 13px;
	font-style: italic;
}

.ja-link:hover,
.ja-link:focus {
	color: var(--ja-gold);
	text-decoration: none;
}

.ja-foot .ja-link {
	font-style: normal;
	font-weight: bold;
}

/* ---- 无障碍 ---- */

.ja-modal :focus-visible,
.ja-toast :focus-visible {
	outline: 2px solid var(--ja-gold);
	outline-offset: 2px;
}

.ja-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- 轻提示 ---- */

.ja-toast {
	position: fixed;
	top: 24px;
	left: 50%;
	z-index: 1100;
	max-width: calc(100% - 40px);
	padding: 11px 20px;
	background: var(--ja-ink);
	color: #fff;
	border-radius: 3px;
	font-family: var(--ja-font);
	font-size: 13px;
	line-height: 1.6;
	text-align: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
	opacity: 0;
	pointer-events: none;
	-webkit-transform: translate(-50%, -10px);
	transform: translate(-50%, -10px);
	-webkit-transition: opacity .25s ease, -webkit-transform .25s ease;
	transition: opacity .25s ease, transform .25s ease;
}

.ja-toast.is-on {
	opacity: 1;
	-webkit-transform: translate(-50%, 0);
	transform: translate(-50%, 0);
}

.ja-toast.is-ok {
	background: #3c763d;
}

.ja-toast.is-err {
	background: #a94442;
}

/* ===================== 小屏 ===================== */

@media (max-width: 480px) {
	.ja-modal__box {
		margin: 3vh auto 20px;
		max-height: 92vh;
	}

	.ja-modal__head {
		padding: 0 20px;
	}

	.ja-modal__body {
		padding: 22px 20px 24px;
	}

	.ja-sso__btn,
	.ja-sso__icon {
		height: 44px;
	}

	.ja-sso__icon {
		-ms-flex: 0 0 44px;
		flex: 0 0 44px;
		width: 44px;
	}

	.ja-sso__text {
		font-size: 12px;
		padding: 0 8px;
	}
}

@media (max-width: 340px) {
	.ja-sso__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ===================== 已登录状态 ===================== */

.ja-account-badge {
	display: -webkit-inline-box;
	display: -ms-inline-flexbox;
	display: inline-flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 8px;
}

.ja-account-badge img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	-o-object-fit: cover;
	object-fit: cover;
}

.ja-account-badge em {
	font-style: normal;
}

/* 第三方账号注册后未绑定邮箱时的提醒 */
.ja-bind-tip {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	padding: 10px 13px;
	background: #fffaf0;
	border-left: 3px solid var(--ja-gold);
	border-radius: 3px;
	font-size: 13px;
	line-height: 1.6;
	color: #8a6d3b;
}
