.pww-account {
	--pww-primary: #5b4bdb;
	--pww-primary-dark: #3f34ad;
	--pww-purple-soft: #f3f1ff;
	--pww-success: #059669;
	--pww-danger: #dc2626;
	--pww-warning: #d97706;
	--pww-text: #162033;
	--pww-muted: #667085;
	--pww-line: #e8e9f0;
	direction: rtl;
	color: var(--pww-text);
}

.pww-account * { box-sizing: border-box; }
.pww-account a { text-decoration: none; }

.pww-wallet-hero {
	position: relative;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	min-height: 230px;
	margin-bottom: 16px;
	overflow: hidden;
	border-radius: 26px;
	color: #fff;
	background:
		radial-gradient(circle at 18% 10%, rgba(255,255,255,.16), transparent 28%),
		linear-gradient(135deg, #282171 0%, #5142d1 52%, #796dea 100%);
	box-shadow: 0 24px 55px rgba(64, 52, 173, .24);
}

.pww-wallet-hero::before,
.pww-wallet-hero::after {
	content: "";
	position: absolute;
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 50%;
}

.pww-wallet-hero::before { width: 290px; height: 290px; left: -125px; bottom: -190px; }
.pww-wallet-hero::after { width: 180px; height: 180px; right: 35%; top: -135px; }
.pww-hero-content { position: relative; z-index: 2; display: flex; flex: 1; flex-direction: column; justify-content: center; padding: 31px 34px; }
.pww-hero-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 25px; color: rgba(255,255,255,.82); font-size: 12px; }
.pww-brand-dot { width: 8px; height: 8px; border-radius: 50%; background: #b8ffdb; box-shadow: 0 0 0 5px rgba(184,255,219,.12); }
.pww-status { margin-right: 5px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; font-size: 10px; background: rgba(255,255,255,.1); }
.pww-status.is-disabled { border-color: rgba(255,185,185,.4); background: rgba(180,35,24,.4); }
.pww-balance-label { margin-bottom: 4px; color: rgba(255,255,255,.68); font-size: 12px; }
.pww-balance-value { font-size: clamp(29px, 5vw, 45px); line-height: 1.35; letter-spacing: -.7px; }
.pww-hero-actions { display: flex; align-items: center; gap: 13px; margin-top: 19px; color: rgba(255,255,255,.62); font-size: 10px; }
.pww-primary-action { display: inline-flex; align-items: center; min-height: 37px; padding: 0 15px; border: 1px solid rgba(255,255,255,.32); border-radius: 10px; color: #fff !important; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.13); backdrop-filter: blur(8px); transition: .2s ease; }
.pww-primary-action:hover { background: rgba(255,255,255,.23); transform: translateY(-1px); }
.pww-hero-visual { position: relative; z-index: 1; width: 260px; margin: 26px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.045)); box-shadow: inset 0 1px rgba(255,255,255,.18); transform: rotate(-4deg); backdrop-filter: blur(10px); }
.pww-hero-visual::after { content: ""; position: absolute; width: 140px; height: 140px; left: -60px; bottom: -70px; border-radius: 50%; background: rgba(255,255,255,.07); }
.pww-hero-visual > span { position: absolute; left: 21px; bottom: 16px; font-weight: 800; letter-spacing: 3px; color: rgba(255,255,255,.55); }
.pww-chip { position: absolute; top: 28px; right: 25px; width: 35px; height: 27px; border: 1px solid rgba(255,255,255,.3); border-radius: 7px; background: linear-gradient(135deg, #dec979, #9b7f2f); }
.pww-chip::before,.pww-chip::after { content: ""; position: absolute; background: rgba(255,255,255,.35); }
.pww-chip::before { right: 11px; top: 0; width: 1px; height: 100%; }
.pww-chip::after { top: 12px; right: 0; width: 100%; height: 1px; }
.pww-card-lines { position: absolute; top: 35px; left: 24px; display: flex; gap: 4px; }
.pww-card-lines i { display: block; width: 4px; height: 17px; border-radius: 999px; background: rgba(255,255,255,.25); }

.pww-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 0 0 20px; }
.pww-summary-card { display: flex; align-items: center; min-height: 88px; padding: 16px; border: 1px solid var(--pww-line); border-radius: 16px; background: #fff; box-shadow: 0 8px 25px rgba(16,24,40,.045); }
.pww-summary-card > i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 42px; width: 42px; height: 42px; margin-left: 12px; border-radius: 13px; color: var(--pww-primary); font-style: normal; font-size: 18px; background: var(--pww-purple-soft); }
.pww-summary-card.is-credit > i { color: var(--pww-success); background: #e7f8f1; }
.pww-summary-card.is-debit > i { color: var(--pww-danger); background: #feeeee; }
.pww-summary-card.is-expiry > i { color: var(--pww-warning); background: #fff4df; }
.pww-summary-card span,.pww-summary-card strong,.pww-summary-card small { display: block; }
.pww-summary-card span { margin-bottom: 4px; color: var(--pww-muted); font-size: 10px; }
.pww-summary-card strong { font-size: 15px; }
.pww-summary-card small { margin-top: 3px; color: var(--pww-muted); font-size: 9px; }

.pww-expiry-banner,.pww-disabled-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid #f1d7a6; border-radius: 14px; background: #fff9ed; }
.pww-expiry-banner > span { display: inline-flex; align-items: center; justify-content: center; width: 37px; height: 37px; border-radius: 11px; color: var(--pww-warning); background: #ffedca; }
.pww-expiry-banner strong,.pww-expiry-banner p { display: block; margin: 0; }
.pww-expiry-banner strong { margin-bottom: 2px; font-size: 12px; }
.pww-expiry-banner p { color: #806138; font-size: 10px; line-height: 1.8; }
.pww-disabled-banner { flex-direction: column; align-items: flex-start; border-color: #f4c7c7; background: #fff4f4; }
.pww-disabled-banner strong { color: #b42318; }
.pww-disabled-banner span { color: var(--pww-muted); font-size: 11px; }

.pww-panel { margin: 0 0 20px; padding: 23px; border: 1px solid var(--pww-line); border-radius: 19px; background: #fff; box-shadow: 0 9px 32px rgba(16,24,40,.05); scroll-margin-top: 25px; }
.pww-panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 21px; }
.pww-panel-heading h2 { margin: 0 0 4px; color: var(--pww-text); font-size: 17px; line-height: 1.5; }
.pww-panel-heading p { margin: 0; color: var(--pww-muted); font-size: 10px; line-height: 1.8; }
.pww-heading-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 41px; width: 41px; height: 41px; border-radius: 13px; color: #fff; font-size: 21px; font-weight: 300; background: linear-gradient(135deg, var(--pww-primary), #8276ed); box-shadow: 0 8px 18px rgba(91,75,219,.22); }
.pww-heading-icon.is-history { color: var(--pww-primary); background: var(--pww-purple-soft); box-shadow: none; }
.pww-heading-icon.is-orders { color: var(--pww-success); background: #e8f8f2; box-shadow: none; }
.pww-topup-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); gap: 18px; }
.pww-topup-form { display: flex; flex-direction: column; align-items: stretch; padding: 19px; border: 1px solid #e3e0ff; border-radius: 15px; background: #fbfaff; }
.pww-topup-form > label { margin-bottom: 7px; font-size: 11px; font-weight: 700; }
.pww-amount-field { position: relative; }
.pww-amount-field input { width: 100% !important; height: 50px !important; padding: 9px 14px 9px 65px !important; border: 1px solid #d4d0f2 !important; border-radius: 11px !important; color: var(--pww-text) !important; font-size: 16px !important; font-weight: 700 !important; background: #fff !important; box-shadow: none !important; direction: ltr; text-align: right; }
.pww-amount-field input:focus { border-color: var(--pww-primary) !important; box-shadow: 0 0 0 3px rgba(91,75,219,.11) !important; }
.pww-amount-field > span { position: absolute; left: 12px; top: 50%; padding-right: 10px; border-right: 1px solid var(--pww-line); color: var(--pww-muted); font-size: 11px; transform: translateY(-50%); }
.pww-preset-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; }
.pww-preset-list button { padding: 6px 9px; border: 1px solid #dedbea; border-radius: 8px; color: #555d70; cursor: pointer; font-family: inherit; font-size: 9px; background: #fff; transition: .18s ease; }
.pww-preset-list button:hover,.pww-preset-list button.is-selected { border-color: var(--pww-primary); color: var(--pww-primary); background: var(--pww-purple-soft); }
.pww-hint { margin: 10px 0 14px !important; color: var(--pww-muted); font-size: 9px; line-height: 1.8; }
.pww-submit { display: flex !important; align-items: center; justify-content: space-between; width: 100% !important; min-height: 45px !important; margin: auto 0 0 !important; padding: 0 16px !important; border: 0 !important; border-radius: 10px !important; color: #fff !important; font-family: inherit !important; font-size: 11px !important; font-weight: 700 !important; background: linear-gradient(135deg, var(--pww-primary-dark), var(--pww-primary)) !important; box-shadow: 0 9px 20px rgba(91,75,219,.19) !important; }
.pww-submit:hover { filter: brightness(1.07); transform: translateY(-1px); }
.pww-submit b { font-size: 17px; }
.pww-payment-info { padding: 19px; border: 1px solid var(--pww-line); border-radius: 15px; background: #fff; }
.pww-payment-info > strong { display: block; margin-bottom: 7px; font-size: 12px; }
.pww-payment-info > p { margin: 0 0 14px; color: var(--pww-muted); font-size: 10px; line-height: 1.9; }
.pww-gateways { display: flex; flex-wrap: wrap; gap: 6px; }
.pww-gateways em { padding: 5px 8px; border-radius: 7px; color: var(--pww-primary); font-style: normal; font-size: 9px; background: var(--pww-purple-soft); }

.pww-table-wrap { overflow-x: auto; }
.pww-table { width: 100%; margin: 0 !important; border: 0 !important; border-collapse: separate; border-spacing: 0; font-size: 11px; }
.pww-table th { padding: 10px 11px; border: 0 !important; border-bottom: 1px solid var(--pww-line) !important; color: var(--pww-muted); font-size: 9px; font-weight: 600; text-align: right; white-space: nowrap; background: #fafbfc; }
.pww-table th:first-child { border-radius: 0 9px 9px 0; }
.pww-table th:last-child { border-radius: 9px 0 0 9px; }
.pww-table td { padding: 14px 11px !important; border: 0 !important; border-bottom: 1px solid #f0f1f5 !important; vertical-align: middle; }
.pww-table tbody tr { transition: background .18s ease; }
.pww-table tbody tr:hover { background: #fcfcff; }
.pww-table td:nth-child(2) strong,.pww-table td:nth-child(2) small,.pww-table td:nth-child(2) a,.pww-tx-expiry { display: block; }
.pww-table td:nth-child(2) small { margin-top: 3px; color: var(--pww-muted); font-size: 9px; }
.pww-table td:nth-child(2) a { margin-top: 4px; color: var(--pww-primary); font-size: 9px; }
.pww-tx-id { display: inline-flex; padding: 4px 7px; border-radius: 7px; color: #687085; font-size: 9px; background: #f3f4f7; direction: ltr; }
.pww-tx-expiry { margin-top: 5px; color: var(--pww-warning); font-size: 8px; }
.pww-amount { direction: ltr; text-align: right; white-space: nowrap; font-weight: 800; }
.pww-amount.is-credit { color: var(--pww-success); }
.pww-amount.is-debit { color: var(--pww-danger); }
.pww-table time { display: block; color: #444b5d; white-space: nowrap; }
.pww-table time small { display: block; margin-top: 2px; color: #98a0b1; font-size: 8px; direction: ltr; text-align: right; }
.pww-pagination { display: flex; justify-content: center; gap: 5px; margin-top: 19px; }
.pww-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--pww-line); border-radius: 9px; color: var(--pww-text); font-size: 10px; background: #fff; }
.pww-pagination .current { border-color: var(--pww-primary); color: #fff; background: var(--pww-primary); }
.pww-empty { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 130px; padding: 22px; border: 1px dashed #d8dae3; border-radius: 13px; color: var(--pww-muted); text-align: center; background: #fbfcfd; }
.pww-empty i { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 11px; color: var(--pww-primary); font-style: normal; background: var(--pww-purple-soft); }
.pww-empty strong { margin-bottom: 4px; color: #424a5d; font-size: 11px; }
.pww-empty span { font-size: 9px; }

.pww-order-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.pww-order-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--pww-line); border-radius: 14px; color: var(--pww-text) !important; background: linear-gradient(145deg,#fff,#fdfdff); transition: .2s ease; }
.pww-order-card:hover { border-color: #cfcaff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(67,56,202,.075); }
.pww-order-top { display: flex; align-items: center; justify-content: space-between; }
.pww-order-top span { color: var(--pww-primary); font-size: 10px; font-weight: 700; direction: ltr; }
.pww-order-top em { padding: 4px 7px; border-radius: 999px; color: var(--pww-success); font-style: normal; font-size: 8px; background: #e9f8f2; }
.pww-order-card > strong { margin-top: 4px; font-size: 15px; }
.pww-order-card > small { color: #5d6577; font-size: 9px; }
.pww-order-card > time { color: #98a0b1; font-size: 8px; }

.pww-checkout-amount { margin-top: 12px; padding: 14px; border: 1px solid #ddd9ff; border-radius: 11px; background: #f8f7ff; }
.pww-checkout-amount p { margin: 0 0 8px !important; }
.pww-checkout-amount input { width: 100% !important; max-width: 270px !important; }
.pww-checkout-amount small { display: block; color: var(--pww-muted); line-height: 1.8; }

/* Cashback cart promotion. Namespaced to avoid theme and extension conflicts. */
.pww-cashback-bar {
	--pww-cashback-accent: #6d4aff;
	--pww-cashback-accent-dark: #4a2dc0;
	--pww-cashback-soft: #f3f0ff;
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 15px;
	width: 100%;
	margin: 0 0 24px;
	padding: 18px 19px;
	overflow: hidden;
	border: 1px solid #ded7ff;
	border-radius: 18px;
	direction: rtl;
	color: #211a42;
	font-family: inherit;
	background:
		radial-gradient(circle at 0 0, rgba(109,74,255,.13), transparent 32%),
		linear-gradient(135deg, #fff 0%, #faf8ff 100%);
	box-shadow: 0 12px 32px rgba(53, 36, 126, .09);
	box-sizing: border-box;
}

.pww-cashback-bar::after {
	content: "";
	position: absolute;
	left: -30px;
	top: -45px;
	width: 120px;
	height: 120px;
	border: 1px solid rgba(109,74,255,.1);
	border-radius: 50%;
	pointer-events: none;
}

.pww-cashback-bar * { box-sizing: border-box; }
.pww-cashback-bar.is-qualified {
	--pww-cashback-accent: #059669;
	--pww-cashback-accent-dark: #047857;
	--pww-cashback-soft: #e9f9f2;
	border-color: #b8ead5;
	color: #123d30;
	background:
		radial-gradient(circle at 0 0, rgba(5,150,105,.12), transparent 32%),
		linear-gradient(135deg, #fff 0%, #f3fcf8 100%);
	box-shadow: 0 12px 32px rgba(5, 111, 78, .09);
}

.pww-cashback-icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 15px;
	color: var(--pww-cashback-accent);
	background: var(--pww-cashback-soft);
	box-shadow: inset 0 0 0 1px rgba(109,74,255,.08);
}

.pww-cashback-icon svg { width: 25px; height: 25px; fill: currentColor; }
.pww-cashback-copy { position: relative; z-index: 1; min-width: 0; }
.pww-cashback-copy > strong {
	display: block;
	margin: 0 0 4px;
	color: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.9;
}

.pww-cashback-copy > strong .woocommerce-Price-amount { color: var(--pww-cashback-accent-dark); }
.pww-cashback-copy > span { display: block; color: #6d6880; font-size: 11px; line-height: 1.8; }
.pww-cashback-bar.is-qualified .pww-cashback-copy > span { color: #557369; }
.pww-cashback-progress {
	position: relative;
	width: min(430px, 100%);
	height: 6px;
	margin-top: 10px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(109,74,255,.1);
}

.pww-cashback-progress > i {
	display: block;
	width: var(--pww-cashback-progress, 0%);
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--pww-cashback-accent-dark), var(--pww-cashback-accent));
	box-shadow: 0 0 12px rgba(109,74,255,.24);
	transition: width .35s ease;
}

.pww-cashback-badge {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 31px;
	padding: 5px 11px;
	border: 1px solid rgba(109,74,255,.15);
	border-radius: 999px;
	color: var(--pww-cashback-accent-dark);
	font-size: 10px;
	font-weight: 800;
	white-space: nowrap;
	background: var(--pww-cashback-soft);
}

/* Persian readability: keep secondary copy compact without sacrificing legibility. */
.pww-summary-card span,.pww-panel-heading p,.pww-payment-info > p { font-size: 11px; }
.pww-table { font-size: 12px; }
.pww-table th,.pww-table td:nth-child(2) small,.pww-table td:nth-child(2) a { font-size: 10px; }
.pww-hint,.pww-order-card > small { font-size: 10px; }
.pww-empty strong { font-size: 12px; }
.pww-empty span { font-size: 10px; }

@media (max-width: 760px) {
	.pww-wallet-hero { min-height: 205px; border-radius: 21px; }
	.pww-hero-content { padding: 25px; }
	.pww-hero-visual { width: 185px; margin: 24px 20px; }
	.pww-summary-grid { grid-template-columns: 1fr 1fr; }
	.pww-summary-card.is-expiry { grid-column: 1 / -1; }
	.pww-topup-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
	.pww-cashback-bar { grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 15px; border-radius: 15px; }
	.pww-cashback-icon { width: 43px; height: 43px; border-radius: 13px; }
	.pww-cashback-copy > strong { font-size: 12px; line-height: 1.8; }
	.pww-cashback-copy > span { font-size: 10px; }
	.pww-cashback-badge { grid-column: 2; justify-self: start; margin-top: -4px; }
	.pww-wallet-hero { min-height: 220px; }
	.pww-hero-visual { position: absolute; left: -75px; top: 24px; width: 190px; height: 155px; opacity: .65; }
	.pww-hero-content { padding: 23px; }
	.pww-hero-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
	.pww-balance-value { font-size: 29px; }
	.pww-summary-grid { grid-template-columns: 1fr; }
	.pww-summary-card.is-expiry { grid-column: auto; }
	.pww-panel { padding: 17px; border-radius: 15px; }
	.pww-panel-heading { align-items: flex-start; }
	.pww-topup-form,.pww-payment-info { padding: 14px; }
	.pww-order-grid { grid-template-columns: 1fr; }
	.pww-table thead { display: none; }
	.pww-table,.pww-table tbody,.pww-table tr,.pww-table td { display: block; width: 100%; }
	.pww-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 0; border-bottom: 1px solid var(--pww-line); }
	.pww-table td { padding: 7px 3px !important; border: 0 !important; }
	.pww-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--pww-muted); font-size: 8px; }
	.pww-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
	.pww-table td:nth-child(1) { display: none; }
	.pww-amount { text-align: right; }
}
