:root {
	--wml-red: #990b20;
	--wml-red-dark: #730716;
	--wml-gold: #c99b49;
	--wml-ink: #251f20;
	--wml-muted: #756b6d;
	--wml-border: #ded8d4;
	--wml-paper: #fffdfa;
}

.wml-account-label {
	align-items: center;
	display: inline-flex;
	gap: 0.42em;
	justify-content: center;
	line-height: 1;
	vertical-align: middle;
}

.wml-account-icon {
	display: block;
	flex: 0 0 1.05em;
	height: 1.05em;
	width: 1.05em;
}

.wml-modal[hidden],
.wml-tab-panel[hidden] {
	display: none !important;
}

html.wml-modal-open {
	overflow: hidden;
}

.wml-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: fixed;
	z-index: 999999;
}

.wml-modal__backdrop {
	background: rgba(22, 25, 34, 0.76);
	inset: 0;
	position: absolute;
}

.wml-modal__dialog {
	background: var(--wml-paper);
	border-radius: 14px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
	max-height: calc(100vh - 48px);
	max-width: 590px;
	outline: none;
	overflow: auto;
	position: relative;
	width: 100%;
	z-index: 1;
}

.wml-modal__dialog::before {
	background: linear-gradient(90deg, var(--wml-red-dark), var(--wml-red), var(--wml-gold));
	content: "";
	height: 5px;
	inset: 0 0 auto;
	position: absolute;
}

.wml-modal__close {
	align-items: center;
	background: #fff;
	border: 1px solid var(--wml-border);
	border-radius: 50%;
	color: var(--wml-ink);
	cursor: pointer;
	display: flex;
	font-size: 28px;
	height: 42px;
	justify-content: center;
	line-height: 1;
	padding: 0 0 4px;
	position: absolute;
	right: 14px;
	top: 14px;
	width: 42px;
	z-index: 3;
}

.wml-modal__close:hover,
.wml-modal__close:focus-visible {
	border-color: var(--wml-red);
	color: var(--wml-red);
}

.wml-page-shell {
	margin: 38px auto 70px;
	max-width: 590px;
	padding: 0 18px;
}

body.woocommerce-account:not(.woocommerce-checkout) .wml-page-shell {
	margin-top: 0;
	padding-top: 400px;
}

.wml-page-shell .wml-auth {
	background: var(--wml-paper);
	border: 1px solid #eee8e2;
	border-radius: 14px;
	box-shadow: 0 16px 55px rgba(72, 40, 34, 0.1);
	overflow: hidden;
}

.wml-auth {
	color: var(--wml-ink);
	font-size: 16px;
}

.wml-auth__brand {
	padding: 34px 68px 22px;
	text-align: center;
}

.wml-auth__eyebrow {
	color: var(--wml-red);
	display: block;
	font-family: "Noto Serif TC", "Songti TC", serif;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0.12em;
	margin-bottom: 6px;
}

.wml-auth__brand p {
	color: var(--wml-muted);
	font-size: 14px;
	margin: 0;
}

.wml-tabs {
	border-bottom: 1px solid var(--wml-border);
	border-top: 1px solid var(--wml-border);
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.wml-tabs__tab {
	background: #eeeae6;
	border: 0;
	border-radius: 0;
	color: #716769;
	cursor: pointer;
	font-size: 17px;
	font-weight: 600;
	min-height: 62px;
	padding: 12px 18px;
}

.wml-tabs__tab + .wml-tabs__tab {
	border-left: 1px solid var(--wml-border);
}

.wml-tabs__tab[aria-selected="true"] {
	background: var(--wml-paper);
	color: var(--wml-red);
	position: relative;
}

.wml-tabs__tab[aria-selected="true"]::after {
	background: var(--wml-red);
	bottom: -1px;
	content: "";
	height: 3px;
	left: 22%;
	position: absolute;
	right: 22%;
}

.wml-tabs__tab:focus-visible {
	box-shadow: inset 0 0 0 3px rgba(153, 11, 32, 0.22);
	outline: none;
}

.wml-auth__body {
	padding: 28px 26px 30px;
}

.wml-form {
	border: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.wml-field {
	display: block;
	margin: 0 0 17px;
	position: relative;
}

.wml-field > span:first-child {
	color: #51484a;
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 7px;
}

.wml-field input {
	background: #fff !important;
	border: 1px solid var(--wml-border) !important;
	border-radius: 7px !important;
	box-shadow: none !important;
	color: var(--wml-ink) !important;
	font-size: 16px !important;
	height: 52px !important;
	margin: 0 !important;
	padding: 0 15px !important;
	width: 100% !important;
}

.wml-field input:focus {
	border-color: var(--wml-red) !important;
	box-shadow: 0 0 0 3px rgba(153, 11, 32, 0.1) !important;
	outline: none;
}

.wml-field--password input {
	padding-right: 54px !important;
}

.wml-password-toggle {
	background: transparent !important;
	border: 0 !important;
	color: #7c7375 !important;
	cursor: pointer;
	font-size: 19px !important;
	height: 42px;
	padding: 0 !important;
	position: absolute;
	right: 6px;
	top: 31px;
	width: 42px;
}

.wml-password-toggle.is-visible {
	color: var(--wml-red) !important;
}

.wml-form__meta {
	align-items: center;
	display: flex;
	font-size: 14px;
	justify-content: space-between;
	margin: 2px 0 20px;
}

.wml-form__meta a,
.wml-auth a:not(.wml-line__button):not(.wml-submit) {
	color: var(--wml-red);
}

.wml-checkbox {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 8px;
}

.wml-checkbox input {
	accent-color: var(--wml-red);
	height: 17px;
	margin: 0;
	width: 17px;
}

.wml-submit,
.wml-trigger-button {
	background: var(--wml-red) !important;
	border: 1px solid var(--wml-red) !important;
	border-radius: 7px !important;
	color: #fff !important;
	cursor: pointer;
	display: inline-flex;
	font-size: 18px !important;
	font-weight: 700 !important;
	justify-content: center;
	letter-spacing: 0.08em;
	line-height: 1.2 !important;
	padding: 15px 24px !important;
	text-decoration: none !important;
	transition: background 0.2s ease, border-color 0.2s ease;
	width: 100%;
}

.wml-submit:hover,
.wml-submit:focus-visible,
.wml-trigger-button:hover,
.wml-trigger-button:focus-visible {
	background: var(--wml-red-dark) !important;
	border-color: var(--wml-red-dark) !important;
}

.wml-form__hint,
.wml-privacy,
.wml-auth .woocommerce-privacy-policy-text {
	color: var(--wml-muted);
	font-size: 13px;
	line-height: 1.65;
}

.wml-privacy,
.wml-auth .woocommerce-privacy-policy-text {
	background: #fff;
	border-left: 3px solid var(--wml-gold);
	margin: 16px 0;
	padding: 16px 18px 16px 20px;
}

.wml-privacy p:last-child,
.wml-auth .woocommerce-privacy-policy-text p:last-child {
	margin-bottom: 0;
}

body.woocommerce-checkout form.woocommerce-form-login.login:not(.wml-form) {
	display: none !important;
}

.wml-checkout-line {
	background: #fff9f1;
	border-left: 3px solid var(--wml-gold);
	margin: 10px 0 22px;
	padding: 14px 16px;
}

.wml-checkout-line p {
	color: var(--wml-muted);
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 12px;
}

.wml-checkout-line__button {
	background: #06c755;
	border: 0;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	padding: 12px 18px;
	width: 100%;
}

.wml-checkout-line__button:hover,
.wml-checkout-line__button:focus-visible {
	background: #05b84e;
	color: #fff;
}

.wml-line {
	margin-top: 23px;
}

.wml-line__divider {
	align-items: center;
	color: #8c8284;
	display: flex;
	font-size: 13px;
	gap: 12px;
	margin-bottom: 16px;
	text-align: center;
}

.wml-line__divider::before,
.wml-line__divider::after {
	background: var(--wml-border);
	content: "";
	flex: 1;
	height: 1px;
}

.wml-line__button {
	align-items: center;
	background: #06c755;
	border-radius: 7px;
	color: #fff !important;
	display: flex;
	font-size: 17px;
	font-weight: 700;
	justify-content: center;
	min-height: 54px;
	overflow: hidden;
	padding: 5px 52px;
	position: relative;
	text-decoration: none !important;
}

.wml-line__button::before {
	background: rgba(0, 0, 0, 0.08);
	content: "";
	height: 100%;
	left: 51px;
	position: absolute;
	top: 0;
	width: 1px;
}

.wml-line__button img {
	height: 38px;
	left: 7px;
	object-fit: contain;
	position: absolute;
	top: 8px;
	width: 38px;
}

.wml-line__button:not(.is-disabled):hover,
.wml-line__button:not(.is-disabled):focus-visible {
	background: #05b84e;
	color: #fff !important;
}

.wml-line__button.is-disabled {
	background: #f7f7f7;
	border: 1px solid rgba(229, 229, 229, 0.6);
	color: rgba(30, 30, 30, 0.38) !important;
	cursor: not-allowed;
}

.wml-line__button.is-disabled img {
	filter: grayscale(1);
	opacity: 0.25;
}

.wml-auth .woocommerce-error,
.wml-auth .woocommerce-message {
	border-radius: 6px;
	font-size: 14px;
	margin: 0 0 20px !important;
	padding: 13px 14px 13px 42px !important;
}

.wml-account-line {
	background: #fff9f1;
	border-left: 4px solid var(--wml-gold);
	margin-top: 28px;
	padding: 18px 20px;
}

.wml-account-line h3 {
	margin: 0 0 8px;
}

.wml-account-line__status {
	color: #19733c;
	font-weight: 700;
}

@media (max-width: 921px) {
	body.woocommerce-account:not(.woocommerce-checkout) .wml-page-shell {
		padding-top: 120px;
	}
}

@media (max-width: 600px) {
	body.woocommerce-account:not(.woocommerce-checkout) .wml-page-shell {
		padding-top: 120px;
	}

	.wml-modal {
		align-items: flex-end;
		padding: 0;
	}

	.wml-modal__dialog {
		border-radius: 16px 16px 0 0;
		max-height: 92vh;
		max-width: none;
	}

	.wml-auth__brand {
		padding: 30px 54px 18px;
	}

	.wml-auth__eyebrow {
		font-size: 24px;
	}

	.wml-auth__body {
		padding: 23px 19px 27px;
	}

	.wml-tabs__tab {
		font-size: 16px;
		min-height: 57px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.wml-modal:not([hidden]) .wml-modal__backdrop {
		animation: wml-fade-in 0.18s ease-out;
	}

	.wml-modal:not([hidden]) .wml-modal__dialog {
		animation: wml-dialog-in 0.22s ease-out;
	}

	@keyframes wml-fade-in {
		from { opacity: 0; }
		to { opacity: 1; }
	}

	@keyframes wml-dialog-in {
		from { opacity: 0; transform: translateY(16px) scale(0.985); }
		to { opacity: 1; transform: translateY(0) scale(1); }
	}
}
