/**
 * Hafez account panel — front shell (assets/css/account.css).
 *
 * Own stylesheet for حساب کاربری only. Visual-identity tokens live in
 * hafez-typography.css; KYC styles live in kyc.css — keep them separate.
 */

@font-face {
	font-family: "IRANSans";
	src: url("../fonts/iransans-fa.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IRANSans";
	src: url("../fonts/iransans.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------------------------------------------------------------
 * Tokens + root
 * ---------------------------------------------------------------------- */

.hafez-account,
body.hafez-account-page .woocommerce {
	--hafez-font-sans: "IRANSans", Tahoma, Arial, sans-serif;
	--hafez-font-mono: var(--hafez-font-code, Consolas, "Courier New", ui-monospace, monospace);
	--hafez-color-danger-subtle: var(--hafez-color-danger-bg, #fee2e2);
	--hafez-color-success-subtle: var(--hafez-color-success-bg, #dcfce7);
	--hafez-color-switch-off: #d5cdc8;
	--hafez-radius-sm: var(--hafez-radius-inner, 4px);
	--hafez-radius-md: var(--hafez-radius-inner, 8px);
	--hafez-radius-lg: var(--hafez-radius-outer, 12px);
	--hafez-shadow-sm: 0 1px 2px rgba(60, 32, 16, 0.06);
	--hafez-shadow-md: 0 4px 16px rgba(60, 32, 16, 0.08);
	--hafez-sidebar-width: 280px;

	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: var(--hafez-space-lg, 24px);
	color: var(--hafez-color-text, #2c2624);
	font-family: var(--hafez-font-sans);
	font-size: var(--hafez-fs-body, 16px);
	line-height: var(--hafez-lh-body, 1.6);
	background: var(--hafez-color-background, #f7f4f2);
}

/* Theme-framework account: no outer .woocommerce padding (theme chrome owns spacing). */
body.hafez-account-page:not(.hafez-account-page--canvas) .woocommerce {
	padding: 0;
}

.hafez-account .dashicons,
.hafez-account .dashicons-before::before,
body.hafez-account-page .woocommerce .dashicons,
body.hafez-account-page .woocommerce .dashicons-before::before {
	font-family: dashicons !important;
}

body.hafez-account-page--canvas,
body.hafez-account-canvas {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--hafez-color-background, #f7f4f2);
}

body.hafez-account-canvas .hafez-account-canvas__main {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	padding: 0;
	background: var(--hafez-color-background, #f7f4f2);
}

body.hafez-account-page.hafez-account-page--canvas .woocommerce,
body.hafez-account-page.hafez-account-page--canvas .hafez-account,
body.hafez-account-page.hafez-account-page--canvas .hafez-account__layout {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--hafez-color-background, #f7f4f2);
}

body.admin-bar.hafez-account-page.hafez-account-page--canvas .woocommerce,
body.admin-bar.hafez-account-page.hafez-account-page--canvas .hafez-account,
body.admin-bar.hafez-account-page.hafez-account-page--canvas .hafez-account__layout {
	min-height: calc(100vh - 32px);
	min-height: calc(100dvh - 32px);
}

body.hafez-account-page.hafez-account-page--canvas .woocommerce,
body.hafez-account-page.hafez-account-page--canvas .hafez-account__layout {
	grid-template-columns: var(--hafez-sidebar-width) minmax(0, 1fr);
	grid-template-rows: auto minmax(0, 1fr);
	align-items: stretch;
	align-content: stretch;
	gap: var(--hafez-space-md);
	padding: var(--hafez-space-md);
}

body.hafez-account-page.hafez-account-page--canvas .hafez-account {
	display: flex;
	flex-direction: column;
}

body.hafez-account-page.hafez-account-page--canvas .hafez-account__layout {
	flex: 1 1 auto;
}

body.hafez-account-page.hafez-account-page--canvas .hafez-account__sidebar,
body.hafez-account-page.hafez-account-page--canvas .hafez-account__sidebar--rail {
	align-self: start;
	height: auto;
	max-height: none;
	position: sticky;
	top: var(--hafez-account-sidebar-sticky-top, 28px);
}

@media screen and (max-width: 782px) {
	body.admin-bar.hafez-account-page.hafez-account-page--canvas .woocommerce,
	body.admin-bar.hafez-account-page.hafez-account-page--canvas .hafez-account,
	body.admin-bar.hafez-account-page.hafez-account-page--canvas .hafez-account__layout {
		min-height: calc(100vh - 46px);
		min-height: calc(100dvh - 46px);
	}
}

/* WooCommerce / theme float resets */
body.hafez-account-page .woocommerce::before,
body.hafez-account-page .woocommerce::after {
	display: none !important;
	content: none !important;
}

body.hafez-account-page .woocommerce .hafez-account__sidebar,
body.hafez-account-page .woocommerce .woocommerce-MyAccount-content,
body.hafez-account-page .woocommerce .woocommerce-MyAccount-navigation {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
}

/* -------------------------------------------------------------------------
 * Layout (sidebar + main)
 * ---------------------------------------------------------------------- */

.hafez-account__layout,
body.hafez-account-page .woocommerce {
	display: grid;
	grid-template-columns: var(--hafez-sidebar-width) minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
	gap: var(--hafez-space-xl);
	align-items: stretch;
	align-content: stretch;
	min-height: 100vh;
	min-height: 100dvh;
}

body.admin-bar.hafez-account-page .woocommerce,
body.admin-bar.hafez-account-page .hafez-account,
body.admin-bar.hafez-account-page .hafez-account__layout {
	min-height: calc(100vh - 32px);
	min-height: calc(100dvh - 32px);
}

body.admin-bar .hafez-account__sidebar,
body.admin-bar.hafez-account-page .hafez-account__sidebar,
body.admin-bar.hafez-account-page.hafez-account-page--canvas .hafez-account__sidebar,
body.admin-bar.hafez-account-page.hafez-account-page--canvas .hafez-account__sidebar--rail {
	--hafez-account-sidebar-sticky-top: calc(32px + 28px);
	top: var(--hafez-account-sidebar-sticky-top);
}

body.hafez-account-page {
	background: var(--hafez-color-background, #f7f4f2);
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
}

body.hafez-account-page .hafez-account__sidebar {
	align-self: start;
	height: auto;
	max-height: none;
}

.hafez-account__main,
body.hafez-account-page .woocommerce-MyAccount-content {
	align-self: start;
	height: auto;
	min-width: 0;
}

.hafez-account__main--guest {
	grid-column: 1 / -1;
	max-width: 480px;
	margin-inline: auto;
}

/* -------------------------------------------------------------------------
 * Fullscreen top bar
 * ---------------------------------------------------------------------- */

.hafez-account__topbar {
	display: none;
}

body.hafez-account-page--canvas .hafez-account__topbar {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: var(--hafez-space-sm);
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	min-height: 64px;
	padding: var(--hafez-account-card-padding, var(--hafez-space-sm) var(--hafez-space-md));
	background: var(--hafez-color-surface);
	border-width: var(--hafez-account-card-border-width, 1px);
	border-style: var(--hafez-account-card-border-style, solid);
	border-color: var(--hafez-color-border);
	border-radius: var(--hafez-account-card-radius, var(--hafez-radius-md));
	box-shadow: var(--hafez-account-card-shadow, var(--hafez-shadow-sm));
}

.hafez-account__topbar-start,
.hafez-account__topbar-end {
	display: flex;
	flex-wrap: wrap;
	gap: var(--hafez-space-sm);
	align-items: center;
	min-width: 0;
}

.hafez-account__topbar-end {
	margin-inline-start: auto;
}

.hafez-account__logo--topbar {
	flex: 0 0 auto;
	width: min(var(--hafez-account-logo-width, 168px), 132px) !important;
	max-width: min(var(--hafez-account-logo-width, 168px), 132px) !important;
}

.hafez-account__avatar {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	overflow: hidden;
	color: var(--hafez-color-text-muted, #64748b);
	background: var(--hafez-color-background, #f1f5f9);
	border: 1px solid var(--hafez-color-border, #e2e8f0);
	border-radius: 999px;
}

.hafez-account__avatar-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hafez-account__avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.hafez-account__welcome {
	margin: 0;
	min-width: 0;
	color: var(--hafez-color-text);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hafez-account__date {
	color: var(--hafez-color-text-muted);
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
}

.hafez-account__logout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 6px 12px;
	color: var(--hafez-color-text-muted);
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	background: transparent;
	border: 1px solid var(--hafez-color-border);
	border-radius: var(--hafez-radius-sm);
	transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.hafez-account__logout:hover,
.hafez-account__logout:focus-visible {
	color: var(--hafez-color-danger, #b91c1c);
	border-color: var(--hafez-color-danger, #b91c1c);
	background: var(--hafez-color-danger-subtle, #fee2e2);
	outline: none;
}

/* -------------------------------------------------------------------------
 * Sidebar
 * ---------------------------------------------------------------------- */

.hafez-account__sidebar {
	--hafez-account-sidebar-sticky-top: 28px;
	position: sticky;
	top: var(--hafez-account-sidebar-sticky-top);
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: var(--hafez-space-sm);
	align-self: start;
	box-sizing: border-box;
	height: auto;
	max-height: none;
	padding: var(--hafez-account-card-padding, var(--hafez-space-sm));
	overflow: visible;
	background: var(--hafez-account-menu-bg, var(--hafez-color-surface));
	border-width: var(--hafez-account-card-border-width, 1px);
	border-style: var(--hafez-account-card-border-style, solid);
	border-color: var(--hafez-color-border);
	border-radius: var(--hafez-account-card-radius, var(--hafez-radius-md));
	box-shadow: var(--hafez-account-card-shadow, var(--hafez-shadow-sm));
}

.hafez-account__brand {
	display: flex;
	flex-shrink: 0;
	gap: var(--hafez-space-sm);
	align-items: center;
	justify-content: center;
	min-width: 0;
	max-width: 100%;
	padding: var(--hafez-space-sm) var(--hafez-space-xs);
	overflow: hidden;
}

.hafez-account__brand--user {
	align-items: flex-start;
	justify-content: flex-start;
	padding: 4px 2px 8px;
}

.hafez-account__user {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.hafez-account__user-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 10px 12px;
	align-items: center;
	width: 100%;
	min-width: 0;
}

.hafez-account__user-row .hafez-account__avatar {
	margin-inline-end: 2px;
}

.hafez-account__user-name {
	min-width: 0;
	color: var(--hafez-color-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hafez-account__user-row .hafez-account__logout {
	justify-self: left;
	min-height: 26px;
	margin: 0;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
}

.hafez-account__date--sidebar {
	display: block;
}

/* Theme shells often force WooCommerce/content images to intrinsic size —
   lock logo to brand_account_logo_* tokens in both canvas and theme layouts. */
body.hafez-account-page .hafez-account__logo,
body.hafez-account-page .woocommerce .hafez-account__logo,
.hafez-account__logo {
	display: block;
	flex: 0 1 auto;
	box-sizing: border-box;
	width: var(--hafez-account-logo-width, 168px) !important;
	max-width: 100% !important;
	height: auto !important;
	line-height: 0;
	border-radius: var(--hafez-radius-sm);
}

body.hafez-account-page .hafez-account__logo img,
body.hafez-account-page .woocommerce .hafez-account__logo img,
.hafez-account__logo img,
.hafez-account__logo .hafez-account__logo-img {
	display: block !important;
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	height: var(--hafez-account-logo-height, auto) !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: contain !important;
	object-position: center !important;
}

.hafez-account__logo:focus-visible {
	outline: 2px solid var(--hafez-color-primary);
	outline-offset: -2px;
}

/* Desktop: always hidden. Themes often force `button { display:… !important }`
   inside .woocommerce and would otherwise resurrect the mobile hamburger. */
.hafez-account__nav-toggle,
body.hafez-account-page .hafez-account__nav-toggle,
body.hafez-account-page .woocommerce .hafez-account__nav-toggle,
body.hafez-account-page .woocommerce button.hafez-account__nav-toggle {
	display: none !important;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--hafez-color-text);
	background: transparent;
	border: 1px solid var(--hafez-color-border);
	border-radius: var(--hafez-radius-sm);
	cursor: pointer;
}

.hafez-account__nav-toggle:hover,
.hafez-account__nav-toggle:focus-visible {
	color: var(--hafez-color-primary);
	border-color: var(--hafez-color-brand-200);
	background: var(--hafez-color-primary-subtle);
	outline: none;
}

.hafez-account__nav-toggle-bars,
.hafez-account__nav-toggle-bars::before,
.hafez-account__nav-toggle-bars::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.hafez-account__nav-toggle-bars {
	position: relative;
}

.hafez-account__nav-toggle-bars,
.hafez-account__nav-toggle-bars::before,
.hafez-account__nav-toggle-bars::after {
	transition: transform 160ms ease, background-color 160ms ease, top 160ms ease;
}

.hafez-account__nav-toggle-bars::before,
.hafez-account__nav-toggle-bars::after {
	position: absolute;
	inset-inline-start: 0;
	content: "";
}

.hafez-account__nav-toggle-bars::before {
	top: -6px;
}

.hafez-account__nav-toggle-bars::after {
	top: 6px;
}

.is-nav-open .hafez-account__nav-toggle-bars {
	background: transparent;
}

.is-nav-open .hafez-account__nav-toggle-bars::before {
	top: 0;
	transform: rotate(45deg);
}

.is-nav-open .hafez-account__nav-toggle-bars::after {
	top: 0;
	transform: rotate(-45deg);
}

.hafez-account__nav-backdrop {
	display: none;
}

.hafez-account__sidebar-drawer {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: var(--hafez-space-sm);
	min-height: 0;
}

body.hafez-account-page--canvas .hafez-account__sidebar--rail {
	gap: 0;
	padding: var(--hafez-space-sm);
	overflow: visible;
}

body.hafez-account-page--canvas .hafez-account__sidebar--rail .hafez-account__sidebar-drawer,
body.hafez-account-page--canvas .hafez-account__sidebar--rail .hafez-account__menu {
	flex: 0 0 auto;
	height: auto;
	min-height: 0;
	overflow: visible;
}

.hafez-account__menu {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 2px;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 3px;
	overflow: visible;
	list-style: none;
}

.hafez-account__link {
	display: flex;
	gap: var(--hafez-space-sm);
	align-items: center;
	padding: 9px var(--hafez-space-sm);
	color: var(--hafez-account-menu-text, var(--hafez-color-text));
	font-family: var(--hafez-font-sans);
	font-size: var(--hafez-fs-small, 14px);
	font-weight: 500;
	line-height: var(--hafez-lh-body, 1.4);
	text-decoration: none;
	border-radius: var(--hafez-radius-sm);
	transition: background-color 160ms ease-in-out, color 160ms ease-in-out;
}

.hafez-account__link:hover {
	color: var(--hafez-account-menu-active-text, var(--hafez-account-menu-text, var(--hafez-color-text)));
	background: var(--hafez-account-menu-active-bg, var(--hafez-color-background));
}

.hafez-account__link:focus-visible {
	outline: 2px solid var(--hafez-color-primary);
	outline-offset: -2px;
}

.hafez-account__item.is-current .hafez-account__link,
.hafez-account__link.is-active,
.hafez-account__link.is-active:hover {
	color: var(--hafez-account-menu-active-text, var(--hafez-account-menu-text, var(--hafez-color-text)));
	background: var(--hafez-account-menu-active-bg, var(--hafez-color-primary-subtle));
}

.hafez-account__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	overflow: hidden;
	line-height: 1;
}

.hafez-account__icon .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 1;
	color: var(--hafez-account-menu-text, var(--hafez-color-text-muted));
	transition: color 160ms ease-in-out;
}

.hafez-account__link:hover .hafez-account__icon .dashicons,
.hafez-account__item.is-current .hafez-account__icon .dashicons,
.hafez-account__link.is-active .hafez-account__icon .dashicons {
	color: var(--hafez-account-menu-active-text, var(--hafez-account-menu-text, var(--hafez-color-primary)));
}

.hafez-account__icon img {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.hafez-account__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * Main card + Woo content
 * ---------------------------------------------------------------------- */

.hafez-account__card,
body.hafez-account-page .woocommerce-MyAccount-content {
	box-sizing: border-box;
	padding: var(--hafez-account-card-padding, var(--hafez-space-lg));
	background: var(--hafez-color-surface);
	border-width: var(--hafez-account-card-border-width, 1px);
	border-style: var(--hafez-account-card-border-style, solid);
	border-color: var(--hafez-color-border);
	border-radius: var(--hafez-account-card-radius, var(--hafez-radius-md));
	box-shadow: var(--hafez-account-card-shadow, var(--hafez-shadow-sm));
}

.hafez-account__page-title,
body.hafez-account-page .woocommerce-MyAccount-content > .hafez-account__page-title {
	margin: 0 0 var(--hafez-space-md);
	padding-bottom: var(--hafez-space-sm);
	color: var(--hafez-color-text);
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: var(--hafez-fs-heading-sm, 1.25rem);
	font-weight: 600;
	line-height: var(--hafez-lh-heading, 1.4);
	border-bottom: 0;
}

.hafez-account__card-title,
body.hafez-account-page .woocommerce-MyAccount-content h1,
body.hafez-account-page .woocommerce-MyAccount-content h2,
body.hafez-account-page .woocommerce-MyAccount-content h3,
body.hafez-account-page .woocommerce-MyAccount-content h4,
body.hafez-account-page .woocommerce-MyAccount-content h5,
body.hafez-account-page .woocommerce-MyAccount-content h6,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-details__title,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-column__title,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address-title,
body.hafez-account-page .woocommerce-MyAccount-content legend:not(.hafez-user-fields__radio-legend) {
	margin: 0 0 var(--hafez-space-xs);
	padding: 0 0 15px;
	color: var(--hafez-color-text);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-card-title, 15px);
	font-weight: 600;
	line-height: var(--hafez-lh-heading, 1.4);
	letter-spacing: normal;
	text-transform: none;
}

body.hafez-account-page .woocommerce-MyAccount-content > .hafez-account__page-title {
	font-size: var(--hafez-fs-heading-sm, 1.25rem);
}

.hafez-account__card-desc,
body.hafez-account-page .woocommerce-MyAccount-content > p,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-details p,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-customer-details p,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address address,
.hafez-account__dashboard p {
	max-width: 68ch;
	margin: 0 0 var(--hafez-space-md);
	color: var(--hafez-color-text-muted);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-body, 14px);
	line-height: var(--hafez-lh-body, 1.6);
	font-style: normal;
}

.hafez-account__missing {
	margin: 0;
	color: var(--hafez-color-text-muted);
	font-size: 14px;
}

.hafez-account__custom,
.hafez-account__dashboard {
	min-width: 0;
}

/* ----------------------------------------------------------------------
 * Jet Messenger — match account-panel typography inside حساب کاربری
 * ---------------------------------------------------------------------- */

.hafez-account .jet-messenger-app,
.hafez-account .jet-messenger-notice,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-app,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-notice {
	color: var(--hafez-color-text, #2c2624);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-body, 14px);
	font-weight: 400;
	line-height: var(--hafez-lh-body, 1.6);
}

.hafez-account .jet-messenger-app h1,
.hafez-account .jet-messenger-app h2,
.hafez-account .jet-messenger-app h3,
.hafez-account .jet-messenger-app h4,
.hafez-account .jet-messenger-app h5,
.hafez-account .jet-messenger-app h6,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-app h1,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-app h2,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-app h3,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-app h4,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-app h5,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-app h6 {
	margin: 0;
	padding: 0;
	color: var(--hafez-color-text, #2c2624);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-card-title, 15px);
	font-weight: 600;
	line-height: var(--hafez-lh-heading, 1.4);
	letter-spacing: normal;
	text-transform: none;
}

.hafez-account .jet-messenger__header,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__header {
	gap: 10px;
	margin-bottom: var(--hafez-space-sm, 12px);
	font-weight: 600;
}

.hafez-account .jet-messenger__header-title,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__header-title {
	margin: 0;
	color: var(--hafez-color-text, #2c2624);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-heading-sm, 1.125rem);
	font-weight: 600;
	line-height: var(--hafez-lh-heading, 1.4);
}

.hafez-account .jet-messenger__header-secondary,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__header-secondary {
	color: var(--hafez-color-text-muted, #6b635e);
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 400;
	line-height: var(--hafez-lh-body, 1.6);
	opacity: 1;
}

.hafez-account .jet-messenger__header-avatar,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__header-avatar {
	--jm-chat-header-avatar-size: 40px;
	width: var(--jm-chat-header-avatar-size);
	height: var(--jm-chat-header-avatar-size);
	flex: 0 0 var(--jm-chat-header-avatar-size);
}

.hafez-account .jet-messenger__chat-title,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__chat-title {
	color: var(--hafez-color-text, #2c2624);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-body, 14px);
	font-weight: 600;
	line-height: var(--hafez-lh-heading, 1.4);
}

.hafez-account .jet-messenger__chat-item--unread .jet-messenger__chat-title,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__chat-item--unread .jet-messenger__chat-title {
	font-weight: 700;
}

.hafez-account .jet-messenger__chat-meta,
.hafez-account .jet-messenger__chat-time,
.hafez-account .jet-messenger__chat-label,
.hafez-account .jet-messenger__message-author,
.hafez-account .jet-messenger__status,
.hafez-account .jet-messenger__status--inline,
.hafez-account .jet-messenger__notice,
.hafez-account .jet-messenger__error,
.hafez-account .jet-messenger__error--inline,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__chat-meta,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__chat-time,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__chat-label,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__message-author,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__status,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__status--inline,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__notice,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__error,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__error--inline {
	color: var(--hafez-color-text-muted, #6b635e);
	font-size: var(--hafez-fs-small, 12px);
	font-weight: 400;
	line-height: var(--hafez-lh-body, 1.6);
	opacity: 1;
}

.hafez-account .jet-messenger__message-body,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__message-body {
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-body, 14px);
	font-weight: 400;
	line-height: var(--hafez-lh-body, 1.6);
}

.hafez-account .jet-messenger__empty,
.hafez-account .jet-messenger__empty-state,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__empty,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__empty-state {
	color: var(--hafez-color-text-muted, #6b635e);
	font-size: var(--hafez-fs-body, 14px);
	line-height: var(--hafez-lh-body, 1.6);
}

/* JM boots with isInitialChatsLoading=false → false empty flash before API. */
body.hafez-account-page .jet-messenger-app:not(.hafez-jm-ready) .jet-messenger__empty,
body.hafez-account-page .jet-messenger-app:not(.hafez-jm-ready) .jet-messenger__empty-state,
.hafez-account .jet-messenger-app:not(.hafez-jm-ready) .jet-messenger__empty,
.hafez-account .jet-messenger-app:not(.hafez-jm-ready) .jet-messenger__empty-state {
	display: none !important;
}

/* Extra JM Woo-endpoint mount when Hafez already embeds the chat page. */
body.hafez-account-page .jet-messenger-app[data-hafez-jm-duplicate="1"],
.hafez-account .jet-messenger-app[data-hafez-jm-duplicate="1"] {
	display: none !important;
}

.hafez-account .jet-messenger__input,
.hafez-account .jet-messenger__composer textarea,
.hafez-account .jet-messenger__composer input[type="text"],
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__input,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__composer textarea,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__composer input[type="text"] {
	color: var(--hafez-color-text, #2c2624);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
}

.hafez-account .jet-messenger__send-button,
.hafez-account .jet-messenger__attach-button,
.hafez-account .jet-messenger__back-button,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__send-button,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__attach-button,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger__back-button {
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 600;
	line-height: 1.4;
}

.hafez-account .jet-messenger-notice,
body.hafez-account-page .woocommerce-MyAccount-content .jet-messenger-notice {
	font-size: var(--hafez-fs-body, 14px);
	line-height: var(--hafez-lh-body, 1.6);
}

.hafez-account__dashboard-intro {
	margin: 0 0 var(--hafez-space-md);
	color: var(--hafez-color-text);
	font-size: 14px;
	line-height: 1.7;
}

.hafez-account__dashboard-intro > :first-child {
	margin-top: 0;
}

.hafez-account__dashboard-intro > :last-child {
	margin-bottom: 0;
}

.hafez-account__dash-widgets {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--hafez-space-md, 16px);
	margin: 0 0 var(--hafez-space-md, 16px);
	justify-items: stretch;
}

.hafez-account__dash-widgets--solo {
	margin-top: 0;
}

.hafez-account__dash-widget {
	display: flex;
	flex-direction: column;
	grid-column: span 1;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	min-width: 0;
	min-height: 0;
	padding: var(--hafez-space-md, 16px);
	overflow: hidden;
	color: var(--hafez-widget-text, var(--hafez-color-text, #2c2624));
	background: var(--hafez-widget-bg, var(--hafez-color-surface, #fff));
	border: 1px solid var(--hafez-widget-border, var(--hafez-color-border, #e2e8f0));
	border-radius: var(--hafez-radius-md, 8px);
	box-shadow: var(--hafez-shadow-sm, 0 1px 2px rgba(60, 32, 16, 0.06));
}

.hafez-account__dash-widget-icon {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin: 0 0 10px;
	object-fit: contain;
	color: var(--hafez-widget-accent, var(--hafez-color-btn-action-bg, #ea580c));
	font-size: 28px;
	line-height: 1;
}

.hafez-account__dash-widget-icon.dashicons {
	width: 28px;
	height: 28px;
	font-size: 28px;
}

.hafez-account__dash-widget-title {
	flex: 0 0 auto;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.hafez-account__dash-widget-desc {
	flex: 0 0 auto;
	margin: 0 0 12px;
	color: var(--hafez-widget-muted, var(--hafez-color-text-muted, #64748b));
	font-size: 12px;
	font-weight: 500;
	line-height: 1.45;
}

.hafez-account__dash-widget-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	overflow: auto;
}

.hafez-account__dash-widget-empty {
	margin: 0;
	color: var(--hafez-color-text-muted, #64748b);
	font-size: 13px;
}

.hafez-welcome-coupon {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
	justify-content: flex-end;
	min-height: 0;
}

.hafez-welcome-coupon__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 2px 10px;
	color: var(--hafez-widget-accent-text, #fff);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	background: var(--hafez-widget-accent, var(--hafez-color-btn-action-bg, #ea580c));
	border-radius: 999px;
}

.hafez-welcome-coupon__code {
	display: block;
	max-width: 100%;
	overflow: hidden;
	color: var(--hafez-widget-text, var(--hafez-color-text, #2c2624));
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
	background: transparent;
}

.hafez-welcome-coupon__copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 4px 12px;
	color: var(--hafez-widget-accent-text, var(--hafez-color-btn-action-text, #fff));
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	background: var(--hafez-widget-accent, var(--hafez-color-btn-action-bg, #ea580c));
	border: 1px solid var(--hafez-widget-accent, var(--hafez-color-btn-action-bg, #ea580c));
	border-radius: 7px;
	box-shadow: none;
}

.hafez-welcome-coupon__copy:hover {
	background: color-mix(in srgb, var(--hafez-widget-accent, #ea580c) 82%, #000);
	border-color: color-mix(in srgb, var(--hafez-widget-accent, #ea580c) 82%, #000);
}

.hafez-welcome-coupon__copy.is-copied {
	color: var(--hafez-color-success, #166534);
	background: var(--hafez-color-success-subtle, #dcfce7);
	border-color: var(--hafez-color-success, #166534);
}

@media (max-width: 1100px) {
	.hafez-account__dash-widgets {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.hafez-account__dash-widgets {
		grid-template-columns: 1fr;
	}

	.hafez-account__dash-widget {
		aspect-ratio: auto;
		min-height: 180px;
	}
}

/* Notices — match account card surface / border / radius (override typography alert !important). */
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-message,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-info,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-error,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-message,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-info,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-error,
body.hafez-account-page .wc-block-components-notice-banner {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 var(--hafez-space-md);
	padding: 10px 12px;
	color: var(--hafez-color-text, #2c2624) !important;
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	background: var(--hafez-color-surface, #fffcfa) !important;
	background-color: var(--hafez-color-surface, #fffcfa) !important;
	border-width: var(--hafez-account-card-border-width, 1px) !important;
	border-style: var(--hafez-account-card-border-style, solid) !important;
	border-color: var(--hafez-color-border, #e6dfda) !important;
	border-radius: var(--hafez-account-card-radius, var(--hafez-radius-md, 8px)) !important;
	box-shadow: none !important;
}

body.hafez-account-page .woocommerce-message::before,
body.hafez-account-page .woocommerce-info::before,
body.hafez-account-page .woocommerce-error::before,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-message::before,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-info::before,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-error::before,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-message::before,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-info::before,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-error::before {
	display: none !important;
	content: none !important;
	speak: never;
}

/* Content + notice links */
body.hafez-account-page .woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button):not(.wc-forward):not(.page-numbers),
.hafez-account__main a:not(.button):not(.woocommerce-button):not(.wc-forward):not(.page-numbers),
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-message a:not(.button):not(.wc-forward),
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-info a:not(.button):not(.wc-forward),
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-error a:not(.button):not(.wc-forward),
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-message a:not(.button):not(.wc-forward),
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-info a:not(.button):not(.wc-forward),
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-error a:not(.button):not(.wc-forward) {
	color: var(--hafez-account-link, var(--hafez-color-primary, #f15a24));
	font-size: inherit;
	font-weight: 600;
	line-height: inherit;
	text-decoration: none;
}

body.hafez-account-page .woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button):not(.wc-forward):not(.page-numbers):hover,
.hafez-account__main a:not(.button):not(.woocommerce-button):not(.wc-forward):not(.page-numbers):hover,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-message a:not(.button):not(.wc-forward):hover,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-info a:not(.button):not(.wc-forward):hover,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-error a:not(.button):not(.wc-forward):hover,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-message a:not(.button):not(.wc-forward):hover,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-info a:not(.button):not(.wc-forward):hover,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-error a:not(.button):not(.wc-forward):hover {
	color: var(--hafez-account-link-hover, var(--hafez-color-primary-hover, #d4471a));
	text-decoration: underline;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-message .button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-info .button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-error .button,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-message .button,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-info .button,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-error .button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-message a.button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-info a.button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-error a.button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-message a.wc-forward,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-info a.wc-forward,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-error a.wc-forward,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-message a.wc-forward,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-info a.wc-forward,
body.hafez-account-page .woocommerce-notices-wrapper .woocommerce-error a.wc-forward {
	flex: 0 0 auto;
	margin-inline-start: auto;
	min-height: 32px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	border-radius: 7px;
	white-space: nowrap;
}

.first_purchase_discount_code {
	justify-content: space-between;
}

.first_purchase_discount_code__text {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
}

.first_purchase_discount_code__copy {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	margin-inline-start: auto;
	min-height: 32px;
	padding: 4px 12px;
	color: var(--hafez-color-primary, #f15a24);
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	background: var(--hafez-color-surface, #fff);
	border: 1px solid var(--hafez-color-primary, #f15a24);
	border-radius: 7px;
	box-shadow: none;
}

.first_purchase_discount_code__copy:hover,
.first_purchase_discount_code__copy:focus-visible {
	color: var(--hafez-color-on-primary, #fff);
	background: var(--hafez-color-primary, #f15a24);
	outline: none;
}

.first_purchase_discount_code__copy.is-copied {
	color: var(--hafez-color-success, #166534);
	border-color: var(--hafez-color-success, #166534);
	background: var(--hafez-color-success-subtle, #dcfce7);
}

/* Buttons (incl. Woo notice actions) */
body.hafez-account-page .woocommerce .button,
body.hafez-account-page .woocommerce button.button,
body.hafez-account-page .woocommerce a.button,
body.hafez-account-page .woocommerce a.wc-forward,
.hafez-account .button,
.hafez-account button[type="submit"] {
	display: inline-flex;
	gap: var(--hafez-space-sm);
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 36px;
	padding: 8px 14px;
	color: var(--hafez-account-button-text, var(--hafez-color-on-primary, #fff));
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	background: var(--hafez-account-button-bg, var(--hafez-color-primary));
	border: 1px solid var(--hafez-account-button-bg, var(--hafez-color-primary));
	border-radius: var(--hafez-radius-sm);
	box-shadow: none;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

body.hafez-account-page .woocommerce .button:hover,
body.hafez-account-page .woocommerce button.button:hover,
body.hafez-account-page .woocommerce a.button:hover,
body.hafez-account-page .woocommerce a.wc-forward:hover,
.hafez-account .button:hover,
.hafez-account button[type="submit"]:hover {
	color: var(--hafez-account-button-hover-text, var(--hafez-account-button-text, var(--hafez-color-on-primary, #fff)));
	background: var(--hafez-account-button-hover-bg, var(--hafez-color-primary-hover));
	border-color: var(--hafez-account-button-hover-bg, var(--hafez-color-primary-hover));
	text-decoration: none;
}

body.hafez-account-page .woocommerce .button.wc-forward {
	order: 2;
	margin: 0;
}

/* Forms */
body.hafez-account-page .woocommerce-MyAccount-content input[type="text"],
body.hafez-account-page .woocommerce-MyAccount-content input[type="email"],
body.hafez-account-page .woocommerce-MyAccount-content input[type="password"],
body.hafez-account-page .woocommerce-MyAccount-content input[type="tel"],
body.hafez-account-page .woocommerce-MyAccount-content input[type="number"],
body.hafez-account-page .woocommerce-MyAccount-content input[type="search"],
body.hafez-account-page .woocommerce-MyAccount-content select,
body.hafez-account-page .woocommerce-MyAccount-content textarea,
.hafez-account input[type="text"],
.hafez-account input[type="password"],
.hafez-account input[type="email"],
.hafez-account select,
.hafez-account textarea,
.hafez-user-fields-form input[type="text"],
.hafez-user-fields-form input[type="password"],
.hafez-user-fields-form input[type="email"],
.hafez-user-fields-form input[type="tel"],
.hafez-user-fields-form input[type="number"],
.hafez-user-fields-form input[type="url"],
.hafez-user-fields-form select,
.hafez-user-fields-form textarea {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 40px;
	height: 40px;
	margin: 0;
	padding: 0 12px;
	color: var(--hafez-uf-input-text, var(--hafez-color-text, #2c2624));
	font-size: 13px;
	line-height: 40px;
	vertical-align: middle;
	background: var(--hafez-uf-input-bg, var(--hafez-color-surface, #fff)) !important;
	border: 1px solid var(--hafez-uf-input-border, var(--hafez-color-border));
	border-radius: var(--hafez-uf-input-radius, var(--hafez-radius-md));
	box-shadow: none !important;
}

/* Keep text vertically centered even when the theme adds extra padding. */
.hafez-user-fields-form input[type="text"],
.hafez-user-fields-form input[type="password"],
.hafez-user-fields-form input[type="email"],
.hafez-user-fields-form input[type="tel"],
.hafez-user-fields-form input[type="number"],
.hafez-user-fields-form input[type="url"],
.hafez-user-fields-form select {
	padding-block: 0 !important;
}

/* Field title typography: assets/css/user-fields.css (engine shared). */

.hafez-user-fields-form textarea,
body.hafez-account-page .woocommerce-MyAccount-content textarea,
.hafez-account textarea {
	height: auto;
	min-height: 88px;
	padding: 10px 12px;
	line-height: 1.5;
}

/* Browser autofill paints a blue wash on some fields (national id / password). */
.hafez-user-fields-form input:-webkit-autofill,
.hafez-user-fields-form input:-webkit-autofill:hover,
.hafez-user-fields-form input:-webkit-autofill:focus,
body.hafez-account-page .woocommerce-MyAccount-content input:-webkit-autofill,
body.hafez-account-page .woocommerce-MyAccount-content input:-webkit-autofill:hover,
body.hafez-account-page .woocommerce-MyAccount-content input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--hafez-color-text, #2c2624) !important;
	caret-color: var(--hafez-color-text, #2c2624);
	box-shadow: 0 0 0 1000px var(--hafez-color-surface, #fff) inset !important;
	transition: background-color 99999s ease-out 0s;
}

/* Generic account labels (login etc.). Engine field titles: user-fields.css only. */
body.hafez-account-page .woocommerce-MyAccount-content label:not(.hafez-user-fields__radio),
.hafez-account label:not(.hafez-user-fields__radio) {
	color: var(--hafez-color-text);
	font-size: 13px;
	font-weight: 500;
}

body.hafez-account-page .woocommerce-MyAccount-content .form-row,
.hafez-account .login p {
	margin: 0 0 var(--hafez-space-md);
}

/* Kill theme half-width floats inside the account content column. */
body.hafez-account-page .woocommerce-MyAccount-content .form-row,
body.hafez-account-page .woocommerce-MyAccount-content .form-row-first,
body.hafez-account-page .woocommerce-MyAccount-content .form-row-last,
body.hafez-account-page .woocommerce-MyAccount-content .form-row-wide,
.hafez-user-fields-form .form-row,
.hafez-user-fields-form .form-row-first,
.hafez-user-fields-form .form-row-last,
.hafez-user-fields-form .form-row-wide {
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-inline: 0 !important;
}

body.hafez-account-page .woocommerce-MyAccount-content .form-row::before,
body.hafez-account-page .woocommerce-MyAccount-content .form-row::after,
.hafez-user-fields-form .form-row::before,
.hafez-user-fields-form .form-row::after {
	display: none !important;
	content: none !important;
}

/* Tables */
body.hafez-account-page .woocommerce-MyAccount-content table.shop_table {
	width: 100%;
	max-width: 100%;
	margin: 0 0 var(--hafez-space-md);
	border-collapse: collapse;
	border: 1px solid var(--hafez-color-border);
	border-radius: var(--hafez-radius-md);
	overflow: hidden;
	background: var(--hafez-color-surface);
}

body.hafez-account-page .woocommerce-MyAccount-content .shop_table_responsive,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__wrapper,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-table__wrapper {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

body.hafez-account-page .woocommerce-MyAccount-content table.shop_table th,
body.hafez-account-page .woocommerce-MyAccount-content table.shop_table td {
	padding: 12px 14px;
	font-size: 13px;
	text-align: start;
	border-bottom: 1px solid var(--hafez-color-border);
	border-top: 0;
}

body.hafez-account-page .woocommerce-MyAccount-content table.shop_table thead th {
	color: var(--hafez-color-text-muted);
	font-weight: 600;
	background: var(--hafez-color-background);
}

body.hafez-account-page .woocommerce-MyAccount-content table.shop_table tbody tr:last-child td {
	border-bottom: 0;
}

body.hafez-account-page .woocommerce-MyAccount-content table.shop_table a {
	color: var(--hafez-account-link, var(--hafez-color-primary, var(--hafez-color-text)));
	font-weight: 600;
	text-decoration: none;
}

body.hafez-account-page .woocommerce-MyAccount-content table.shop_table a:hover {
	color: var(--hafez-account-link-hover, var(--hafez-color-primary-hover, #d4471a));
	text-decoration: underline;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Price-amount,
body.hafez-account-page .woocommerce-MyAccount-content table.shop_table .woocommerce-Price-amount,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-overview .woocommerce-Price-amount {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* RTL: reverse flex so currency (تومان) appears after the amount. */
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Price-amount bdi {
	display: inline-flex;
	flex-flow: row-reverse;
	align-items: baseline;
	gap: 0;
}

/* ----------------------------------------------------------------------
 * WooCommerce default account endpoints (orders / downloads / view-order / addresses / …)
 * ---------------------------------------------------------------------- */

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-number a,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions a,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-MyAccount-downloads-file,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-button,
body.hafez-account-page .woocommerce-MyAccount-content a.woocommerce-button,
body.hafez-account-page .woocommerce-MyAccount-content .button,
body.hafez-account-page .woocommerce-MyAccount-content a.button {
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 600;
	line-height: 1.4;
}

/* Keep actions th/td as table-cell so column width matches the header. */
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__header-order-actions,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions,
body.hafez-account-page .woocommerce-MyAccount-content table.shop_table th.woocommerce-orders-table__header-order-actions,
body.hafez-account-page .woocommerce-MyAccount-content table.shop_table td.woocommerce-orders-table__cell-order-actions,
body.hafez-account-page .woocommerce-MyAccount-content table.shop_table th.order-actions,
body.hafez-account-page .woocommerce-MyAccount-content table.shop_table td.order-actions {
	display: table-cell;
	width: 1%;
	white-space: nowrap;
	vertical-align: middle;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions a.button {
	display: inline-flex;
	flex-wrap: nowrap;
	gap: 6px;
	align-items: center;
	margin-inline-end: 6px;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button:last-child,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions a.button:last-child {
	margin-inline-end: 0;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions a.button,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-button.button,
body.hafez-account-page .woocommerce-MyAccount-content a.woocommerce-button,
body.hafez-account-page .woocommerce-MyAccount-content .order-again .button {
	box-sizing: border-box;
	min-height: 34px;
	margin-block: 0;
	padding: 6px 12px;
	color: var(--hafez-color-text, #2c2624);
	background: var(--hafez-color-surface, #fff);
	border: 1px solid var(--hafez-color-border, #e5dfda);
	border-radius: var(--hafez-radius-md, 8px);
	box-shadow: none;
	text-decoration: none;
	white-space: nowrap;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .button:hover,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions a.button:hover,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-button.button:hover,
body.hafez-account-page .woocommerce-MyAccount-content a.woocommerce-button:hover,
body.hafez-account-page .woocommerce-MyAccount-content .order-again .button:hover {
	background: var(--hafez-color-background, #f7f4f2);
	text-decoration: none;
}

body.hafez-account-page .woocommerce-MyAccount-content mark,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-status mark,
body.hafez-account-page .woocommerce-MyAccount-content .order-status {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 2px 8px;
	color: var(--hafez-color-text, #2c2624);
	font-family: var(--hafez-font-sans, "IRANSans", Tahoma, Arial, sans-serif);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	background: var(--hafez-color-background, #f7f4f2);
	border-radius: 999px;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-pagination,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: center;
	margin: var(--hafez-space-md) 0 0;
	padding: 0;
	list-style: none;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-pagination .page-numbers,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	min-height: 34px;
	padding: 4px 10px;
	color: var(--hafez-color-text, #2c2624);
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 600;
	line-height: 1.3;
	background: var(--hafez-color-surface, #fff);
	border: 1px solid var(--hafez-color-border, #e5dfda);
	border-radius: var(--hafez-radius-md, 8px);
	text-decoration: none;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-pagination .page-numbers.current,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Pagination .page-numbers.current {
	color: #fff;
	background: var(--hafez-color-primary, #2c2624);
	border-color: var(--hafez-color-primary, #2c2624);
}

/* View order */
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--hafez-space-sm, 12px);
	margin: 0 0 var(--hafez-space-md);
	padding: 0;
	list-style: none;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-overview li {
	box-sizing: border-box;
	margin: 0;
	padding: 12px 14px;
	color: var(--hafez-color-text-muted, #6b635e);
	font-size: var(--hafez-fs-small, 12px);
	font-weight: 500;
	line-height: 1.5;
	background: var(--hafez-color-background, #f7f4f2);
	border: 1px solid var(--hafez-color-border, #e5dfda);
	border-radius: var(--hafez-radius-md, 8px);
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-overview li strong {
	display: block;
	margin-top: 4px;
	color: var(--hafez-color-text, #2c2624);
	font-size: var(--hafez-fs-body, 14px);
	font-weight: 600;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-details,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-customer-details {
	margin: 0 0 var(--hafez-space-lg, 24px);
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-customer-details .woocommerce-columns,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Addresses,
body.hafez-account-page .woocommerce-MyAccount-content .u-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--hafez-space-md, 16px);
	margin: 0;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-customer-details .woocommerce-column,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address,
body.hafez-account-page .woocommerce-MyAccount-content .u-column,
body.hafez-account-page .woocommerce-MyAccount-content .col-1,
body.hafez-account-page .woocommerce-MyAccount-content .col-2 {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	box-sizing: border-box;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-customer-details address {
	padding: 14px 16px;
	background: var(--hafez-color-background, #f7f4f2);
	border: 1px solid var(--hafez-color-border, #e5dfda);
	border-radius: var(--hafez-radius-md, 8px);
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address-title,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address header {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 var(--hafez-space-sm, 12px);
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address-title .edit,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address .edit {
	color: var(--hafez-color-primary, var(--hafez-color-text));
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 600;
	text-decoration: none;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address-title .edit:hover,
body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Address .edit:hover {
	text-decoration: underline;
}

body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-MyAccount-downloads,
body.hafez-account-page .woocommerce-MyAccount-content .account-payment-methods-table {
	margin: 0 0 var(--hafez-space-md);
}

body.hafez-account-page .woocommerce-MyAccount-content .order-again {
	margin: var(--hafez-space-md) 0 0;
}

@media (max-width: 700px) {
	body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-customer-details .woocommerce-columns,
	body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-Addresses,
	body.hafez-account-page .woocommerce-MyAccount-content .u-columns {
		grid-template-columns: 1fr;
	}

	body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-overview {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 480px) {
	body.hafez-account-page .woocommerce-MyAccount-content .woocommerce-order-overview {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------
 * Narrow screens: sticky brand bar, menu in an off-canvas drawer
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
	.hafez-account,
	body.hafez-account-page.hafez-account-page--canvas .woocommerce {
		--hafez-account-bar: 0px;
		padding: var(--hafez-space-sm);
	}

	body.hafez-account-page:not(.hafez-account-page--canvas) .woocommerce {
		--hafez-account-bar: 0px;
		padding: 0;
	}

	body.admin-bar.hafez-account-page .woocommerce,
	body.admin-bar .hafez-account {
		--hafez-account-bar: 32px;
	}

	.hafez-account__layout,
	body.hafez-account-page .woocommerce {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr);
		gap: var(--hafez-space-md);
	}

	body.hafez-account-page.hafez-account-page--canvas .woocommerce,
	body.hafez-account-page.hafez-account-page--canvas .hafez-account__layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr);
		gap: var(--hafez-space-sm);
		padding: var(--hafez-space-sm);
	}

	.hafez-account__sidebar,
	body.hafez-account-page.hafez-account-page--canvas .hafez-account__sidebar {
		position: sticky;
		top: var(--hafez-account-bar, 0px);
		z-index: 30;
		align-self: start;
		gap: 0;
		max-height: none;
		height: auto;
		padding: var(--hafez-account-card-padding, var(--hafez-space-xs) var(--hafez-space-sm));
		overflow: visible;
	}

	/* Fullscreen: chrome lives in the top bar; sidebar is only the drawer host. */
	body.hafez-account-page--canvas .hafez-account__sidebar--rail {
		position: static;
		z-index: auto;
		width: 0;
		height: 0;
		min-height: 0;
		margin: 0;
		padding: 0;
		overflow: visible;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.hafez-account__brand {
		justify-content: flex-start;
		padding: 0;
	}

	.hafez-account__brand--user {
		align-items: center;
	}

	.hafez-account__nav-toggle,
	body.hafez-account-page .hafez-account__nav-toggle,
	body.hafez-account-page .woocommerce .hafez-account__nav-toggle,
	body.hafez-account-page .woocommerce button.hafez-account__nav-toggle {
		display: inline-flex !important;
		order: -1;
		width: 36px;
		height: 36px;
	}

	body.hafez-account-page .hafez-account__logo,
	body.hafez-account-page .woocommerce .hafez-account__logo,
	.hafez-account__logo {
		width: min(var(--hafez-account-logo-width, 168px), 88px) !important;
		max-width: min(var(--hafez-account-logo-width, 168px), 88px) !important;
	}

	body.hafez-account-page--canvas .hafez-account__logo--topbar {
		width: min(var(--hafez-account-logo-width, 168px), 96px) !important;
		max-width: min(var(--hafez-account-logo-width, 168px), 96px) !important;
	}

	body.hafez-account-page--canvas .hafez-account__welcome {
		flex: 1 1 12rem;
		white-space: normal;
	}

	body.hafez-account-page--canvas .hafez-account__topbar {
		position: sticky;
		top: var(--hafez-account-bar, 0px);
		z-index: 30;
		min-height: 56px;
		padding: var(--hafez-account-card-padding, var(--hafez-space-xs) var(--hafez-space-sm));
	}

	body.hafez-account-page--canvas .hafez-account__date {
		font-size: 12px;
	}

	.hafez-account__sidebar-drawer {
		position: fixed;
		top: var(--hafez-account-bar, 0px);
		right: 0;
		bottom: 0;
		z-index: 40;
		box-sizing: border-box;
		width: min(var(--hafez-sidebar-width), 88vw);
		padding: var(--hafez-account-card-padding, var(--hafez-space-sm));
		overflow: hidden;
		background: var(--hafez-color-surface);
		border: 1px solid var(--hafez-color-border);
		border-radius: var(--hafez-radius-md) 0 0 var(--hafez-radius-md);
		box-shadow: var(--hafez-shadow-md);
		transform: translateX(105%);
		transition: transform 200ms ease;
	}

	.is-nav-open .hafez-account__sidebar-drawer {
		transform: translateX(0);
	}

	.hafez-account__nav-backdrop {
		position: fixed;
		top: var(--hafez-account-bar, 0px);
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 20;
		display: block;
		background: rgba(44, 38, 36, 0.42);
		opacity: 0;
		pointer-events: none;
		transition: opacity 200ms ease;
	}

	.is-nav-open .hafez-account__nav-backdrop {
		opacity: 1;
		pointer-events: auto;
	}

	.hafez-account__sidebar-drawer .hafez-account__menu {
		flex: 1 1 auto;
		min-height: 0;
		overflow-x: hidden;
		overflow-y: auto;
	}
}

@media (max-width: 560px) {
	body.hafez-account-page--canvas .hafez-account__topbar-end {
		width: 100%;
		justify-content: space-between;
	}

	body.hafez-account-page--canvas .hafez-account__welcome {
		font-size: 11px;
	}
}

body.hafez-account-nav-open {
	overflow: hidden;
}

@media screen and (max-width: 782px) {
	body.admin-bar.hafez-account-page .woocommerce,
	body.admin-bar.hafez-account-page .hafez-account,
	body.admin-bar.hafez-account-page .hafez-account__layout {
		min-height: calc(100vh - 46px);
		min-height: calc(100dvh - 46px);
	}

	body.admin-bar.hafez-account-page .woocommerce,
	body.admin-bar .hafez-account {
		--hafez-account-bar: 46px;
	}
}

/* Edit-account: drop the single outer white card; each box is its own card. */
body.hafez-account-page--edit-account .woocommerce-MyAccount-content,
body.hafez-account-page .woocommerce-MyAccount-content:has(.hafez-user-fields-form),
.hafez-account__card:has(.hafez-user-fields-form) {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.hafez-account-page--edit-account .woocommerce-MyAccount-content > .hafez-account__page-title,
body.hafez-account-page .woocommerce-MyAccount-content:has(.hafez-user-fields-form) > .hafez-account__page-title,
.hafez-account__card:has(.hafez-user-fields-form) > .hafez-account__page-title {
	margin: 0 0 var(--hafez-space-md);
	padding: 0 2px var(--hafez-space-sm);
	border-bottom: 0;
}

body.hafez-account-page--edit-account .woocommerce-MyAccount-content > .woocommerce-notices-wrapper,
body.hafez-account-page--edit-account .woocommerce-MyAccount-content > .woocommerce-message,
body.hafez-account-page--edit-account .woocommerce-MyAccount-content > .woocommerce-info,
body.hafez-account-page--edit-account .woocommerce-MyAccount-content > .woocommerce-error {
	margin-bottom: var(--hafez-space-md);
}

.hafez-account__custom:has(.hafez-user-fields-form) {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.hafez-user-fields-form {
	display: flex;
	flex-direction: column;
	gap: var(--hafez-space-md);
	min-width: 0;
	max-width: 100%;
	padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.hafez-user-fields-form .hafez-user-fields__box {
	box-sizing: border-box;
	margin: 0;
	padding: var(--hafez-space-lg);
	background: var(--hafez-color-surface);
	border: 1px solid var(--hafez-color-border);
	border-radius: var(--hafez-radius-md);
	box-shadow: var(--hafez-shadow-sm);
}

.hafez-user-fields-form .hafez-user-fields__box-title {
	margin: 0 0 14px;
	padding-bottom: 10px;
	color: var(--hafez-color-text);
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: var(--hafez-fs-card-title, 15px);
	font-weight: 600;
	line-height: var(--hafez-lh-heading, 1.4);
	border-bottom: 1px solid var(--hafez-color-border);
}

.hafez-user-fields-form .hafez-user-fields__actions {
	position: sticky;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: var(--hafez-space-md) 0 0;
	padding: 0;
	pointer-events: none;
	background: transparent;
	backdrop-filter: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.hafez-user-fields-form .hafez-user-fields__actions.is-dirty {
	border: 0;
}

.hafez-user-fields-form .hafez-user-fields__actions.is-attention-pulse .hafez-user-fields__btn--primary,
.hafez-user-fields-form .hafez-user-fields__actions.is-attention-pulse .button {
	animation: hafez-save-slide 0.85s ease 2;
}

@keyframes hafez-save-slide {
	0%,
	100% {
		transform: translateX(0);
	}

	15% {
		transform: translateX(-10px);
	}

	30% {
		transform: translateX(8px);
	}

	45% {
		transform: translateX(-6px);
	}

	60% {
		transform: translateX(4px);
	}

	75% {
		transform: translateX(-2px);
	}
}

.hafez-user-fields-form .hafez-user-fields__btn,
.hafez-user-fields-form .hafez-user-fields__security-btn,
.hafez-user-fields-form .hafez-user-fields__add,
.hafez-user-fields-form .hafez-user-fields__locate {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px !important;
	height: auto !important;
	padding: 4px 12px !important;
	color: var(--hafez-color-btn-primary-text, #fff);
	font-family: "IRANSans", Tahoma, Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	cursor: pointer;
	background: var(--hafez-color-btn-primary-bg, var(--hafez-color-primary, #2563eb));
	border: 1px solid var(--hafez-color-btn-primary-bg, var(--hafez-color-primary, #2563eb));
	border-radius: 7px !important;
	box-shadow: none !important;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hafez-user-fields-form .hafez-user-fields__actions .hafez-user-fields__btn,
.hafez-user-fields-form .hafez-user-fields__actions .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50%;
	max-width: 100%;
	min-height: 52px !important;
	height: auto !important;
	padding: 14px 16px !important;
	color: var(--hafez-color-btn-action-text, #fff);
	font-family: "IRANSans", Tahoma, Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	cursor: pointer;
	background: var(--hafez-color-btn-action-bg, var(--hafez-color-btn-primary-bg, #ea580c));
	border: 1px solid var(--hafez-color-btn-action-bg, var(--hafez-color-btn-primary-bg, #ea580c));
	border-radius: 10px !important;
	box-shadow: 0 8px 24px color-mix(in srgb, var(--hafez-color-shadow, #0f172a) 18%, transparent) !important;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	pointer-events: auto;
}

.hafez-user-fields-form .hafez-user-fields__btn:hover,
.hafez-user-fields-form .hafez-user-fields__security-btn:hover,
.hafez-user-fields-form .hafez-user-fields__add:hover,
.hafez-user-fields-form .hafez-user-fields__locate:hover {
	color: var(--hafez-color-btn-primary-text, #fff);
	background: var(--hafez-color-btn-primary-hover, var(--hafez-color-primary-hover, #1d4ed8));
	border-color: var(--hafez-color-btn-primary-hover, var(--hafez-color-primary-hover, #1d4ed8));
}

.hafez-user-fields-form .hafez-user-fields__btn--primary,
.hafez-user-fields-form .hafez-user-fields__actions .button {
	color: var(--hafez-color-btn-action-text, #fff) !important;
	background: var(--hafez-color-btn-action-bg, var(--hafez-color-btn-primary-bg, #ea580c)) !important;
	border-color: var(--hafez-color-btn-action-bg, var(--hafez-color-btn-primary-bg, #ea580c)) !important;
}

.hafez-user-fields-form .hafez-user-fields__btn--primary:hover,
.hafez-user-fields-form .hafez-user-fields__actions .button:hover {
	background: var(--hafez-color-btn-action-hover, var(--hafez-color-btn-primary-hover, #c2410c)) !important;
	border-color: var(--hafez-color-btn-action-hover, var(--hafez-color-btn-primary-hover, #c2410c)) !important;
}

.hafez-user-fields-form .hafez-user-fields__save-busy {
	display: none;
	gap: 10px;
	align-items: center;
	justify-content: center;
}

.hafez-user-fields-form [data-hafez-user-fields-save].is-loading .hafez-user-fields__save-label {
	display: none;
}

.hafez-user-fields-form [data-hafez-user-fields-save].is-loading .hafez-user-fields__save-busy {
	display: inline-flex;
}

.hafez-user-fields-form [data-hafez-user-fields-save].is-loading,
.hafez-user-fields-form [data-hafez-user-fields-save]:disabled {
	cursor: progress;
	opacity: 0.92;
	pointer-events: none;
}

.hafez-user-fields-form .hafez-user-fields__spinner {
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: hafez-user-fields-spin 0.7s linear infinite;
}

@keyframes hafez-user-fields-spin {
	to {
		transform: rotate(360deg);
	}
}

.hafez-user-fields-form .hafez-user-fields__security-btn--ghost {
	color: var(--hafez-color-btn-secondary-text, var(--hafez-color-text, #0f172a));
	background: var(--hafez-color-btn-secondary-bg, #e2e8f0);
	border-color: var(--hafez-color-border, #e2e8f0);
}

.hafez-user-fields-form .hafez-user-fields__security-btn--ghost:hover {
	color: var(--hafez-color-btn-secondary-text, var(--hafez-color-text, #0f172a));
	background: var(--hafez-color-btn-secondary-hover, #cbd5e1);
	border-color: var(--hafez-color-btn-secondary-hover, #cbd5e1);
}

.hafez-user-fields-form .hafez-user-fields__icon-remove {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: var(--hafez-color-danger-text, #991b1b);
	font-size: 22px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	background: var(--hafez-color-danger-bg, #fee2e2);
	border: 1px solid color-mix(in srgb, var(--hafez-color-danger-text, #991b1b) 22%, transparent);
	border-radius: 999px;
}

.hafez-user-fields-form .hafez-user-fields__icon-remove:hover {
	filter: brightness(0.96);
}

.hafez-user-fields-form .hafez-user-fields__address-title {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin: 0;
	font-size: var(--hafez-fs-small, 13px);
	font-weight: 600;
}

.hafez-user-fields-form .hafez-persian-datepicker,
.hafez-user-fields-form input.persian-calendar-input {
	box-sizing: border-box;
	width: 100%;
	max-width: min(280px, 100%);
	cursor: pointer;
	background-image: none;
}

/* State/city + Select2 heights live in assets/css/user-fields.css (shared with KYC). */

.hafez-user-fields-form .hafez-user-fields__avatar {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin: 0 0 16px;
}

.hafez-user-fields-form .hafez-user-fields__avatar-preview {
	display: flex;
	flex: 0 0 72px;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	overflow: hidden;
	color: var(--hafez-color-text-muted, #64748b);
	line-height: 0;
	cursor: pointer;
	background: var(--hafez-color-background, #f8fafc);
	border: 1px solid var(--hafez-color-border, #e2e8f0);
	border-radius: 999px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hafez-user-fields-form .hafez-user-fields__avatar-preview:hover,
.hafez-user-fields-form .hafez-user-fields__avatar-preview:focus {
	border-color: color-mix(in srgb, var(--hafez-color-btn-action-bg, #ea580c) 50%, var(--hafez-color-border, #e2e8f0));
	box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
	outline: none;
}

.hafez-user-fields-form .hafez-user-fields__avatar-preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hafez-user-fields-form .hafez-user-fields__avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	line-height: 0;
}

.hafez-user-fields-form .hafez-user-fields__avatar-fallback svg {
	display: block;
	width: 28px;
	height: 28px;
	margin: 0;
	flex-shrink: 0;
}

.hafez-user-fields-form .hafez-user-fields__avatar-controls {
	display: flex;
	flex: 1 1 200px;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.hafez-user-fields-form .hafez-user-fields__avatar-label {
	display: block;
}

.hafez-user-fields-form .hafez-user-fields__avatar-file {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.hafez-user-fields-form .hafez-user-fields__avatar-input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none;
}

.hafez-user-fields-form .hafez-user-fields__avatar-pick {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 32px !important;
	height: auto !important;
	margin: 0;
	padding: 4px 12px !important;
	color: var(--hafez-color-btn-action-text, #fff) !important;
	font-family: "IRANSans", Tahoma, Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	cursor: pointer;
	background: var(--hafez-color-btn-action-bg, #ea580c) !important;
	border: 1px solid var(--hafez-color-btn-action-bg, #ea580c) !important;
	border-radius: 7px !important;
	box-shadow: none !important;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.hafez-user-fields-form .hafez-user-fields__avatar-pick svg {
	display: block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: currentColor;
}

.hafez-user-fields-form .hafez-user-fields__avatar-pick:hover {
	color: #fff !important;
	background: var(--hafez-color-btn-action-hover, #c2410c) !important;
	border-color: var(--hafez-color-btn-action-hover, #c2410c) !important;
}

.hafez-user-fields-form .hafez-user-fields__avatar-pick:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2) !important;
}

.hafez-user-fields-form .hafez-user-fields__avatar-pick:active {
	transform: none;
}

.hafez-user-fields-form .hafez-user-fields__avatar-name {
	min-width: 0;
	color: var(--hafez-color-text-muted, #64748b);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hafez-user-fields-form .hafez-user-fields__avatar-name.is-selected {
	color: var(--hafez-color-text, #2c2624);
	font-weight: 600;
}

.hafez-user-fields-form .hafez-user-fields__avatar-remove {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
}

body.hafez-account-page--edit-account .persian-calendar-popup,
body.hafez-account-page--edit-account .persian-calendar-wrapper {
	font-family: "IRANSans", Tahoma, Arial, sans-serif !important;
}

body.hafez-account-page--edit-account .persian-calendar-month-year {
	display: flex;
	gap: 8px;
	align-items: stretch;
	margin-bottom: 14px;
}

body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-day-display,
body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-month,
body.hafez-account-page--edit-account .persian-calendar-month-year select.persian-calendar-month,
body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-year-display {
	box-sizing: border-box !important;
	display: block !important;
	margin: 0 !important;
	min-height: 36px !important;
	height: 36px !important;
	padding: 0 10px !important;
	color: var(--hafez-color-text, #2c2624) !important;
	font-family: "IRANSans", Tahoma, Arial, sans-serif !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 34px !important;
	text-align: center;
	background: var(--hafez-color-surface, #fff) !important;
	border: 1px solid var(--hafez-color-border, #e2e8f0) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	outline: none !important;
	appearance: none;
	-webkit-appearance: none;
}

body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-day-display {
	flex: 0 0 44px;
	width: 44px !important;
	min-width: 44px !important;
	max-width: 44px !important;
}

body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-month,
body.hafez-account-page--edit-account .persian-calendar-month-year select.persian-calendar-month {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	padding-inline: 10px 28px !important;
	text-align: start;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: left 10px center !important;
	background-size: 10px 7px !important;
}

body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-year-display {
	flex: 0 0 64px;
	width: 64px !important;
	min-width: 64px !important;
	max-width: 64px !important;
	cursor: text;
}

body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-day-display:focus,
body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-month:focus,
body.hafez-account-page--edit-account .persian-calendar-month-year select.persian-calendar-month:focus,
body.hafez-account-page--edit-account .persian-calendar-month-year .persian-calendar-year-display:focus {
	border-color: var(--hafez-color-primary, #c45c26) !important;
	box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.14) !important;
}

body.hafez-account-page--edit-account .select2-dropdown,
body.hafez-account-page--edit-account .select2-results__option {
	font-family: var(--hafez-font-body, "IRANSans", Tahoma, Arial, sans-serif) !important;
	font-size: 13px !important;
	color: var(--hafez-uf-input-text, var(--hafez-color-text, #2c2624)) !important;
}

.hafez-user-fields-form .hafez-user-fields__security-pending {
	margin: 0 0 12px;
	padding: 10px 12px;
	color: var(--hafez-color-warning-text, #9a3412);
	font-size: 13px;
	background: var(--hafez-color-warning-bg, #ffedd5);
	border-radius: 10px;
}

.hafez-user-fields-form .hafez-user-fields__passwords {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.hafez-user-fields-form .hafez-user-fields__passwords legend {
	margin: 0 0 10px;
	padding: 0;
}

.hafez-user-fields-form .hafez-user-fields__repeater {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hafez-user-fields-form .hafez-user-fields__card {
	padding: 16px;
	background: rgba(44, 38, 36, 0.02);
	border: 1px solid rgba(44, 38, 36, 0.1);
	border-radius: 12px;
}

.hafez-user-fields-form .hafez-user-fields__card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.hafez-user-fields-form .hafez-user-fields__add {
	margin-top: 12px;
}

.hafez-user-fields-form .hafez-user-fields__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
	gap: 12px;
}

.hafez-user-fields-form .hafez-user-fields__map-wrap {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 8px;
}

/* Map field title typography: user-fields.css */

.hafez-user-fields-form .hafez-user-fields__map {
	width: 100%;
	height: 260px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(44, 38, 36, 0.12);
	z-index: 0;
}

.hafez-user-fields-form .hafez-user-fields__hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: rgba(44, 38, 36, 0.55);
}

/* Security panels */
.hafez-user-fields__security {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hafez-user-fields__security-panel {
	margin: 0 0 16px;
	padding: 18px;
	background: rgba(44, 38, 36, 0.02);
	border: 1px solid rgba(44, 38, 36, 0.1);
	border-radius: 14px;
}

.hafez-user-fields__security-panel + .hafez-user-fields__security-panel {
	margin-top: 4px;
}

.hafez-user-fields__security-panel h4 {
	margin: 0 0 12px;
	font-size: 1rem;
}

.hafez-user-fields__security-current {
	margin: 0 0 12px;
	font-size: 13px;
	color: rgba(44, 38, 36, 0.7);
}

.hafez-user-fields__security-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
}

.hafez-user-fields__security-field input {
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	height: 40px;
	padding: 0 12px;
	font-weight: 400;
	background: var(--hafez-color-surface, #fff) !important;
	border: 1px solid rgba(44, 38, 36, 0.14);
	border-radius: 10px;
	box-shadow: none !important;
}

.hafez-user-fields__security-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hafez-user-fields__security-msg {
	margin: 12px 0 0;
	font-size: 13px;
}

.hafez-user-fields__security-msg.is-ok {
	color: #067647;
}

.hafez-user-fields__security-msg.is-error {
	color: #b42318;
}

/* Bank plastic card */
.hafez-user-fields__bank-list {
	gap: 22px;
}

.hafez-bank-card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(260px, 340px) 1fr;
	gap: 18px;
	align-items: start;
	padding-top: 8px;
}

.hafez-bank-card__head {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.hafez-bank-card__head strong {
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
}

@media (max-width: 720px) {
	.hafez-bank-card {
		grid-template-columns: 1fr;
	}
}

.hafez-bank-card__face {
	position: relative;
	aspect-ratio: 1.586;
	padding: 22px 22px 18px;
	overflow: hidden;
	color: #f7f3ea;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(255, 214, 150, 0.35), transparent 55%),
		linear-gradient(145deg, #1b2a4a 0%, #0f1a30 48%, #243b5c 100%);
	border-radius: 18px;
	box-shadow:
		0 18px 40px rgba(15, 26, 48, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
}

.hafez-bank-card__face::before {
	content: "";
	position: absolute;
	inset: -40% auto auto -20%;
	width: 70%;
	height: 90%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 65%);
	transform: rotate(18deg);
	pointer-events: none;
}

.hafez-bank-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 28px;
}

.hafez-bank-card__chip {
	flex: 0 0 auto;
	width: 42px;
	height: 32px;
	background:
		linear-gradient(135deg, #f0d59a, #c9a35b 45%, #f7e7b8);
	border-radius: 6px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.hafez-bank-card__brand-wrap {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	min-width: 0;
	max-width: calc(100% - 54px);
}

.hafez-bank-card__logo {
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	padding: 4px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.96);
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.hafez-bank-card__logo[hidden] {
	display: none !important;
}

.hafez-bank-card__brand {
	min-width: 0;
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.35;
	text-align: left;
	opacity: 0.95;
}

.hafez-bank-card__number {
	margin-bottom: 22px;
	font-size: clamp(1.05rem, 2.4vw, 1.35rem);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.hafez-bank-card__meta {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}

.hafez-bank-card__label {
	display: block;
	margin-bottom: 4px;
	font-family: "IRANSans", Tahoma, Arial, sans-serif;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

.hafez-bank-card__meta strong {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.hafez-bank-card__fields {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 4px 0;
}

.hafez-bank-card__fields label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
}

.hafez-bank-card__fields input,
.hafez-bank-card__fields select {
	min-height: 42px;
	padding: 0 12px;
	font-weight: 400;
	border: 1px solid rgba(44, 38, 36, 0.14);
	border-radius: 10px;
}

.hafez-bank-card__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

@media (max-width: 520px) {
	.hafez-bank-card__row {
		grid-template-columns: 1fr;
	}
}

.hafez-bank-card__add {
	align-self: flex-start;
}

.hafez-user-fields__row--radios {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	box-sizing: border-box;
	margin: 0 0 var(--hafez-space-md, 16px);
	padding: 0;
	border: 0;
	min-width: 0;
}

/* Radio field titles: assets/css/user-fields.css (engine shared). */

.hafez-user-fields__radios {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: stretch;
	width: 100%;
}

.hafez-user-fields__radio {
	display: inline-flex !important;
	flex-direction: row;
	gap: 8px;
	align-items: center !important;
	justify-content: center;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0 14px !important;
	color: var(--hafez-color-text, #2c2624);
	font-size: 13px;
	font-weight: 500;
	line-height: 1 !important;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	background: #fff;
	border: 1px solid var(--hafez-color-border, #e2e8f0);
	border-radius: var(--hafez-radius-sm, 6px);
	float: none !important;
}

.hafez-user-fields__radio:has(input:checked) {
	color: var(--hafez-color-brand-700, #c2410c);
	background: var(--hafez-color-primary-subtle, #fff7ed);
	border-color: var(--hafez-color-brand-200, #fdba74);
}

.hafez-user-fields-form .hafez-user-fields__radio input[type="radio"],
.hafez-user-fields__radio input[type="radio"],
body.hafez-account-page .woocommerce-MyAccount-content .hafez-user-fields__radio input[type="radio"] {
	flex: 0 0 16px !important;
	align-self: center;
	box-sizing: border-box;
	display: inline-block !important;
	width: 16px !important;
	min-width: 16px !important;
	max-width: 16px !important;
	height: 16px !important;
	min-height: 16px !important;
	max-height: 16px !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
	vertical-align: middle;
	float: none !important;
	position: static !important;
	accent-color: var(--hafez-color-btn-action-bg, #ea580c);
	appearance: auto;
	-webkit-appearance: radio;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.hafez-user-fields__radio > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	line-height: 1.3;
	transform: none;
}

.hafez-user-fields__contracts,
.hafez-user-fields__signature {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 var(--hafez-space-md, 16px);
	padding: 14px;
	background: var(--hafez-color-surface, #fff);
	border: 1px solid var(--hafez-color-border, #e2e8f0);
	border-radius: var(--hafez-radius-md, 8px);
}

.hafez-user-fields__signature.is-invalid,
.hafez-user-fields__signature.is-invalid .hafez-user-fields__signature-pad {
	border-color: #dc2626 !important;
	box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.18);
}

.hafez-user-fields__signature.is-valid,
.hafez-user-fields__signature.is-valid .hafez-user-fields__signature-pad {
	border-color: #16a34a !important;
	box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.16);
}

/* Contracts / signature titles: assets/css/user-fields.css */

.hafez-user-fields__contracts-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hafez-user-fields__contracts-link {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	min-width: 0;
	min-height: 44px;
	padding: 8px 12px;
	color: var(--hafez-color-text, #2c2624);
	text-decoration: none;
	word-break: break-word;
	background: rgba(44, 38, 36, 0.03);
	border: 1px solid rgba(44, 38, 36, 0.1);
	border-radius: 10px;
}

.hafez-user-fields__contracts-link .dashicons {
	flex: 0 0 auto;
	color: var(--hafez-color-btn-action-bg, #ea580c);
}

.hafez-user-fields__contracts-link em {
	margin-inline-start: auto;
	color: var(--hafez-color-btn-action-bg, #ea580c);
	font-size: 12px;
	font-style: normal;
	font-weight: 600;
}

.hafez-user-fields__contracts-upload {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px dashed var(--hafez-color-border, #e2e8f0);
}

.hafez-user-fields__contracts-upload-label {
	font-size: 13px;
	font-weight: 600;
}

.hafez-user-fields__contracts-current-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hafez-user-fields__contracts-current {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	background: rgba(44, 38, 36, 0.03);
	border: 1px solid rgba(44, 38, 36, 0.08);
	border-radius: 10px;
}

.hafez-user-fields__contracts-current a {
	color: var(--hafez-color-primary, #2c2624);
	font-size: 13px;
	font-weight: 600;
	word-break: break-word;
}

.hafez-user-fields__contracts-remove {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	font-size: 12px;
	cursor: pointer;
}

.hafez-user-fields__contracts-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.hafez-user-fields__contracts-file {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hafez-user-fields__contracts-pick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--hafez-color-border, #d6d3d1);
	border-radius: var(--hafez-radius-sm, 8px);
	background: var(--hafez-color-surface, #ffffff);
	color: var(--hafez-color-text, #1c1917);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.hafez-user-fields__contracts-pick:hover,
.hafez-user-fields__contracts-pick:focus-visible {
	border-color: var(--hafez-color-primary, #2c2624);
	outline: none;
}

.hafez-user-fields__contracts-filename {
	flex: 1 1 12rem;
	min-width: 0;
	color: var(--hafez-color-text, #1c1917);
	font-size: 13px;
	line-height: 1.4;
	word-break: break-word;
}

.hafez-user-fields__contracts-filename.is-empty {
	color: var(--hafez-color-text-muted, #78716c);
}

.hafez-user-fields__contracts-selected-list {
	margin-top: 4px;
}

.hafez-user-fields__contracts-selected-list[hidden] {
	display: none !important;
}

.hafez-user-fields__signature-pad {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	height: 180px;
	overflow: hidden;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
		repeating-linear-gradient(
			0deg,
			transparent,
			transparent 23px,
			rgba(44, 38, 36, 0.06) 24px
		);
	border: 1px dashed rgba(44, 38, 36, 0.22);
	border-radius: 12px;
	cursor: crosshair;
}

.hafez-user-fields__signature-pad canvas {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100% !important;
	height: 100% !important;
	cursor: crosshair;
	touch-action: none !important;
	user-select: none;
	-webkit-user-select: none;
	pointer-events: auto !important;
	background: transparent;
}

.hafez-user-fields__signature-preview {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none !important;
	background: #fff;
}

.hafez-user-fields__signature-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hafez-user-fields__signature-btn {
	min-height: 36px;
	padding: 6px 12px;
	color: var(--hafez-color-text, #2c2624);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	background: #fff;
	border: 1px solid rgba(44, 38, 36, 0.16);
	border-radius: 8px;
}

/* -------------------------------------------------------------------------
 * Account front + edit-account responsive polish
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
	.hafez-account__sidebar-drawer {
		padding-bottom: calc(var(--hafez-space-sm) + env(safe-area-inset-bottom, 0px));
		padding-inline-end: env(safe-area-inset-right, 0px);
	}

	body.hafez-account-page .woocommerce-MyAccount-content,
	.hafez-account__main {
		min-width: 0;
		max-width: 100%;
	}

	body.hafez-account-page .woocommerce-MyAccount-content table.shop_table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	body.hafez-account-page--edit-account .persian-calendar-popup,
	body.hafez-account-page--edit-account .persian-calendar-wrapper,
	.hafez-user-fields-form .persian-calendar-popup,
	.hafez-user-fields-form .persian-calendar-wrapper {
		box-sizing: border-box;
		max-width: min(100vw - 24px, 360px);
	}

	body.hafez-account-page--edit-account .persian-calendar-month-year {
		flex-wrap: wrap;
		gap: 6px;
	}
}

@media (max-width: 768px) {
	.hafez-user-fields-form {
		gap: var(--hafez-space-sm);
		padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
	}

	.hafez-user-fields-form .hafez-user-fields__box {
		padding: var(--hafez-space-md);
		border-radius: var(--hafez-radius-sm, 6px);
	}

	.hafez-user-fields-form .hafez-user-fields__box-title {
		margin-bottom: 12px;
		padding-bottom: 8px;
		font-size: 14px;
	}

	.hafez-user-fields-form .hafez-user-fields__actions {
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		padding-inline: 2px;
	}

	.hafez-user-fields-form .hafez-user-fields__actions .hafez-user-fields__btn,
	.hafez-user-fields-form .hafez-user-fields__actions .button {
		width: 100%;
	}

	.hafez-user-fields-form .hafez-persian-datepicker,
	.hafez-user-fields-form input.persian-calendar-input {
		max-width: 100%;
	}

	.hafez-user-fields-form .hafez-user-fields__grid {
		grid-template-columns: 1fr;
	}

	.hafez-user-fields-form .hafez-user-fields__map {
		height: 220px;
	}

	.hafez-user-fields-form .hafez-user-fields__card {
		padding: 12px;
	}

	.hafez-user-fields-form .hafez-user-fields__card-head {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.hafez-user-fields-form .hafez-user-fields__avatar {
		align-items: flex-start;
	}

	.hafez-user-fields-form .hafez-user-fields__avatar-controls {
		flex: 1 1 100%;
	}

	.hafez-user-fields__security-panel {
		padding: 14px;
	}

	.hafez-user-fields__security-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.hafez-user-fields__security-actions .hafez-user-fields__security-btn,
	.hafez-user-fields__security-actions .hafez-user-fields__btn {
		width: 100%;
	}

	.hafez-bank-card__face {
		padding: 18px 16px 14px;
		border-radius: 14px;
	}

	.hafez-bank-card__number {
		letter-spacing: 0.08em;
		word-break: break-all;
	}

	.hafez-user-fields__radio {
		flex: 1 1 calc(50% - 8px);
		justify-content: center !important;
		white-space: normal;
		text-align: center;
	}

	.hafez-user-fields__contracts,
	.hafez-user-fields__signature {
		padding: 12px;
	}

	.hafez-user-fields__contracts-link em {
		margin-inline-start: 0;
		width: 100%;
		padding-inline-start: 28px;
	}

	.hafez-user-fields__signature-pad {
		height: 160px;
	}

	.hafez-user-fields__signature-actions .hafez-user-fields__signature-btn {
		flex: 1 1 auto;
	}
}

@media (max-width: 560px) {
	body.hafez-account-page--canvas .hafez-account__topbar {
		flex-wrap: wrap;
		gap: 8px;
		row-gap: 6px;
	}

	body.hafez-account-page--canvas .hafez-account__topbar-start,
	body.hafez-account-page--canvas .hafez-account__topbar-end {
		min-width: 0;
	}

	body.hafez-account-page--canvas .hafez-account__date {
		font-size: 11px;
	}

	.hafez-user-fields-form .hafez-user-fields__box {
		padding: var(--hafez-space-sm) 12px;
	}

	.hafez-user-fields__radio {
		flex: 1 1 100%;
	}

	.hafez-bank-card__meta {
		flex-direction: column;
		gap: 10px;
	}

	.hafez-account__dash-widgets {
		gap: var(--hafez-space-sm);
	}
}

.hafez-wallet-account__summary {
	margin: 0 0 1.5rem;
	padding: 1rem 1.15rem;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.72);
}

.hafez-wallet-account__label {
	margin: 0 0 0.35rem;
	font-size: 0.9rem;
	opacity: 0.75;
}

.hafez-wallet-account__balance {
	margin: 0 0 0.85rem;
	font-size: 1.55rem;
	line-height: 1.2;
}

.hafez-wallet-account__balance span {
	margin-inline-start: 0.35rem;
	font-size: 0.95rem;
	font-weight: 500;
	opacity: 0.7;
}

.hafez-wallet-account__history h3 {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

.hafez-wallet-account__table {
	width: 100%;
	border-collapse: collapse;
}

.hafez-wallet-account__table th,
.hafez-wallet-account__table td {
	padding: 0.65rem 0.5rem;
	text-align: start;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	vertical-align: top;
}

.hafez-wallet-account__empty {
	margin: 0;
	opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
	.hafez-user-fields-form .hafez-user-fields__actions.is-attention-pulse .hafez-user-fields__btn--primary,
	.hafez-user-fields-form .hafez-user-fields__actions.is-attention-pulse .button {
		animation: none;
	}

	.hafez-account__link,
	.hafez-account__sidebar-drawer,
	.hafez-account__nav-backdrop,
	.hafez-account__nav-toggle-bars,
	.hafez-account__nav-toggle-bars::before,
	.hafez-account__nav-toggle-bars::after {
		transition: none;
	}
}
