/**
 * آیدیجیتال: کیف پول — پنل مشتری
 * Scoped under .idwl-wallet — بدون تداخل با قالب
 */

.idwl-wallet {
	--idwl-font: inherit;
	--idwl-bg: #f4f5f7;
	--idwl-surface: #ffffff;
	--idwl-text: #0f172a;
	--idwl-muted: #64748b;
	--idwl-border: #e2e8f0;
	--idwl-accent: #2563eb;
	--idwl-accent-hover: #1d4ed8;
	--idwl-accent-soft: #eff6ff;
	--idwl-hero-from: #1e3a8a;
	--idwl-hero-to: #3b82f6;
	--idwl-credit: #059669;
	--idwl-credit-bg: #ecfdf5;
	--idwl-debit: #dc2626;
	--idwl-debit-bg: #fef2f2;
	--idwl-radius: 20px;
	--idwl-radius-md: 14px;
	--idwl-radius-sm: 10px;
	--idwl-input-radius: 6px;
	--idwl-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	--idwl-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.12);
	font-family: var(--idwl-font);
	margin: 0 0 2rem;
	max-width: 100%;
	width: 100%;
}

.idwl-wallet *,
.idwl-wallet *::before,
.idwl-wallet *::after {
	box-sizing: border-box;
}

/* ——— متن بالای صفحه ——— */

.idwl-wallet__top-text {
	background: var(--idwl-surface);
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-radius-md);
	box-shadow: var(--idwl-shadow);
	color: var(--idwl-text);
	font-size: 14px;
	line-height: 1.7;
	margin-bottom: 16px;
	padding: 16px 20px;
}

.idwl-wallet__top-text > :first-child {
	margin-top: 0;
}

.idwl-wallet__top-text > :last-child {
	margin-bottom: 0;
}

.idwl-wallet__top-text a {
	color: var(--idwl-accent);
}

/* ——— چیدمان: سایدبار + محتوا ——— */

.idwl-wallet__layout {
	background: var(--idwl-bg);
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-radius);
	box-shadow: var(--idwl-shadow);
	display: grid;
	gap: 0;
	grid-template-columns: 200px 1fr;
	overflow: hidden;
}

.idwl-wallet__nav {
	background: var(--idwl-surface);
	border-inline-end: 1px solid var(--idwl-border);
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-block: 10px;
	padding-inline: 5px;
}

.idwl-wallet__nav-item {
	align-items: center;
	appearance: none;
	background: transparent;
	border: none;
	border-radius: var(--idwl-radius-sm);
	color: var(--idwl-muted);
	cursor: pointer;
	display: flex;
	flex-direction: row;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	gap: 10px;
	justify-content: flex-start;
	line-height: 1.35;
	min-height: 44px;
	padding-block: 10px;
	padding-inline: 5px;
	position: relative;
	text-align: end;
	transition: background 0.2s, color 0.2s;
	width: 100%;
}

.idwl-wallet__nav-item:hover {
	background: #f8fafc;
	color: var(--idwl-text);
}

.idwl-wallet__nav-item.is-active {
	background: var(--idwl-accent-soft);
	color: var(--idwl-accent);
}

.idwl-wallet__nav-item.is-active::after {
	background: var(--idwl-accent);
	border-radius: 4px 0 0 4px;
	content: '';
	height: 24px;
	inset-block: 0;
	inset-inline-end: 0;
	margin-block: auto;
	position: absolute;
	width: 3px;
}

.idwl-wallet__nav-icon {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	height: 20px;
	justify-content: center;
	opacity: 0.85;
	width: 20px;
}

.idwl-wallet__nav-icon svg {
	display: block;
	height: 18px;
	width: 18px;
}

.idwl-wallet__nav-label {
	flex: 1;
	text-align: end;
	white-space: nowrap;
}

.idwl-wallet__nav-item.is-active .idwl-wallet__nav-icon {
	opacity: 1;
}

/* RTL: سایدبار راست، آیتم‌ها چسبیده به لبه راست */
.idwl-wallet[dir="rtl"] .idwl-wallet__layout {
	direction: rtl;
}

.idwl-wallet[dir="rtl"] .idwl-wallet__nav {
	direction: rtl;
}

.idwl-wallet[dir="rtl"] .idwl-wallet__nav-item {
	flex-direction: row;
	justify-content: flex-start;
	text-align: right;
}

.idwl-wallet[dir="rtl"] .idwl-wallet__nav-label {
	order: -1;
	text-align: right;
}

.idwl-wallet[dir="rtl"] .idwl-wallet__nav-item.is-active::after {
	border-radius: 4px 0 0 4px;
	inset-inline-end: 0;
	inset-inline-start: auto;
}

.idwl-wallet[dir="ltr"] .idwl-wallet__nav-item {
	justify-content: flex-start;
	text-align: left;
}

.idwl-wallet[dir="ltr"] .idwl-wallet__nav-label {
	text-align: left;
}

.idwl-wallet[dir="ltr"] .idwl-wallet__nav-item.is-active::after {
	border-radius: 0 4px 4px 0;
	inset-inline-end: auto;
	inset-inline-start: 0;
}

/* تب‌های سایدبار: ریست padding قالب Rey (var(--btn-padding, 0)) */
.woocommerce-account .rey-myAccContent .idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item,
.idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item {
	--btn-padding: 10px 5px;
	--btn-lh: 1.35;
	--btn-ttr: none;
	--btn-td: none;
	box-sizing: border-box;
	padding-block: 10px !important;
	padding-inline: 5px !important;
}

.woocommerce-account .rey-myAccContent .idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item::before,
.idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item:not(.is-active)::after {
	content: none;
	display: none;
}

.woocommerce-account .rey-myAccContent .idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item .idwl-wallet__nav-icon,
.idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item .idwl-wallet__nav-icon {
	display: flex !important;
	flex-shrink: 0;
	visibility: visible;
}

.idwl-wallet__content {
	min-width: 0;
	padding: 20px;
}

.idwl-tab-panel {
	display: none;
}

.idwl-tab-panel.is-active {
	animation: idwl-fade-in 0.25s ease;
	display: block;
}

@keyframes idwl-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ——— کارت موجودی (هیرو) ——— */

.idwl-hero {
	background: linear-gradient(135deg, var(--idwl-hero-from) 0%, var(--idwl-hero-to) 100%);
	border-radius: var(--idwl-radius-md);
	box-shadow: 0 12px 32px -8px rgba(37, 99, 235, 0.45);
	color: #fff;
	overflow: hidden;
	position: relative;
}

.idwl-hero__glow {
	background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 55%);
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.idwl-hero__inner {
	padding: 28px 26px 24px;
	position: relative;
	z-index: 1;
}

.idwl-hero__top {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	margin-bottom: 8px;
}

.idwl-hero__top-end {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.idwl-hero__wallet-id {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: end;
}

.idwl-hero__wallet-id-label {
	font-size: 11px;
	font-weight: 500;
	opacity: 0.82;
}

.idwl-hero__wallet-id-value {
	direction: ltr;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.idwl-hero__label {
	font-size: 13px;
	font-weight: 500;
	margin: 0;
	opacity: 0.88;
}

.idwl-hero__badge {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
}

.idwl-hero__balance {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin: 0 0 4px;
}

.idwl-hero__amount {
	direction: ltr;
	font-size: clamp(32px, 7vw, 42px);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.idwl-hero__unit {
	font-size: 16px;
	font-weight: 500;
	opacity: 0.9;
}

.idwl-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.idwl-chip {
	backdrop-filter: blur(8px);
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: var(--idwl-radius-sm);
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 120px;
	padding: 10px 14px;
	margin-bottom: 10px;
}

.idwl-chip--warn {
	background: rgba(251, 191, 36, 0.2);
	border-color: rgba(251, 191, 36, 0.35);
}

.idwl-chip__label {
	font-size: 11px;
	font-weight: 500;
	opacity: 0.85;
}

.idwl-chip__value {
	direction: ltr;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.idwl-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

/* ——— برگه فرم‌ها ——— */

.idwl-sheet {
	background: var(--idwl-surface);
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-radius-md);
	box-shadow: var(--idwl-shadow);
	padding: 24px;
}

.idwl-sheet--flush {
	padding: 0;
}

.idwl-sheet__head {
	margin-bottom: 22px;
}

.idwl-sheet__head--compact {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	justify-content: space-between;
	margin-bottom: 0;
	padding: 20px 20px 12px;
}

.idwl-sheet__head--compact .idwl-sheet__title {
	margin-bottom: 0;
}

.idwl-sheet__title {
	color: var(--idwl-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 6px;
}

.idwl-sheet__desc,
.idwl-sheet__hint {
	color: var(--idwl-muted);
	font-size: 14px;
	line-height: 1.55;
	margin: 0;
}

.idwl-sheet__hint {
	color: var(--idwl-accent);
	font-weight: 500;
	margin-top: 8px;
}

/* ——— فرم‌ها ——— */

.idwl-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.idwl-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.idwl-field__label,
.idwl-field label {
	color: var(--idwl-text);
	font-size: 13px;
	font-weight: 600;
}

.idwl-field-hint {
	color: var(--idwl-muted);
	font-size: 12px;
	line-height: 1.5;
	margin: 6px 0 0;
}

.idwl-input-wrap {
	position: relative;
}

.idwl-input,
.idwl-field input[type="text"],
.idwl-field input[type="number"],
.idwl-field input[type="email"],
.idwl-field input[type="tel"],
.idwl-field input[type="search"],
.idwl-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]) {
	background: #f8fafc;
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-input-radius);
	color: var(--idwl-text);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	padding: 13px 14px;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
	width: 100%;
}

.idwl-input:focus,
.idwl-field input:focus {
	background: var(--idwl-surface);
	border-color: var(--idwl-accent);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
	outline: none;
}

/* ——— شارژ ——— */

.idwl-field--presets {
	gap: 10px;
}

.idwl-field--presets .idwl-field__label {
	display: block;
	line-height: 1.4;
	margin: 0;
	width: 100%;
}

.idwl-topup__presets {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	width: 100%;
}

.idwl-wallet .idwl-topup__preset {
	align-items: center;
	appearance: none;
	background: var(--idwl-surface);
	border: 1.5px solid var(--idwl-border);
	border-radius: var(--idwl-radius-sm);
	box-shadow: none;
	color: var(--idwl-text);
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	justify-content: center;
	line-height: 1.35;
	margin: 0;
	min-height: 48px;
	padding: 12px 14px;
	text-align: center;
	transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
	white-space: nowrap;
	width: 100%;
}

.idwl-wallet .idwl-topup__preset:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: var(--idwl-text);
}

.idwl-wallet .idwl-topup__preset:focus-visible {
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
	outline: none;
}

.idwl-wallet .idwl-topup__preset.is-selected {
	background: var(--idwl-accent-soft);
	border-color: var(--idwl-accent);
	box-shadow: none;
	color: var(--idwl-accent);
}

.idwl-wallet[dir="rtl"] .idwl-field--presets .idwl-field__label {
	text-align: right;
}

.idwl-wallet[dir="rtl"] .idwl-topup__presets {
	direction: rtl;
}

@media (max-width: 480px) {
	.idwl-topup__presets {
		grid-template-columns: 1fr;
	}
}

.idwl-topup__preview {
	color: var(--idwl-accent);
	direction: ltr;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	margin: 0;
	min-height: 1.3em;
	text-align: start;
}

/* ——— پاپ‌آپ افزودن موجودی ——— */

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

.idwl-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 20px;
	position: fixed;
	z-index: 100000;
}

.idwl-modal[hidden] {
	display: none !important;
}

.idwl-modal__backdrop {
	background: rgba(15, 23, 42, 0.45);
	inset: 0;
	position: absolute;
}

.idwl-modal__dialog {
	background: var(--idwl-surface);
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-radius-md);
	box-shadow: var(--idwl-shadow-lg);
	display: flex;
	flex-direction: column;
	max-height: min(90vh, 720px);
	max-width: 480px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.idwl-modal__head {
	align-items: flex-start;
	border-bottom: 1px solid var(--idwl-border);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 20px 20px 16px;
}

.idwl-modal__head-text {
	flex: 1;
	min-width: 0;
}

.idwl-modal__title {
	color: var(--idwl-text);
	font-size: 18px;
	font-weight: 800;
	line-height: 1.35;
	margin: 0;
}

.idwl-modal__desc {
	color: var(--idwl-muted);
	font-size: 13px;
	line-height: 1.6;
	margin: 8px 0 0;
}

.idwl-modal__close {
	align-items: center;
	appearance: none;
	background: #f8fafc;
	border: 1px solid var(--idwl-border);
	border-radius: 10px;
	color: var(--idwl-muted);
	cursor: pointer;
	display: inline-flex;
	flex-shrink: 0;
	height: 36px;
	justify-content: center;
	margin: 0;
	padding: 0;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	width: 36px;
}

.idwl-modal__close:hover,
.idwl-modal__close:focus-visible {
	background: #fff;
	border-color: #cbd5e1;
	color: var(--idwl-text);
	outline: none;
}

.idwl-modal__close svg {
	height: 18px;
	width: 18px;
}

.idwl-modal__body {
	overflow: auto;
	padding: 20px;
}

/* ——— دکمه‌ها (ریست متغیرهای Rey / ووکامرس) ——— */

.idwl-wallet .idwl-btn,
.idwl-wallet button.idwl-btn,
.idwl-wallet a.idwl-btn {
	--btn-padding: 14px 24px;
	--btn-lh: 1.4;
	--btn-dsp: inline-flex;
	--btn-font-size: 15px;
	--btn-fw: 600;
	--btn-br: var(--idwl-radius-sm);
	--btn-ttr: none;
	--btn-lts: normal;
	align-items: center;
	appearance: none;
	border: none;
	border-radius: var(--idwl-radius-sm);
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	line-height: 1.4;
	margin: 0;
	min-height: 48px;
	padding: 14px 24px;
	text-decoration: none;
	text-transform: none;
	transition: background 0.15s, transform 0.1s, box-shadow 0.15s, color 0.15s;
	vertical-align: middle;
	white-space: nowrap;
	width: auto;
}

.idwl-wallet .idwl-btn--primary,
.idwl-wallet button.idwl-btn--primary {
	--btn-bg-color: var(--idwl-accent);
	--btn-color: #fff;
	--btn-bd-w: 0;
	background: var(--idwl-accent);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
	color: #fff;
}

.idwl-wallet .idwl-btn--primary:hover,
.idwl-wallet button.idwl-btn--primary:hover {
	--btn-bg-color: var(--idwl-accent-hover);
	background: var(--idwl-accent-hover);
	color: #fff;
}

.idwl-wallet .idwl-btn--primary:focus-visible,
.idwl-wallet button.idwl-btn--primary:focus-visible {
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 4px 14px rgba(37, 99, 235, 0.35);
	color: #fff;
	outline: none;
}

.idwl-wallet .idwl-btn--hero,
.idwl-wallet a.idwl-btn--hero {
	--btn-bg-color: #fff;
	--btn-color: var(--idwl-hero-from);
	background: #fff;
	color: var(--idwl-hero-from);
}

.idwl-wallet .idwl-btn--hero:hover,
.idwl-wallet a.idwl-btn--hero:hover {
	background: #f8fafc;
	color: var(--idwl-hero-from);
}

.idwl-wallet .idwl-btn--ghost,
.idwl-wallet a.idwl-btn--ghost {
	--btn-bg-color: rgba(255, 255, 255, 0.12);
	--btn-color: #fff;
	--btn-bd-w: 1px;
	--btn-bd-c: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #fff;
}

.idwl-wallet .idwl-btn--ghost:hover,
.idwl-wallet a.idwl-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.idwl-wallet .idwl-btn--outline,
.idwl-wallet button.idwl-btn--outline {
	--btn-bg-color: var(--idwl-surface);
	--btn-color: var(--idwl-accent);
	--btn-bd-w: 1px;
	--btn-bd-c: var(--idwl-accent);
	background: var(--idwl-surface);
	border: 1px solid var(--idwl-accent);
	color: var(--idwl-accent);
}

.idwl-wallet .idwl-btn--outline:hover,
.idwl-wallet button.idwl-btn--outline:hover {
	background: var(--idwl-accent-soft);
	color: var(--idwl-accent-hover);
}

.idwl-wallet .idwl-btn--block,
.idwl-wallet button.idwl-btn--block {
	display: flex;
	margin-top: 4px;
	width: 100%;
}

.idwl-wallet .idwl-btn:active,
.idwl-wallet button.idwl-btn:active {
	transform: scale(0.98);
}

/* جلوگیری از استایل لینک/دکمه داخل rey-myAccContent */
.woocommerce-account .rey-myAccContent .idwl-wallet button.idwl-btn::after,
.woocommerce-account .rey-myAccContent .idwl-wallet button.idwl-btn::before {
	content: none;
	display: none;
}

.woocommerce-account .rey-myAccContent .idwl-wallet button.idwl-btn.idwl-btn--outline,
.woocommerce-account .rey-myAccContent .idwl-wallet button.idwl-btn.idwl-ref-copy,
.woocommerce .idwl-wallet button.idwl-btn.idwl-btn--outline,
.woocommerce .idwl-wallet button.idwl-btn.idwl-ref-copy {
	--btn-bg-color: #ffffff;
	--btn-color: #2563eb;
	--btn-bd-w: 1px;
	--btn-bd-c: #2563eb;
	--btn-bs-s: solid;
	background-color: #ffffff;
	background-image: none;
	border: 1px solid #2563eb;
	box-shadow: none;
	color: #2563eb;
	opacity: 1;
	text-shadow: none;
	visibility: visible;
}

.woocommerce-account .rey-myAccContent .idwl-wallet button.idwl-btn.idwl-btn--outline:hover,
.woocommerce-account .rey-myAccContent .idwl-wallet button.idwl-btn.idwl-ref-copy:hover,
.woocommerce .idwl-wallet button.idwl-btn.idwl-btn--outline:hover,
.woocommerce .idwl-wallet button.idwl-btn.idwl-ref-copy:hover {
	--btn-bg-color: #eff6ff;
	--btn-color: #1d4ed8;
	background-color: #eff6ff;
	border-color: #1d4ed8;
	color: #1d4ed8;
}

/* ——— تراکنش‌ها ——— */

.idwl-tx-filters {
	background: var(--idwl-accent-soft);
	border: 1px solid var(--idwl-border);
	border-radius: 10px;
	display: inline-flex;
	flex-shrink: 0;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
}

.idwl-tx-filter {
	border-radius: 8px;
	color: var(--idwl-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	padding: 8px 14px;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.idwl-tx-filter:hover {
	color: var(--idwl-text);
}

.idwl-tx-filter.is-active {
	background: var(--idwl-surface);
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
	color: var(--idwl-text);
}

.idwl-tx-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.idwl-tx {
	align-items: center;
	border-bottom: 1px solid var(--idwl-border);
	display: flex;
	gap: 14px;
	padding: 16px 20px;
	transition: background 0.15s;
}

.idwl-tx:last-child {
	border-bottom: none;
}

.idwl-tx:hover {
	background: #f8fafc;
}

.idwl-tx__icon {
	align-items: center;
	border-radius: 50%;
	display: flex;
	flex-shrink: 0;
	height: 42px;
	justify-content: center;
	width: 42px;
}

.idwl-tx--credit .idwl-tx__icon {
	background: var(--idwl-credit-bg);
	color: var(--idwl-credit);
}

.idwl-tx--debit .idwl-tx__icon {
	background: var(--idwl-debit-bg);
	color: var(--idwl-debit);
}

.idwl-tx__icon svg {
	height: 18px;
	width: 18px;
}

.idwl-tx__body {
	flex: 1;
	min-width: 0;
}

.idwl-tx__title {
	color: var(--idwl-text);
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.idwl-tx__transfer-party,
.idwl-tx__source {
	color: var(--idwl-ink, #1d2327);
	font-weight: 600;
}

.idwl-tx__source-link {
	text-decoration: none;
}

.idwl-tx__source-link:hover,
.idwl-tx__source-link:focus {
	text-decoration: underline;
}

.idwl-tx__meta {
	align-items: center;
	color: var(--idwl-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	gap: 4px 6px;
	margin-top: 4px;
}

.idwl-tx__expiry {
	color: var(--idwl-muted);
}

.idwl-tx__dot {
	opacity: 0.5;
}

.idwl-tx__amount {
	direction: ltr;
	flex-shrink: 0;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	white-space: nowrap;
}

.idwl-tx--credit .idwl-tx__amount {
	color: var(--idwl-credit);
}

.idwl-tx--debit .idwl-tx__amount {
	color: var(--idwl-debit);
}

/* ——— لیست پاداش مشتری ——— */

.idwl-cb-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.idwl-cb {
	align-items: center;
	border-bottom: 1px solid var(--idwl-border);
	display: flex;
	gap: 14px;
	justify-content: space-between;
	padding: 16px 20px;
}

.idwl-cb:last-child {
	border-bottom: none;
}

.idwl-cb:hover {
	background: #f8fafc;
}

.idwl-cb__body {
	flex: 1;
	min-width: 0;
}

.idwl-cb__title {
	color: var(--idwl-text);
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.idwl-cb__meta {
	align-items: center;
	color: var(--idwl-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	gap: 4px 6px;
	margin-top: 4px;
}

.idwl-cb__aside {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	gap: 6px;
}

.idwl-cb__amount {
	color: var(--idwl-text);
	direction: ltr;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	white-space: nowrap;
}

.idwl-cb__status {
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	padding: 3px 8px;
}

.idwl-cb__status--active {
	background: var(--idwl-credit-bg);
	color: var(--idwl-credit);
}

.idwl-cb__status--expired,
.idwl-cb__status--revoked {
	background: var(--idwl-debit-bg);
	color: var(--idwl-debit);
}

.idwl-cb__status--consumed {
	background: #f1f5f9;
	color: var(--idwl-muted);
}

/* ——— کد معرف مشتری ——— */

.idwl-sheet__head--sub {
	border-top: 1px solid var(--idwl-border);
	margin-top: 8px;
	padding-top: 16px;
}

.idwl-sheet__title--sm {
	font-size: 15px;
}

.idwl-ref-card {
	border-bottom: 1px solid var(--idwl-border);
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 0 20px 20px;
}

.idwl-ref-card__row {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.idwl-ref-card__label {
	color: var(--idwl-muted);
	font-size: 12px;
	font-weight: 600;
}

.idwl-ref-card__value-wrap {
	align-items: stretch;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.idwl-ref-card__code {
	background: var(--idwl-accent-soft);
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-input-radius);
	color: var(--idwl-text);
	flex: 1;
	font-size: 18px;
	font-weight: 700;
	min-width: 120px;
	padding: 10px 14px;
}

.idwl-ref-card__link {
	background: #f8fafc;
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-input-radius);
	color: var(--idwl-text);
	flex: 1;
	font-size: 13px;
	min-width: 0;
	padding: 10px 14px;
}

.idwl-ref-card .idwl-ref-copy {
	flex-shrink: 0;
	font-size: 14px;
	min-height: 0;
	padding: 10px 16px;
}

.idwl-ref-stats {
	border-bottom: 1px solid var(--idwl-border);
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 16px 20px;
}

.idwl-ref-stat {
	background: #f8fafc;
	border: 1px solid var(--idwl-border);
	border-radius: var(--idwl-radius-sm);
	padding: 12px 14px;
}

.idwl-ref-stat__label {
	color: var(--idwl-muted);
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 4px;
}

.idwl-ref-stat__value {
	color: var(--idwl-text);
	font-size: 16px;
	font-weight: 700;
}

.idwl-ref-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.idwl-ref-item {
	align-items: center;
	border-bottom: 1px solid var(--idwl-border);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 14px 20px;
}

.idwl-ref-item:last-child {
	border-bottom: none;
}

.idwl-ref-item__name {
	color: var(--idwl-text);
	font-size: 14px;
	font-weight: 600;
}

.idwl-ref-item__date {
	color: var(--idwl-muted);
	font-size: 12px;
}

.idwl-ref-checkout-field input {
	width: 100%;
}

.idwl-ref-register-field input {
	border-radius: var(--idwl-input-radius);
}

/* ——— خالی / اعلان / صفحه‌بندی ——— */

.idwl-empty {
	padding: 48px 24px;
	text-align: center;
}

.idwl-empty__icon {
	color: #cbd5e1;
	display: inline-flex;
	margin-bottom: 12px;
}

.idwl-empty__icon svg {
	height: 48px;
	width: 48px;
}

.idwl-empty__text {
	color: var(--idwl-muted);
	font-size: 14px;
	margin: 0;
}

.woocommerce-MyAccount-navigation-link--idwl-wallet.idwl-wc-account-menu-has-icon > a {
	align-items: center;
	display: inline-flex;
	flex-wrap: nowrap;
	gap: 0.55em;
	line-height: 1.4;
	vertical-align: middle;
}

.woocommerce-MyAccount-navigation-link--idwl-wallet.idwl-wc-account-menu-has-icon > a::before {
	align-self: center;
	background-color: transparent;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	display: block;
	flex-shrink: 0;
	height: 1.2em;
	margin: 0;
	mask: none;
	-webkit-mask: none;
	opacity: 1;
	width: 1.2em;
}

.idwl-cashback-cart-notice,
.idwl-cashback-checkout-notice,
.idwl-product-reward-notice {
	margin: 0 0 1.25em;
}

.idwl-product-reward-notice {
	align-items: center;
	background: var(--idwl-pr-bg, transparent);
	border-color: var(--idwl-pr-border-color, transparent);
	border-radius: var(--idwl-pr-radius, 0);
	border-style: solid;
	border-width: var(--idwl-pr-border-width, 0);
	color: var(--idwl-pr-text-color, inherit);
	display: flex;
	flex-wrap: nowrap;
	font-size: var(--idwl-pr-text-size, inherit);
	gap: 0.55em;
	line-height: 1.5;
	padding: var(--idwl-pr-padding, 0);
}

.idwl-product-reward-notice.is-hidden {
	display: none;
}

.idwl-product-reward-notice__icon {
	align-items: center;
	align-self: center;
	color: var(--idwl-pr-icon-color, currentColor);
	display: flex;
	flex-shrink: 0;
	height: var(--idwl-pr-icon-size, 1.25em);
	justify-content: center;
	line-height: 1;
	margin: 0;
	width: var(--idwl-pr-icon-size, 1.25em);
}

.idwl-product-reward-notice__icon svg,
.idwl-product-reward-notice__icon img {
	display: block;
	flex-shrink: 0;
	height: 100%;
	margin: 0;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: 100%;
}

.idwl-product-reward-notice__text {
	align-self: center;
	flex: 1;
	line-height: 1.5;
	min-width: 0;
}

.idwl-product-reward-notice__text p {
	line-height: inherit;
	margin: 0;
}

.idwl-product-reward-notice__text p + p {
	margin-top: 0.5em;
}

.woocommerce-checkout-review-order-table tfoot .idwl-checkout-wallet {
	display: table-row;
}

.idwl-checkout-wallet th {
	font-weight: 600;
	vertical-align: middle;
}

.idwl-checkout-wallet__balance {
	color: var(--idwl-text-muted, #6b7280);
	display: block;
	font-size: 0.85em;
	font-weight: 400;
	margin-top: 0.25em;
}

.idwl-checkout-wallet td {
	vertical-align: middle;
}

.idwl-checkout-wallet.is-busy {
	opacity: 0.65;
	pointer-events: none;
}

.idwl-checkout-wallet .idwl-switch--checkout {
	align-items: center;
	cursor: pointer;
	display: inline-flex;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	vertical-align: middle;
}

.idwl-checkout-wallet .idwl-switch--checkout.is-disabled {
	cursor: not-allowed;
	opacity: 0.55;
	pointer-events: none;
}

.idwl-checkout-wallet .idwl-switch__input {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.idwl-checkout-wallet .idwl-switch__track {
	background: #d1d5db;
	border-radius: 999px;
	display: block;
	flex-shrink: 0;
	height: 26px;
	overflow: hidden;
	position: relative;
	transition: background 0.2s ease;
	width: 48px;
}

.idwl-checkout-wallet .idwl-switch__track::after {
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	content: '';
	height: 20px;
	inset-inline-start: 3px;
	position: absolute;
	top: 3px;
	transition: transform 0.2s ease;
	width: 20px;
}

.idwl-checkout-wallet .idwl-switch__input:checked + .idwl-switch__track {
	background: var(--idwl-accent, #2d6fa8);
}

.idwl-checkout-wallet .idwl-switch__input:checked + .idwl-switch__track::after {
	transform: translateX(22px);
}

[dir="rtl"] .idwl-checkout-wallet .idwl-switch__input:checked + .idwl-switch__track::after {
	transform: translateX(-22px);
}

.idwl-checkout-wallet .idwl-switch__input:focus-visible + .idwl-switch__track {
	outline: 2px solid var(--idwl-accent, #2d6fa8);
	outline-offset: 2px;
}

.idwl-checkout-wallet__amount-wrap {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.65em;
}

.idwl-checkout-wallet__amount-input {
	margin: 0;
	max-width: 140px;
}

.idwl-checkout-wallet__amount-hint {
	color: var(--idwl-text-muted, #6b7280);
	font-size: 0.85em;
}

/* ——— سازگاری با فرم پرداخت بهینهٔ مکمل فروشگاه ——— */

.idwl-checkout-wallet--supplement .ds-mor-summary-label {
	flex-wrap: wrap;
	gap: 4px 8px;
}

.idwl-checkout-wallet--supplement .idwl-checkout-wallet__balance {
	display: block;
	flex-basis: 100%;
	font-size: 12px;
	margin-top: 2px;
}

.idwl-checkout-wallet--supplement .ds-mor-summary-value {
	align-items: center;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.idwl-checkout-wallet--supplement .idwl-checkout-wallet__applied {
	color: #059669;
	font-size: 15px;
	font-weight: 800;
}

.idwl-checkout-wallet--supplement .idwl-switch__track {
	height: 18px;
	width: 36px;
}

.idwl-checkout-wallet--supplement .idwl-switch__track::after {
	height: 14px;
	inset-inline-start: 2px;
	top: 2px;
	width: 14px;
}

.idwl-checkout-wallet--supplement .idwl-switch__input:checked + .idwl-switch__track {
	background: #059669;
}

.idwl-checkout-wallet--supplement .idwl-switch__input:checked + .idwl-switch__track::after {
	transform: translateX(18px);
}

[dir="rtl"] .idwl-checkout-wallet--supplement .idwl-switch__input:checked + .idwl-switch__track::after {
	transform: translateX(-18px);
}

.idwl-checkout-wallet--supplement .idwl-checkout-wallet__amount-wrap--supplement {
	flex-basis: 100%;
	justify-content: flex-end;
	margin-top: 0;
}

.idwl-notice {
	border-radius: var(--idwl-radius-sm);
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 16px;
	padding: 12px 16px;
}

.idwl-notice p {
	margin: 0;
}

.idwl-notice--success {
	background: var(--idwl-credit-bg);
	border: 1px solid #a7f3d0;
	color: #047857;
}

.idwl-notice--error {
	background: var(--idwl-debit-bg);
	border: 1px solid #fecaca;
	color: #b91c1c;
}

.idwl-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	padding: 16px 20px 20px;
}

.idwl-page {
	align-items: center;
	background: var(--idwl-surface);
	border: 1px solid var(--idwl-border);
	border-radius: 8px;
	color: var(--idwl-text);
	display: inline-flex;
	font-size: 13px;
	font-weight: 600;
	height: 38px;
	justify-content: center;
	min-width: 38px;
	text-decoration: none;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.idwl-page:hover {
	border-color: var(--idwl-accent);
	color: var(--idwl-accent);
}

.idwl-page.is-active {
	background: var(--idwl-accent);
	border-color: var(--idwl-accent);
	color: #fff;
}

.idwl-wallet--guest {
	background: var(--idwl-surface);
	border: 1px dashed var(--idwl-border);
	border-radius: var(--idwl-radius-md);
	color: var(--idwl-muted);
	font-size: 14px;
	padding: 40px 24px;
	text-align: center;
}

/* ——— یکپارچگی با حساب کاربری ووکامرس ——— */

.woocommerce-account .woocommerce-MyAccount-content .idwl-wallet {
	margin-top: 0;
}

.woocommerce-MyAccount-navigation-link--idwl-wallet a {
	font-weight: 600;
}

.woocommerce-MyAccount-navigation-link--idwl-wallet.is-active a,
.woocommerce-MyAccount-navigation-link--idwl-wallet a:hover {
	color: var(--idwl-accent, #2563eb);
}

.woocommerce-MyAccount-navigation-link--idwl-wallet.idwl-wc-account-menu-no-icon > a::before {
	content: none;
	display: none;
}

/* ——— موبایل ——— */

@media (max-width: 720px) {
	.idwl-wallet__layout {
		grid-template-columns: 1fr;
		overflow: visible;
	}

	.idwl-wallet__nav {
		border-inline-end: none;
		border-bottom: 1px solid var(--idwl-border);
		flex-direction: row;
		flex-wrap: nowrap;
		max-width: 100%;
		overflow-x: auto;
		padding-block: 10px;
		padding-inline: 5px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		width: 100%;
	}

	.idwl-wallet__nav::-webkit-scrollbar {
		display: none;
	}

	.idwl-wallet__nav-item {
		flex: 0 0 auto;
		flex-direction: column;
		font-size: 11px;
		gap: 4px;
		justify-content: center;
		min-height: 0;
		min-width: 76px;
		padding-block: 10px;
		padding-inline: 8px;
		text-align: center;
		width: auto;
	}

	.woocommerce-account .rey-myAccContent .idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item,
	.idwl-wallet nav.idwl-wallet__nav button.idwl-wallet__nav-item {
		flex: 0 0 auto;
		width: auto;
	}

	.idwl-wallet__nav-item.is-active::after {
		display: none;
	}

	.idwl-wallet__nav-icon {
		order: 0;
	}

	.idwl-wallet__nav-label {
		flex: none;
		text-align: center;
		white-space: nowrap;
	}

	.idwl-wallet[dir="rtl"] .idwl-wallet__nav {
		direction: rtl;
		justify-content: flex-start;
	}

	.idwl-wallet[dir="rtl"] .idwl-wallet__nav-item {
		flex-direction: column;
		text-align: center;
	}

	.idwl-wallet__content {
		padding: 16px;
	}

	.idwl-hero__inner {
		padding: 22px 18px 20px;
	}

	.idwl-hero__actions {
		flex-direction: column;
	}

	.idwl-hero__actions .idwl-btn {
		width: 100%;
	}

	.idwl-sheet {
		padding: 18px 16px;
	}

	.idwl-tx {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.idwl-tx__amount {
		margin-inline-start: 56px;
		width: 100%;
	}
}
