/* Digi Wallet — front-end (account page + cart/checkout bits), RTL */

.dw-account {
	max-width: 760px;
}

.dw-hero {
	background: linear-gradient(135deg, #51ccc3, #3aa89f);
	border-radius: 14px;
	padding: 26px 28px;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}

.dw-hero-main,
.dw-hero-side {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dw-hero-label {
	font-size: 13px;
	opacity: .9;
}

.dw-hero-balance {
	font-size: 30px;
	font-weight: 800;
}

.dw-hero-sub {
	font-size: 18px;
	font-weight: 700;
}

.dw-card {
	background: #fff;
	border: 1px solid #eaeaea;
	border-radius: 12px;
	padding: 20px 22px;
	margin-bottom: 18px;
}

.dw-card h3 {
	margin-top: 0;
	font-size: 16px;
}

.dw-hint {
	color: #888;
	font-size: 12px;
	margin: 4px 0 14px;
}

.dw-forms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
	margin-bottom: 18px;
}

.dw-form .dw-field {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.dw-form .dw-field input {
	flex: 1;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #ddd;
}

.dw-button {
	background: #51ccc3 !important;
	border-color: #51ccc3 !important;
	color: #fff !important;
	white-space: nowrap;
}

.dw-button:hover {
	background: #3aa89f !important;
	border-color: #3aa89f !important;
}

.dw-empty {
	color: #999;
	text-align: center;
	padding: 24px 0;
}

.dw-table-wrap {
	overflow-x: auto;
}

.dw-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.dw-table th,
.dw-table td {
	padding: 10px 8px;
	text-align: right;
	border-bottom: 1px solid #f2f2f2;
}

.dw-table thead th {
	color: #999;
	font-weight: 600;
	font-size: 12px;
}

.dw-nowrap {
	white-space: nowrap;
}

.dw-amount {
	font-weight: 700;
}

.dw-amount.dw-credit {
	color: #1a8754;
}

.dw-amount.dw-debit {
	color: #d63638;
}

.dw-chip {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	background: #f2f2f2;
	color: #555;
}

.dw-chip-cashback {
	background: #e6f7f5;
	color: #0f766e;
}

.dw-chip-topup {
	background: #eef2ff;
	color: #4338ca;
}

.dw-chip-partial_payment {
	background: #fff4e5;
	color: #b45309;
}

.dw-chip-transfer {
	background: #f3e8ff;
	color: #7e22ce;
}

.dw-chip-refund {
	background: #ffe4e6;
	color: #be123c;
}

.dw-pagination {
	display: flex;
	gap: 4px;
	justify-content: center;
	margin-top: 16px;
}

.dw-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	border-radius: 8px;
	text-decoration: none;
	color: #555;
	border: 1px solid #eaeaea;
}

.dw-page-current {
	background: #51ccc3;
	color: #fff;
	border-color: #51ccc3;
}

.dw-tiers .dw-hint {
	margin-bottom: 20px;
}

.dw-tiers .dw-tier-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.dw-tiers .dw-tier-list li {
	flex: 1;
	min-width: 140px;
	background: #f7fdfc;
	border: 1px solid #d7f2ef;
	border-radius: 10px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: center;
}

.dw-tier-percent {
	font-size: 22px;
	font-weight: 800;
	color: #0f766e;
}

.dw-tier-range {
	font-size: 12px;
	color: #666;
}

/* Cart/checkout cashback banner */
.dw-cart-cashback {
	background: #f7fdfc;
	border: 1px solid #d7f2ef;
	color: #0f766e;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 12px;
	font-size: 13px;
}

/* Use-my-balance toggle row */
.dw-toggle-row th {
	vertical-align: middle;
}

.dw-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

/*
 * Icon for «کیف پول من» in the My Account sidebar/off-canvas nav. The theme's
 * own stylesheet already draws every other item's icon this way but only for
 * the old wallet-plugin's endpoint slug (`--woo-wallet` / `--woo_wallet`);
 * this plugin's endpoint is `--my-wallet`, so it needs its own rule.
 *
 * A self-contained inline SVG rather than a font glyph, so it never depends
 * on which icon font the theme happens to have loaded; !important guards
 * against an equally-specific theme rule loading after this one.
 */
.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--my-wallet:before {
	content: "" !important;
	display: inline-block !important;
	width: 18px !important;
	height: 18px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M21 7H5a1 1 0 0 1 0-2h14a1 1 0 0 0 0-2H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h16a2 2 0 0 0 2-2v-9a3 3 0 0 0-3-3Zm-3 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-size: contain !important;
}
