/* ===== باکس «استفاده از کیف پول» (سبد خرید/چک‌اوت) ===== */

.wbkb-wallet-deduction-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	background: #f5f9ff;
	border: 1px solid #d7e6fb;
	border-radius: 10px;
	padding: 14px 16px;
	margin: 0 0 20px;
}

.wbkb-wallet-deduction-info {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	flex: 1 1 260px;
}

.wbkb-wallet-deduction-info .dashicons {
	color: var(--wbkb-color-primary, #093c75);
	font-size: 22px;
	width: 22px;
	height: 22px;
	margin-top: 2px;
}

.wbkb-wallet-deduction-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wbkb-wallet-deduction-text strong {
	color: #1b2a3c;
	font-size: 14px;
}

.wbkb-wallet-deduction-text span {
	font-size: 12.5px;
	color: #5b6b7d;
	line-height: 1.7;
}

.wbkb-wallet-deduction-full-msg,
.wbkb-wallet-deduction-partial-msg {
	display: none;
}

.wbkb-wallet-deduction-box[data-covers-full="1"] .wbkb-wallet-deduction-full-msg {
	display: block;
}

.wbkb-wallet-deduction-box[data-covers-full="0"] .wbkb-wallet-deduction-partial-msg {
	display: block;
}

.wbkb-wallet-deduction-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

.wbkb-wallet-deduction-toggle input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wbkb-wallet-toggle-slider {
	position: relative;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: #cbd5e1;
	transition: background .2s ease;
	flex-shrink: 0;
}

.wbkb-wallet-toggle-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	right: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

.wbkb-wallet-deduction-toggle input:checked + .wbkb-wallet-toggle-slider {
	background: var(--wbkb-color-primary, #093c75);
}

.wbkb-wallet-deduction-toggle input:checked + .wbkb-wallet-toggle-slider::before {
	transform: translateX(-18px);
}

.wbkb-wallet-toggle-label {
	font-size: 13px;
	font-weight: 600;
	color: #1b2a3c;
}

.wbkb-wallet-deduction-error {
	flex-basis: 100%;
	color: #dc2626;
	font-size: 12.5px;
}

.wbkb-wallet-deduction-error:empty {
	display: none;
}

.wbkb-wallet-deduction-box.is-loading {
	opacity: .6;
	pointer-events: none;
}

/* ===== فرم شارژ کیف پول ===== */

.wbkb-wallet-topup-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wbkb-wallet-balance-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f5f9ff;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 14px;
}

.wbkb-wallet-balance-row strong {
	color: var(--wbkb-color-primary, #093c75);
	font-size: 16px;
}

.wbkb-wallet-presets {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

/* دکمه‌های مبالغ پیش‌فرض عمداً طوسی/خنثی‌اند (طبق درخواست صریح کارفرما) —
   فقط دکمه پرداخت نهایی (wbkb-wallet-topup-submit) باید رنگ تم را بگیرد،
   تا چشم کاربر مستقیم به تنها اقدام واقعی (پرداخت) هدایت شود. */
.wbkb-wallet-preset-btn {
	border: 1.5px solid #e2e5e9;
	background: #f1f2f4;
	border-radius: 8px;
	padding: 12px 8px;
	font-size: 14px;
	font-weight: 600;
	color: #4b5563;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.wbkb-wallet-preset-btn:hover {
	border-color: #c3c9d1;
	background: #e7e9ec;
}

.wbkb-wallet-preset-btn.is-active {
	border-color: #9aa2ad;
	background: #dde1e6;
	color: #1b2a3c;
}

.wbkb-wallet-custom-amount {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wbkb-wallet-custom-amount label {
	font-size: 13px;
	color: #5b6b7d;
}

.wbkb-wallet-amount-input {
	border: 1.5px solid #d7e0ea !important;
	border-radius: 8px !important;
	padding: 10px 12px !important;
	font-size: 15px !important;
	width: 100% !important;
	box-sizing: border-box;
}

.wbkb-wallet-amount-input:focus {
	border-color: var(--wbkb-color-primary, #093c75) !important;
	outline: none;
}

.wbkb-wallet-min-max-hint {
	margin: 0;
	font-size: 12px;
	color: #8a97a6;
}

.wbkb-wallet-topup-error {
	color: #dc2626;
	font-size: 13px;
}

.wbkb-wallet-topup-error:empty {
	display: none;
}

.wbkb-wallet-topup-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--wbkb-color-primary, #093c75) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 8px !important;
	padding: 13px 16px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	cursor: pointer;
	width: 100%;
}

.wbkb-wallet-topup-submit:disabled {
	cursor: default;
}

/* حالت لودینگ: کنترل با یک کلاس واحد (is-loading) روی خودِ دکمه، نه
   ترکیب jQuery hide()/show() + attribute hidden روی دو المان جدا (که
   باعث رفتار ناهماهنگ/شکسته می‌شد). طبق درخواست صریح کارفرما، متن دکمه
   در حالت لودینگ کاملاً مخفی می‌شود و فقط اسپینر (به‌تنهایی، وسط‌چین با
   همان justify-content:center خودِ دکمه) نمایش داده می‌شود؛ با پایان
   لودینگ، متن دوباره ظاهر و اسپینر مخفی می‌شود. */
.wbkb-wallet-topup-submit.is-loading .wbkb-wallet-topup-submit-text,
.wbkb-wallet-withdrawal-submit.is-loading .wbkb-wallet-withdrawal-submit-text {
	display: none;
}

.wbkb-wallet-topup-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	animation: wbkb-wallet-spin .7s linear infinite;
	flex-shrink: 0;
}

.is-loading .wbkb-wallet-topup-spinner {
	display: inline-block;
}

@keyframes wbkb-wallet-spin {
	to { transform: rotate(360deg); }
}

.wbkb-wallet-guest-notice {
	color: #5b6b7d;
	font-size: 14px;
	margin: 0 0 8px;
}

.wbkb-wallet-login-link {
	display: inline-block;
	background: var(--wbkb-color-primary, #093c75);
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

/* ===== دکمه/مودال شارژ (شورت‌کد و ویجت) ===== */

.wbkb-wallet-topup-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--wbkb-color-primary, #093c75);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 12px 22px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

/* شورت‌کد پوششی [wbkb_wallet_topup_trigger] — عمداً بدون هیچ استایل
   بصری تحمیلی (رنگ/پس‌زمینه/padding) روی محتوای پیچیده‌شده، چون آن محتوا
   می‌تواند هر چیزی باشد (متن ساده، تصویر، دکمه‌ی دیگر). */
.wbkb-wallet-topup-trigger-wrap {
	display: inline-block;
	cursor: pointer;
}

.wbkb-wallet-modal-title {
	margin: 0 0 18px;
	font-size: 18px;
	color: #1b2a3c;
}

/* ===== جدول تراکنش‌ها ===== */

.wbkb-wallet-transactions-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.wbkb-wallet-transactions-table th,
.wbkb-wallet-transactions-table td {
	padding: 10px 12px;
	text-align: right;
	border-bottom: 1px solid #eef1f4;
}

.wbkb-wallet-transactions-table th {
	background: #f7f9fb;
	font-weight: 700;
	color: #47566a;
}

.wbkb-wallet-type {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.wbkb-wallet-type--credit {
	background: #e7f7ee;
	color: #1a9e52;
}

.wbkb-wallet-type--debit {
	background: #fdeceb;
	color: #dc2626;
}

.wbkb-wallet-pagination {
	display: flex;
	gap: 6px;
	margin-top: 14px;
	flex-wrap: wrap;
}

.wbkb-wallet-pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid #d7e0ea;
	text-decoration: none;
	color: #1b2a3c;
	font-size: 13px;
}

.wbkb-wallet-pagination a.active {
	background: var(--wbkb-color-primary, #093c75);
	border-color: var(--wbkb-color-primary, #093c75);
	color: #fff;
}

/* ===== تب «کیف پول من» در حساب کاربری ===== */

.wbkb-wallet-myaccount-balance {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f5f9ff;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 16px;
}

.wbkb-wallet-myaccount-balance strong {
	font-size: 20px;
	color: var(--wbkb-color-primary, #093c75);
}

.wbkb-wallet-myaccount-actions {
	margin-bottom: 24px;
}

.wbkb-wallet-myaccount-heading {
	font-size: 16px;
	margin: 0 0 12px;
}

.wbkb-wallet-locked-notice {
	background: #fdeceb;
	color: #b91c1c;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13.5px;
	margin-bottom: 20px;
}

/* ===== فرم درخواست برداشت ===== */

.wbkb-wallet-withdrawal-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wbkb-wallet-withdrawal-instructions {
	background: #f5f9ff;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	color: #47566a;
	margin: 0;
}

.wbkb-wallet-withdrawal-pending-notice {
	background: #fff7e6;
	color: #92400e;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13.5px;
}

.wbkb-wallet-withdrawal-net-preview {
	margin: 4px 0 0;
	font-size: 12.5px;
	color: #1a9e52;
}

.wbkb-wallet-withdrawal-error {
	color: #dc2626;
	font-size: 13px;
}

.wbkb-wallet-withdrawal-error:empty {
	display: none;
}

.wbkb-wallet-withdrawal-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--wbkb-color-primary, #093c75) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 8px !important;
	padding: 13px 16px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	cursor: pointer;
	width: 100%;
}

.wbkb-wallet-withdrawal-submit:disabled {
	cursor: default;
}

.wbkb-wallet-withdrawal-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.wbkb-wallet-withdrawal-status--pending {
	background: #fff7e6;
	color: #92400e;
}

.wbkb-wallet-withdrawal-status--approved {
	background: #e7f7ee;
	color: #1a9e52;
}

.wbkb-wallet-withdrawal-status--rejected {
	background: #fdeceb;
	color: #dc2626;
}

/* ===== نمایش در صفحه سفارش (ادمین/مشتری) ===== */

.wbkb-wallet-order-note {
	background: #f5f9ff;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13.5px;
	color: #1b2a3c;
}

.wbkb-wallet-order-refunded {
	color: #1a9e52;
	font-size: 12.5px;
}
