/* =========================================================================
 * Login / Register — woocommerce/myaccount/form-login.php
 * Trang My Account: 2 cột (giới thiệu | form). Popup header: chỉ cột form.
 * ========================================================================= */

.smt-auth {
	--auth-primary: var(--smt-primary, #1e73be);
	--auth-primary-dark: #185d9b;
	--auth-accent: #26b4e9;
	--auth-navy: #0f1f33;
	--auth-text: #0f172a;
	--auth-muted: #64748b;
	--auth-border: #dbe3ee;
	--auth-field: #f8fafc;
	--auth-radius: 14px;
	--auth-ring: 0 0 0 4px rgba(38, 180, 233, 0.18);

	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
	max-width: 1040px;
	margin: 8px auto 48px;
	overflow: hidden;
	border: 1px solid #e6ecf3;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 60px -24px rgba(15, 31, 51, 0.28);
	color: var(--auth-text);
	font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Cột giới thiệu ---------- */
.smt-auth__aside {
	position: relative;
	display: flex;
	padding: 48px 44px;
	overflow: hidden;
	background:
		radial-gradient(120% 70% at 100% 0%, rgba(38, 180, 233, 0.35) 0%, rgba(38, 180, 233, 0) 60%),
		radial-gradient(90% 60% at 0% 100%, rgba(30, 115, 190, 0.55) 0%, rgba(30, 115, 190, 0) 70%),
		linear-gradient(160deg, #0f1f33 0%, #13325a 55%, #174a86 100%);
	color: #e2ecf8;
}

.smt-auth__aside::after {
	/* lưới mảnh gợi bảng mạch, rất nhạt */
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
	pointer-events: none;
}

.smt-auth__aside-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.smt-auth__eyebrow {
	margin: 0 0 14px;
	color: var(--auth-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}

.smt-auth__aside-title {
	margin: 0 0 28px;
	color: #fff;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.3;
}

.smt-auth__benefits {
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.smt-auth__benefits li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin: 0;
	font-size: 14.5px;
	line-height: 1.5;
}

.smt-auth__benefits svg {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 9px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	fill: none;
	stroke: #7dd3fc;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.smt-auth__benefits strong {
	display: block;
	color: #fff;
	font-weight: 600;
}

.smt-auth__help {
	margin: auto 0 0;
	padding-top: 32px;
	color: #b6c6dc;
	font-size: 14px;
}

.smt-auth__help a {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.smt-auth__help a:hover {
	color: var(--auth-accent);
}

/* ---------- Cột form ---------- */
.smt-auth__main {
	padding: 40px 48px 36px;
}

.smt-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin: 0 0 28px;
	padding: 4px;
	border-radius: 12px;
	background: #eef2f7;
}

.smt-auth__tab {
	margin: 0;
	min-height: 42px;
	padding: 8px 12px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--auth-muted);
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.smt-auth__tab:hover {
	color: var(--auth-text);
}

.smt-auth__tab.is-active {
	background: #fff;
	color: var(--auth-text);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.smt-auth__tab:focus-visible {
	outline: none;
	box-shadow: var(--auth-ring);
}

.smt-auth__panel[hidden] {
	display: none !important;
}

.smt-auth__head {
	margin: 0 0 22px;
}

.smt-auth__title {
	margin: 0 0 6px;
	color: var(--auth-text);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}

.smt-auth__subtitle {
	margin: 0;
	color: var(--auth-muted);
	font-size: 14.5px;
}

/* Trường nhập */
.smt-auth__form {
	margin: 0;
}

.smt-auth .form-row {
	margin: 0 0 16px;
	padding: 0;
}

.smt-auth label {
	display: block;
	margin: 0 0 6px;
	color: #334155;
	font-size: 13.5px;
	font-weight: 600;
}

.smt-auth label .required {
	color: #e11d48;
	font-weight: 600;
}

.smt-auth input.input-text {
	height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--auth-border);
	border-radius: 10px;
	background: var(--auth-field);
	box-shadow: none;
	color: var(--auth-text);
	font-size: 15px;
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.smt-auth input.input-text::placeholder {
	color: #94a3b8;
}

.smt-auth input.input-text:hover {
	border-color: #c4d0de;
}

.smt-auth input.input-text:focus {
	border-color: var(--auth-accent);
	background: #fff;
	box-shadow: var(--auth-ring);
	outline: none;
}

/* Nút hiện/ẩn mật khẩu của WooCommerce (theme không nạp icon font của Woo => tự vẽ con mắt) */
.smt-auth .password-input {
	position: relative;
	display: block;
}

.smt-auth .password-input input.input-text {
	padding-right: 46px;
}

.smt-auth .show-password-input {
	position: absolute;
	top: 50%;
	right: 6px;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: #94a3b8;
	font-size: 0;
	line-height: 0;
	visibility: visible; /* Flatsome chỉ hiện khi hover/focus — luôn hiện cho dễ thấy */
	transform: translateY(-50%);
	cursor: pointer;
}

.smt-auth .show-password-input::after {
	content: none; /* icon font mặc định của Woo */
}

.smt-auth .show-password-input::before {
	content: "";
	position: absolute;
	inset: 8px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.smt-auth .show-password-input.display-password::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18M10.6 5.1A10.4 10.4 0 0 1 12 5c6.4 0 10 7 10 7a17.6 17.6 0 0 1-3.2 4.2M6.6 6.6C3.8 8.4 2 12 2 12s3.6 7 10 7a9.9 9.9 0 0 0 5.4-1.6M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18M10.6 5.1A10.4 10.4 0 0 1 12 5c6.4 0 10 7 10 7a17.6 17.6 0 0 1-3.2 4.2M6.6 6.6C3.8 8.4 2 12 2 12s3.6 7 10 7a9.9 9.9 0 0 0 5.4-1.6M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E");
}

.smt-auth .show-password-input:hover,
.smt-auth .show-password-input.display-password {
	color: var(--auth-primary);
}

.smt-auth .show-password-input:focus-visible {
	outline: none;
	box-shadow: var(--auth-ring);
}

.smt-auth .woocommerce-password-strength {
	margin-top: 6px;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 12.5px;
}

.smt-auth .woocommerce-password-hint {
	display: block;
	margin-top: 4px;
	color: var(--auth-muted);
	font-size: 12px;
}

/* Ghi nhớ + Quên mật khẩu */
.smt-auth__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 2px 0 20px;
}

.smt-auth__row label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: #475569;
	font-weight: 500;
	cursor: pointer;
}

.smt-auth input[type="checkbox"] {
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var(--auth-primary);
}

.smt-auth__link {
	display: inline;
	margin: 0;
	padding: 0;
	min-height: 0;
	border: 0;
	background: none;
	color: var(--auth-primary);
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: inherit;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
}

.smt-auth__link:hover {
	color: var(--auth-primary-dark);
	text-decoration: underline;
}

/* Nút chính */
.smt-auth .smt-auth__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--auth-primary) 0%, #2591d6 100%);
	color: #fff;
	font-size: 15.5px;
	font-weight: 700;
	letter-spacing: 0.2px;
	text-transform: none;
	box-shadow: 0 8px 18px -8px rgba(30, 115, 190, 0.7);
	transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.smt-auth .smt-auth__submit:hover {
	filter: brightness(1.05);
	box-shadow: 0 10px 22px -8px rgba(30, 115, 190, 0.8);
	color: #fff;
}

.smt-auth .smt-auth__submit:active {
	transform: translateY(1px);
}

.smt-auth .smt-auth__submit:focus-visible {
	outline: none;
	box-shadow: var(--auth-ring);
}

.smt-auth__switch {
	margin: 22px 0 0;
	color: var(--auth-muted);
	font-size: 14px;
	text-align: center;
}

.smt-auth__note {
	color: var(--auth-muted);
	font-size: 13.5px;
}

/* Form đăng ký: lưới 2 cột cho các cặp trường */
.smt-auth__form--grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 14px;
}

.smt-auth__form--grid > * {
	grid-column: 1 / -1;
}

.smt-auth__form--grid > .form-row-first {
	grid-column: 1;
}

.smt-auth__form--grid > .form-row-last {
	grid-column: 2;
}

.smt-auth .form-row-first,
.smt-auth .form-row-last {
	float: none;
	width: auto;
}

.smt-auth__form--grid > .clear {
	display: none;
}

.smt-auth__actions {
	margin-top: 4px !important;
}

/* Khối xác nhận chính sách dữ liệu cá nhân */
.smt-auth .smt-policy-confirmation {
	margin: 4px 0 18px;
	padding: 14px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #f8fafc;
}

.smt-auth .smt-policy-confirmation legend {
	float: left;
	width: 100%;
	margin: 0 0 6px;
	padding: 0;
	color: var(--auth-text);
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

.smt-auth .smt-policy-confirmation__intro {
	clear: both;
	margin: 0 0 10px;
	color: var(--auth-muted);
	font-size: 12.5px;
	line-height: 1.55;
}

.smt-auth .smt-policy-confirmation__item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 8px;
	color: #334155;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	cursor: pointer;
}

.smt-auth .smt-policy-confirmation__item:last-child {
	margin-bottom: 0;
}

.smt-auth .smt-policy-confirmation__item input {
	margin-top: 2px;
}

/* Câu "Your personal data will be used…" mặc định của WooCommerce: chữ nhỏ, nhạt */
.smt-auth .woocommerce-privacy-policy-text {
	margin: 0 0 16px;
}

.smt-auth .woocommerce-privacy-policy-text p {
	margin: 0;
	color: var(--auth-muted);
	font-size: 12.5px;
	line-height: 1.55;
}

.smt-auth .woocommerce-privacy-policy-text a {
	color: var(--auth-primary);
}

/* Nút hiện/ẩn mật khẩu (assets/js/account-auth.js) */
.smt-auth__pw {
	position: relative;
	display: block;
}

.smt-auth__pw input.input-text {
	padding-right: 46px;
}

.smt-auth__pw-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #94a3b8;
	box-shadow: none;
	transform: translateY(-50%);
	cursor: pointer;
}

.smt-auth__pw-toggle:hover,
.smt-auth__pw-toggle[aria-pressed="true"] {
	color: var(--auth-primary);
}

.smt-auth__pw-toggle:focus-visible {
	outline: none;
	box-shadow: var(--auth-ring);
}

.smt-auth__pw-toggle svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Thông báo lỗi AJAX đăng ký / đăng nhập */
.smt-auth .woocommerce-error,
.smt-auth .woocommerce-message {
	grid-column: 1 / -1;
	margin: 0 0 16px;
	border-radius: 10px;
	font-size: 14px;
}

/* ---------- Trang My Account (khách chưa đăng nhập) ---------- */
body.smt-auth-page #main,
body.smt-auth-page .page-wrapper {
	background:
		radial-gradient(60% 50% at 10% 0%, rgba(38, 180, 233, 0.08) 0%, rgba(38, 180, 233, 0) 70%),
		#f4f7fb;
}

body.smt-auth-page .page-wrapper {
	padding-top: 40px;
}

body.smt-auth-page .page-title {
	margin: 0;
	padding: 28px 15px;
	border-top: 4px solid #26b4e9;
	border-bottom: 1px solid #e5ebf0;
	background: #fff;
}

body.smt-auth-page .page-title h1,
body.smt-auth-page .page-title .page-title-inner {
	color: #0f1f33;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: 1px;
}

/* Thông báo (sai mật khẩu…) ngay trên khung form */
body.smt-auth-page .woocommerce-notices-wrapper {
	max-width: 1040px;
	margin: 0 auto;
}

body.smt-auth-page .woocommerce-notices-wrapper .woocommerce-error,
body.smt-auth-page .woocommerce-notices-wrapper .woocommerce-message,
body.smt-auth-page .woocommerce-notices-wrapper .woocommerce-info {
	margin: 0 0 16px;
	border-radius: 12px;
}

@media (max-width: 849px) {
	body.smt-auth-page .page-wrapper {
		padding: 24px 15px 0;
	}

	body.smt-auth-page .page-title {
		padding: 20px 15px;
	}

	body.smt-auth-page .page-title h1,
	body.smt-auth-page .page-title .page-title-inner {
		font-size: 26px;
	}
}

/* ---------- Popup đăng nhập ở header ---------- */
#login-form-popup {
	max-width: 480px !important;
	padding: 0 !important;
	background: transparent !important;
}

#login-form-popup .smt-auth {
	grid-template-columns: 1fr;
	margin: 0;
}

#login-form-popup .smt-auth__aside {
	display: none;
}

#login-form-popup .smt-auth__main {
	padding: 30px 28px 26px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.smt-auth {
		grid-template-columns: 1fr;
		max-width: 560px;
	}

	.smt-auth__aside {
		padding: 28px 28px 26px;
	}

	.smt-auth__aside-title {
		margin-bottom: 18px;
		font-size: 20px;
	}

	/* Trên mobile: gọn lại thành 2×2 lợi ích, bỏ dòng mô tả phụ */
	.smt-auth__benefits {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.smt-auth__benefits li {
		align-items: center;
		gap: 10px;
		font-size: 13px;
	}

	.smt-auth__benefits li span {
		font-size: 0;
	}

	.smt-auth__benefits strong {
		font-size: 13px;
	}

	.smt-auth__benefits svg {
		width: 32px;
		height: 32px;
		padding: 7px;
	}

	.smt-auth__help {
		padding-top: 18px;
	}
}

@media (max-width: 549px) {
	.smt-auth {
		margin: 0 0 32px;
		border-radius: 16px;
	}

	.smt-auth__main {
		padding: 26px 20px 24px;
	}

	.smt-auth__aside {
		padding: 22px 20px;
	}

	.smt-auth__aside-title {
		font-size: 18px;
	}

	.smt-auth__form--grid {
		grid-template-columns: 1fr;
	}

	.smt-auth__form--grid > .form-row-first,
	.smt-auth__form--grid > .form-row-last {
		grid-column: 1 / -1;
	}

	.smt-auth__title {
		font-size: 21px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.smt-auth * {
		transition: none !important;
	}
}
