/* Tài khoản: nút header, modal #tri-auth, form, trang /tai-khoan/ (inc/account.php, assets/js/account.js). */

/* ── Nút tài khoản ───────────────────────────────────────────────────── */

.tri-acc {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 6px;
	border: 1.5px solid #dbe3f0;
	border-radius: 999px;
	background: #fff;
	color: var(--wp--preset--color--navy);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tri-acc:hover,
.tri-acc:focus-visible {
	border-color: var(--wp--preset--color--navy);
	box-shadow: 0 6px 16px rgba(9, 31, 91, 0.12);
}

.tri-acc__avatar {
	position: relative;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	overflow: hidden;
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--navy) 8%, #fff);
	color: var(--wp--preset--color--navy);
}

.tri-acc.is-in .tri-acc__avatar {
	background: linear-gradient(135deg, var(--wp--preset--color--orange), #ff9a52);
	color: #fff;
}

.tri-acc__ini {
	font-size: 13px;
	font-weight: 800;
}

.tri-acc__avatar img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tri-acc__name {
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tri-acc__menu {
	position: absolute;
	z-index: 60;
	min-width: 210px;
	margin-top: 8px;
	padding: 6px;
	border: 1px solid #e3e9f5;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(9, 31, 91, 0.18);
}

.tri-acc__menu[hidden] {
	display: none;
}

.tri-acc__menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--wp--preset--color--navy);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.tri-acc__menu a:hover {
	background: #f1f4fa;
}

.tri-acc__menu a.is-out {
	color: #b32d2e;
}

.tri-header__actions {
	position: relative;
}

.tri-header__actions .tri-acc__menu {
	top: 100%;
	right: 0;
}

.tri-acc--drawer {
	display: flex;
	margin: 4px 16px 12px;
	padding: 10px 14px 10px 10px;
	border-radius: 14px;
}

.tri-acc--drawer + .tri-acc__menu {
	position: static;
	margin: 0 16px 12px;
	box-shadow: none;
}

@media (max-width: 1024px) {
	.tri-acc--header .tri-acc__name {
		display: none;
	}

	.tri-acc--header {
		padding: 4px;
	}
}

/* ── Modal ───────────────────────────────────────────────────────────── */

.tri-auth-modal {
	position: fixed;
	inset: 0;
	width: min(440px, calc(100vw - 24px));
	height: fit-content;
	margin: auto;
	max-height: calc(100dvh - 24px);
	padding: 0;
	overflow: auto;
	border: 0;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(9, 31, 91, 0.35);
}

.tri-auth-modal::backdrop {
	background: rgba(9, 31, 91, 0.55);
	backdrop-filter: blur(3px);
}

.tri-auth-modal[open] {
	animation: tri-auth-in 0.22s ease;
}

.tri-auth-modal__box {
	position: relative;
	padding: 28px 26px 24px;
}

.tri-auth-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: #f1f4fa;
	color: var(--wp--preset--color--navy);
	font-size: 15px;
	cursor: pointer;
}

@keyframes tri-auth-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
}

/* ── Form ────────────────────────────────────────────────────────────── */

.tri-auth {
	color: var(--wp--preset--color--navy);
}

.tri-auth__title {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.25;
}

.tri-auth__sub {
	margin: 0 0 16px;
	color: #5b6886;
	font-size: 14px;
	line-height: 1.5;
}

.tri-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin-bottom: 16px;
	padding: 4px;
	border-radius: 12px;
	background: #f1f4fa;
}

.tri-auth__tab {
	padding: 9px;
	border: 0;
	border-radius: 9px;
	background: none;
	color: #5b6886;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.tri-auth__tab.is-active {
	background: #fff;
	color: var(--wp--preset--color--navy);
	box-shadow: 0 2px 8px rgba(9, 31, 91, 0.1);
}

.tri-auth[data-tab="forgot"] .tri-auth__tabs,
.tri-auth.is-done .tri-auth__form {
	display: none;
}

.tri-auth__form {
	display: none;
	gap: 12px;
}

.tri-auth__form.is-on {
	display: grid;
}

.tri-auth__f {
	display: grid;
	gap: 5px;
	font-size: 13px;
	font-weight: 700;
}

.tri-auth__f input,
.tri-accpage__form input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	border: 1.5px solid #dbe3f0;
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 15px;
	font-weight: 400;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tri-auth__f input:focus {
	border-color: var(--wp--preset--color--royal, #3b63a8);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(59, 99, 168, 0.15);
}

.tri-auth__f input.is-invalid,
.tri-auth__check input.is-invalid {
	border-color: #d63638;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.12);
}

.tri-auth__pw {
	position: relative;
	display: block;
}

.tri-auth__pw input {
	padding-right: 44px;
}

.tri-auth__eye {
	position: absolute;
	top: 50%;
	right: 6px;
	width: 34px;
	height: 34px;
	border: 0;
	background: none;
	cursor: pointer;
	opacity: 0.6;
	transform: translateY(-50%);
}

.tri-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.tri-auth__check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.45;
}

.tri-auth__check a {
	color: var(--wp--preset--color--royal, #3b63a8);
}

.tri-auth__link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--royal, #3b63a8);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.tri-auth__link[hidden] {
	display: none;
}

.tri-auth__submit {
	justify-content: center;
	width: 100%;
}

.tri-auth__submit.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.tri-auth__note {
	margin: 0;
	color: #5b6886;
	font-size: 13px;
	line-height: 1.5;
}

.tri-auth__msg {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #e9f7ef;
	color: #1a7f37;
	font-size: 14px;
	line-height: 1.45;
}

.tri-auth__msg.is-bad {
	background: #fdecec;
	color: #b32d2e;
}

.tri-auth__msg[hidden] {
	display: none;
}

.tri-auth__google {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 11px;
	border: 1.5px solid #dbe3f0;
	border-radius: 10px;
	background: #fff;
	color: #202124;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.tri-auth__google:hover {
	background: #f7f9fd;
}

.tri-auth__or {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: #8a95ad;
	font-size: 12px;
}

.tri-auth__or::before,
.tri-auth__or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e3e9f5;
}

.tri-auth__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ── Trang /tai-khoan/ ───────────────────────────────────────────────── */

.tri-accpage {
	padding: clamp(28px, 5vw, 64px) 0;
	background: linear-gradient(180deg, #eef3fb, #fff 320px);
}

.tri-accpage__wrap {
	max-width: 880px;
}

.tri-accpage__card {
	max-width: 460px;
	margin: 0 auto;
	padding: 28px 26px;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 20px 50px rgba(9, 31, 91, 0.12);
}

.tri-accpage__flash {
	max-width: 460px;
	margin: 0 auto 16px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #e9f7ef;
	color: #1a7f37;
	font-weight: 600;
}

.tri-accpage__flash.is-bad {
	background: #fdecec;
	color: #b32d2e;
}

.tri-accpage__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.tri-accpage__head h1 {
	margin: 0;
	font-size: 26px;
}

.tri-accpage__head p {
	margin: 2px 0 0;
	color: #5b6886;
}

.tri-accpage__avatar {
	position: relative;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	overflow: hidden;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--wp--preset--color--orange), #ff9a52);
	color: #fff;
	font-size: 30px;
	font-weight: 800;
}

.tri-accpage__avatar img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tri-accpage__out {
	margin-left: auto;
}

.tri-accpage__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
	border-bottom: 1px solid #e3e9f5;
}

.tri-accpage__tabs a {
	margin-bottom: -1px;
	padding: 10px 14px;
	border-bottom: 3px solid transparent;
	color: #5b6886;
	font-weight: 700;
	text-decoration: none;
}

.tri-accpage__tabs a.is-active {
	border-color: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--navy);
}

.tri-accpage__panel {
	padding: 22px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(9, 31, 91, 0.08);
}

.tri-accpage__form {
	display: grid;
	gap: 14px;
	max-width: 480px;
}

.tri-accpage__pw {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 14px;
	border: 1px solid #e3e9f5;
	border-radius: 12px;
}

.tri-accpage__pw legend {
	padding: 0 6px;
	font-weight: 700;
}

@media (max-width: 767px) {
	.tri-auth-modal__box,
	.tri-accpage__card {
		padding: 24px 18px 20px;
	}

	.tri-accpage__out {
		margin-left: 0;
	}
}

/* Google nổi bật + độ mạnh mật khẩu + mở hộp thư */
.tri-auth__google {
	min-height: 48px;
	box-shadow: 0 2px 6px rgba(9, 31, 91, 0.06);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.tri-auth__google:hover {
	border-color: #4285f4;
	box-shadow: 0 6px 16px rgba(66, 133, 244, 0.18);
}

.tri-auth__google.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.tri-auth__perk {
	margin: -4px 0 0;
	color: #1a7f37;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
}

.tri-auth__meter {
	display: block;
	height: 4px;
	margin-top: 6px;
	overflow: hidden;
	border-radius: 99px;
	background: #eef2f8;
}

.tri-auth__meter i {
	display: block;
	width: 0;
	height: 100%;
	background: #d63638;
	transition: width 0.2s ease, background-color 0.2s ease;
}

.tri-auth__f[data-strength="3"] .tri-auth__meter i {
	background: #dba617;
}

.tri-auth__f[data-strength="4"] .tri-auth__meter i,
.tri-auth__f[data-strength="5"] .tri-auth__meter i {
	background: #1a7f37;
}

.tri-auth__meter-txt {
	color: #6b7894;
	font-size: 12px;
	font-weight: 600;
}

.tri-auth__inbox {
	margin-top: 10px;
}
