/* Sishood LINE Auth — 前台樣式 */

:root {
	--sla-line: #06c755;
	--sla-line-dark: #05a948;
	--sla-radius: 22px;
}

/* ---------- 遮罩 ---------- */
.sla-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	background: radial-gradient(120% 120% at 50% 0%, rgba(18, 24, 38, .55) 0%, rgba(8, 11, 20, .78) 100%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	transition: opacity .32s ease, visibility .32s ease;
}

.sla-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

body.sla-modal-open {
	overflow: hidden;
}

/* ---------- 卡片 ---------- */
.sla-card {
	position: relative;
	width: 100%;
	max-width: 400px;
	padding: 44px 34px 34px;
	text-align: center;
	border-radius: var(--sla-radius);
	background: linear-gradient(160deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .10) 100%);
	border: 1px solid rgba(255, 255, 255, .28);
	-webkit-backdrop-filter: blur(28px) saturate(180%);
	backdrop-filter: blur(28px) saturate(180%);
	box-shadow:
		0 24px 60px rgba(0, 0, 0, .38),
		inset 0 1px 0 rgba(255, 255, 255, .45),
		inset 0 -1px 0 rgba(255, 255, 255, .10);
	transform: translateY(18px) scale(.97);
	opacity: 0;
	transition: transform .38s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
	overflow: hidden;
}

.sla-overlay.is-open .sla-card {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* 卡片內側光暈 */
.sla-card__glow {
	position: absolute;
	top: -120px;
	left: 50%;
	width: 320px;
	height: 320px;
	transform: translateX(-50%);
	background: radial-gradient(circle, rgba(6, 199, 85, .38) 0%, rgba(6, 199, 85, 0) 70%);
	filter: blur(10px);
	pointer-events: none;
}

.sla-card > *:not(.sla-card__glow) {
	position: relative;
	z-index: 1;
}

/* ---------- 關閉鈕 ---------- */
.sla-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	color: rgba(255, 255, 255, .85);
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 50%;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}

.sla-close:hover {
	background: rgba(255, 255, 255, .28);
	transform: rotate(90deg);
}

/* ---------- 品牌 ---------- */
.sla-brand {
	margin-bottom: 18px;
}

.sla-brand__logo {
	max-width: 132px;
	height: auto;
	margin: 0 auto;
	display: block;
}

.sla-brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	color: #fff;
	border-radius: 18px;
	background: linear-gradient(145deg, var(--sla-line) 0%, var(--sla-line-dark) 100%);
	box-shadow: 0 10px 24px rgba(6, 199, 85, .38), inset 0 1px 0 rgba(255, 255, 255, .4);
}

/* ---------- 文字 ---------- */
.sla-title {
	margin: 0 0 8px;
	font-size: 23px;
	line-height: 1.35;
	font-weight: 700;
	letter-spacing: .02em;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, .28);
}

.sla-subtitle {
	margin: 0 0 26px;
	font-size: 14px;
	line-height: 1.7;
	color: rgba(255, 255, 255, .82);
}

.sla-note {
	margin: 16px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: rgba(255, 255, 255, .62);
}

.sla-modal-notice {
	margin: 0 0 14px;
	padding: 9px 14px;
	font-size: 13px;
	line-height: 1.6;
	color: #fff;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .26);
	border-radius: 10px;
}

.sla-error {
	margin: 0;
	padding: 12px 14px;
	font-size: 13px;
	color: #fff;
	background: rgba(220, 53, 69, .34);
	border: 1px solid rgba(255, 255, 255, .24);
	border-radius: 12px;
}

/* ---------- LINE 按鈕 ---------- */
.sla-line-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 15px 20px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .03em;
	color: #fff !important;
	text-decoration: none !important;
	border: none;
	border-radius: 14px;
	background: linear-gradient(145deg, #0ad85f 0%, var(--sla-line) 45%, var(--sla-line-dark) 100%);
	box-shadow: 0 10px 26px rgba(6, 199, 85, .42), inset 0 1px 0 rgba(255, 255, 255, .35);
	cursor: pointer;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
}

.sla-line-btn::after {
	content: "";
	position: absolute;
	top: 0;
	left: -70%;
	width: 45%;
	height: 100%;
	background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .42) 50%, rgba(255, 255, 255, 0) 100%);
	transform: skewX(-18deg);
	transition: left .55s ease;
}

.sla-line-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.04);
	box-shadow: 0 16px 34px rgba(6, 199, 85, .5), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.sla-line-btn:hover::after {
	left: 125%;
}

.sla-line-btn:active {
	transform: translateY(0);
}

.sla-line-btn__icon {
	display: inline-flex;
	align-items: center;
}

/* ---------- 我的帳號:登入面板 ---------- */
.sla-account-login {
	max-width: 420px;
	margin: 40px auto;
	padding: 40px 30px 32px;
	text-align: center;
	border-radius: var(--sla-radius);
	background: linear-gradient(160deg, rgba(20, 28, 42, .92) 0%, rgba(12, 18, 30, .96) 100%);
	border: 1px solid rgba(255, 255, 255, .12);
	box-shadow: 0 20px 48px rgba(0, 0, 0, .22);
}

.sla-account-login .sla-title,
.sla-account-login .sla-subtitle,
.sla-account-login .sla-note {
	text-shadow: none;
}

/* ---------- 階段一:登入頁上方的 LINE 區塊 ---------- */
.sla-inline-panel {
	max-width: 420px;
	margin: 0 auto 30px;
}

.sla-inline-panel__lead {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.7;
	text-align: center;
	color: #52606d;
}

.sla-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 22px 0 0;
	font-size: 12px;
	letter-spacing: .04em;
	color: #8a94a0;
}

.sla-divider::before,
.sla-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(0, 0, 0, .12);
}

/* ---------- 注入第三方登入彈窗時的外框 ---------- */
.sla-injected {
	display: block;
	width: 100%;
	margin: 0 0 18px;
}

.sla-injected .sla-line-btn {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	text-align: center;
}

.sla-injected .sla-divider {
	margin: 16px 0 0;
}

/* ---------- 我的帳號:LINE 綁定區塊 ---------- */
.sla-bind-box {
	margin: 0 0 28px;
	padding: 20px 22px;
	border-radius: 16px;
	background: linear-gradient(150deg, rgba(6, 199, 85, .08) 0%, rgba(6, 199, 85, .02) 100%);
	border: 1px solid rgba(6, 199, 85, .28);
}

.sla-bind-box__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	font-size: 15px;
	font-weight: 700;
}

.sla-bind-box__head svg {
	color: var(--sla-line);
	flex: 0 0 auto;
}

.sla-bind-row {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.sla-bind-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(6, 199, 85, .5);
}

.sla-bind-info {
	flex: 1 1 160px;
	min-width: 0;
	font-size: 14px;
	line-height: 1.6;
}

.sla-bind-info strong {
	display: block;
}

.sla-bind-info small {
	color: #7b8794;
}

.sla-badge {
	display: inline-block;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	line-height: 1.6;
}

.sla-badge--on {
	color: #046c33;
	background: rgba(6, 199, 85, .18);
}

.sla-badge--off {
	color: #8a5a00;
	background: rgba(255, 176, 32, .2);
}

.sla-badge--must {
	color: #fff;
	background: #dc2626;
}

/* 必須綁定時,把區塊變成醒目的紅框 */
.sla-bind-box--required {
	background: linear-gradient(150deg, rgba(220, 38, 38, .07) 0%, rgba(220, 38, 38, .02) 100%);
	border-color: rgba(220, 38, 38, .4);
	animation: sla-pulse 2.4s ease-in-out 3;
}

@keyframes sla-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
	50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, .12); }
}

@media (prefers-reduced-motion: reduce) {
	.sla-bind-box--required { animation: none; }
}

.sla-btn-line-sm,
.sla-btn-unbind {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	border-radius: 10px;
	transition: filter .2s ease, transform .18s ease;
}

.sla-btn-line-sm {
	color: #fff !important;
	background: linear-gradient(145deg, #0ad85f 0%, var(--sla-line) 50%, var(--sla-line-dark) 100%);
	box-shadow: 0 6px 16px rgba(6, 199, 85, .32);
}

.sla-btn-line-sm:hover {
	transform: translateY(-1px);
	filter: brightness(1.05);
}

.sla-btn-unbind {
	color: #6b7280 !important;
	background: rgba(0, 0, 0, .05);
	border: 1px solid rgba(0, 0, 0, .1);
}

.sla-btn-unbind:hover {
	color: #b91c1c !important;
	border-color: rgba(185, 28, 28, .35);
}

/* ---------- 舊帳號合併面板 ---------- */
.sla-merge {
	margin: 0 0 24px;
	padding: 18px 20px;
	border-radius: 14px;
	background: linear-gradient(150deg, rgba(59, 130, 246, .08) 0%, rgba(59, 130, 246, .02) 100%);
	border: 1px solid rgba(59, 130, 246, .38);
}

.sla-merge__head {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 10px;
	font-size: 15px;
	color: #1d4ed8;
}

.sla-merge__head svg {
	flex: 0 0 auto;
}

.sla-merge__lead {
	margin: 0 0 14px;
	font-size: 13.5px;
	line-height: 1.75;
}

.sla-merge__row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: stretch;
}

.sla-merge__row input[type="password"] {
	flex: 1 1 200px;
	min-width: 0;
	padding: 11px 14px;
	font-size: 15px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 10px;
	background: #fff;
}

.sla-merge__btn {
	flex: 0 0 auto;
	padding: 11px 22px !important;
	font-size: 14px !important;
	font-weight: 700;
	color: #fff !important;
	background: #2563eb !important;
	border: none !important;
	border-radius: 10px !important;
	cursor: pointer;
}

.sla-merge__btn:hover:not(:disabled) {
	background: #1d4ed8 !important;
}

.sla-merge__btn:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.sla-merge__msg {
	margin: 12px 0 0;
	padding: 10px 13px;
	font-size: 13px;
	line-height: 1.65;
	border-radius: 9px;
	background: rgba(0, 0, 0, .04);
}

.sla-merge__msg.is-error {
	color: #9e2b27;
	background: rgba(220, 38, 38, .1);
	border: 1px solid rgba(220, 38, 38, .3);
}

.sla-merge__foot {
	margin: 12px 0 0;
	font-size: 12.5px;
	color: #6b7280;
}

/* ---------- 帳戶詳細資料提示 ---------- */
.sla-email-hint {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 20px;
	padding: 13px 16px;
	font-size: 13.5px;
	line-height: 1.7;
	border-radius: 12px;
	color: #9a3412;
	background: linear-gradient(150deg, rgba(249, 115, 22, .12) 0%, rgba(249, 115, 22, .04) 100%);
	border: 1px solid rgba(249, 115, 22, .4);
}

.sla-email-hint svg {
	flex: 0 0 auto;
	margin-top: 3px;
}

.sla-gate-notice {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 24px;
	padding: 16px 18px;
	font-size: 14px;
	line-height: 1.7;
	border-radius: 14px;
	color: #7a4b00;
	background: linear-gradient(150deg, rgba(255, 193, 7, .16) 0%, rgba(255, 193, 7, .06) 100%);
	border: 1px solid rgba(255, 193, 7, .45);
}

.sla-gate-notice svg {
	flex: 0 0 auto;
	margin-top: 2px;
}

.sla-flash {
	margin: 0 0 22px;
	padding: 14px 18px;
	font-size: 14px;
	border-radius: 12px;
}

.sla-flash--ok {
	color: #046c33;
	background: rgba(6, 199, 85, .12);
	border: 1px solid rgba(6, 199, 85, .4);
}

.sla-flash--warn {
	color: #9a3412;
	background: rgba(249, 115, 22, .12);
	border: 1px solid rgba(249, 115, 22, .4);
}

/* 隱藏密碼／信箱欄位(由 JS 加上 class) */
.sla-hide-field {
	display: none !important;
}

/* ---------- 手機 ---------- */
@media (max-width: 480px) {
	.sla-card {
		padding: 38px 22px 28px;
		border-radius: 20px;
	}

	.sla-title {
		font-size: 20px;
	}
}

/* ---------- 降級:不支援 backdrop-filter ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.sla-overlay {
		background: rgba(10, 14, 24, .92);
	}

	.sla-card {
		background: rgba(34, 42, 58, .96);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sla-overlay,
	.sla-card,
	.sla-line-btn,
	.sla-close {
		transition: none;
	}

	.sla-line-btn::after {
		display: none;
	}
}
