/* قسط‌ساز — Frontend UI (modern / minimal) */

:root {
	--nip-ink: #0c2a3d;
	--nip-ink-soft: #355266;
	--nip-muted: #6a8494;
	--nip-line: #dce7ee;
	--nip-line-soft: #eaf1f5;
	--nip-surface: #ffffff;
	--nip-surface-2: #f4f8fb;
	--nip-accent: #0f7a84;
	--nip-accent-2: #0f3a4f;
	--nip-accent-soft: rgba(15, 122, 132, 0.12);
	--nip-ok: #1a7d43;
	--nip-ok-bg: #e8f7ee;
	--nip-warn: #9a6b00;
	--nip-warn-bg: #fff6df;
	--nip-danger: #b32d2e;
	--nip-danger-bg: #fdecea;
	--nip-info: #1d4e9e;
	--nip-info-bg: #eaf1fc;
	--nip-radius: 16px;
	--nip-radius-sm: 12px;
	--nip-shadow: 0 12px 30px rgba(12, 42, 61, 0.07);
	--nip-font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
}

/* ---------- Product widget ---------- */
.nip-product-widget {
	margin: 22px 0;
	padding: 0;
	border: 1px solid var(--nip-line);
	border-radius: var(--nip-radius);
	background:
		radial-gradient(420px 180px at 100% 0%, rgba(15, 122, 132, 0.1), transparent 70%),
		var(--nip-surface);
	box-shadow: var(--nip-shadow);
	overflow: hidden;
	direction: rtl;
	text-align: right;
	font-family: var(--nip-font);
	color: var(--nip-ink);
}

.nip-product-widget .nip-badge {
	margin: 18px 18px 8px;
}

.nip-widget-lead {
	margin: 0 18px 4px;
	font-size: 13.5px;
	font-weight: 800;
	color: var(--nip-ink);
}

.nip-badge,
.nip-loop-badge {
	display: inline-flex;
	align-items: center;
	background: var(--nip-accent-2);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	padding: 6px 14px;
	border-radius: 999px;
	letter-spacing: 0;
}

.nip-loop-badge {
	margin: 6px 0;
	font-size: 11px;
	padding: 4px 12px;
}

.nip-plan-table {
	width: calc(100% - 36px);
	margin: 10px 18px 8px;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--nip-line);
	border-radius: var(--nip-radius-sm);
	overflow: hidden;
	background: #fff;
}

.nip-plan-table th,
.nip-plan-table td {
	padding: 12px 10px;
	text-align: center;
	font-size: 13px;
	border-bottom: 1px solid var(--nip-line-soft);
	color: var(--nip-ink);
}

.nip-plan-table thead th {
	background: var(--nip-surface-2);
	color: var(--nip-ink-soft);
	font-weight: 800;
	font-size: 12px;
}

.nip-plan-table tbody tr:last-child td {
	border-bottom: none;
}

.nip-plan-table tbody tr:hover td {
	background: #f8fbfd;
}

.nip-note {
	font-size: 12.5px;
	color: var(--nip-muted);
	margin: 8px 18px 18px;
	line-height: 1.9;
	font-weight: 600;
}

/* ---------- Checkout ---------- */
.nip-checkout-box {
	margin: 12px 0;
	padding: 18px;
	border: 1px solid var(--nip-line);
	border-radius: var(--nip-radius);
	background:
		radial-gradient(420px 180px at 0% 0%, rgba(15, 122, 132, 0.08), transparent 70%),
		var(--nip-surface);
	box-shadow: var(--nip-shadow);
	direction: rtl;
	text-align: right;
	font-family: var(--nip-font);
	color: var(--nip-ink);
	/* Beat default WooCommerce theme inheritance (Storefront / no theme). */
	font-size: 15px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

.nip-checkout-box .nip-badge {
	color: #fff;
}

.nip-checkout-box .woocommerce-Price-amount,
.nip-checkout-box .woocommerce-Price-currencySymbol,
.nip-breakdown-list .woocommerce-Price-amount,
.nip-breakdown-list .woocommerce-Price-currencySymbol,
.nip-credit-info .woocommerce-Price-amount,
.nip-credit-info .woocommerce-Price-currencySymbol {
	color: inherit !important;
	font-weight: inherit;
	letter-spacing: normal;
	unicode-bidi: plaintext;
}

.nip-credit-info strong,
.nip-breakdown-list strong {
	color: var(--nip-ink);
	font-weight: 800;
}

.nip-min-down-note {
	direction: rtl;
	unicode-bidi: plaintext;
}

.nip-checkout-box .nip-checkout-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.nip-checkout-box .nip-checkout-title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: var(--nip-ink);
}

.nip-checkout-box.nip-suspended {
	border-color: #f0c2bf;
	background: var(--nip-danger-bg);
	color: var(--nip-danger);
}

.nip-checkout-box label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 800;
	color: var(--nip-ink-soft);
}

.nip-checkout-box select,
.nip-checkout-box input[type="number"],
.nip-checkout-box input[type="text"] {
	width: 100%;
	max-width: 360px;
	min-height: 44px;
	padding: 10px 14px;
	margin: 0 0 8px;
	border: 1px solid var(--nip-line);
	border-radius: 12px;
	background: #fff;
	color: var(--nip-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nip-checkout-box select:focus,
.nip-checkout-box input:focus {
	border-color: var(--nip-accent);
	box-shadow: 0 0 0 3px var(--nip-accent-soft);
	outline: none;
}

.nip-credit-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--nip-ok-bg);
	color: var(--nip-ok);
	font-weight: 800;
	font-size: 13.5px;
}

.nip-min-down-note {
	color: var(--nip-accent);
	font-weight: 700;
	font-size: 12.5px;
	margin-top: 0;
}

.nip-plan-select {
	display: grid;
	gap: 8px;
}

.nip-breakdown-list {
	list-style: none;
	margin: 14px 0 0;
	padding: 4px 16px;
	background: var(--nip-surface-2);
	border: 1px solid var(--nip-line);
	border-radius: var(--nip-radius-sm);
}

.nip-breakdown-list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 1px dashed #d5e1e8;
	padding: 11px 0;
	font-size: 13.5px;
	color: var(--nip-ink);
	font-weight: 600;
}

.nip-breakdown-list li:last-child {
	border-bottom: none;
	font-weight: 800;
}

.nip-breakdown-list li:last-child strong {
	color: var(--nip-accent);
}

/* Cheque uploads */
.nip-check-uploads h4 {
	margin: 18px 0 8px;
	font-size: 14.5px;
	font-weight: 800;
	color: var(--nip-ink);
}

.nip-check-row {
	border: 1px solid var(--nip-line);
	border-radius: var(--nip-radius-sm);
	padding: 14px;
	margin: 10px 0;
	background: #fff;
	box-shadow: 0 6px 18px rgba(12, 42, 61, 0.04);
}

.nip-check-row label {
	font-weight: 800;
	display: block;
	margin-bottom: 8px;
	color: var(--nip-ink);
	font-size: 13.5px;
}

.nip-check-amount {
	color: var(--nip-ok);
	font-weight: 800;
	font-size: 12.5px;
}

.nip-check-status {
	display: inline-block;
	margin-right: 8px;
	font-size: 12px;
	font-weight: 700;
}

/* Status pills */
.nip-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 800;
	white-space: nowrap;
	line-height: 1.7;
}

.nip-pill--paid { background: var(--nip-ok-bg); color: var(--nip-ok); }
.nip-pill--pending { background: var(--nip-warn-bg); color: var(--nip-warn); }
.nip-pill--partial { background: var(--nip-info-bg); color: var(--nip-info); }
.nip-pill--upcoming { background: #eef3f6; color: #4b6675; }
.nip-pill--overdue { background: var(--nip-danger-bg); color: var(--nip-danger); }
.nip-pill--cancelled { background: #eef1f3; color: #6b7780; }

/* My installments */
.nip-installments-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--nip-line);
	border-radius: var(--nip-radius);
	overflow: hidden;
	box-shadow: var(--nip-shadow);
	font-family: var(--nip-font);
	background: #fff;
}

.nip-installments-table th,
.nip-installments-table td {
	border: none;
	border-bottom: 1px solid var(--nip-line-soft);
	padding: 13px 11px;
	text-align: center;
	font-size: 13.5px;
	color: var(--nip-ink);
}

.nip-installments-table thead th {
	background: var(--nip-surface-2);
	color: var(--nip-ink-soft);
	font-weight: 800;
	font-size: 12px;
}

.nip-installments-table tbody tr:last-child td {
	border-bottom: none;
}

.nip-installments-table tr.nip-status-paid td { background: #f7fcf9; }
.nip-installments-table tr.nip-status-overdue td { background: #fdf7f6; }
.nip-installments-table tr.nip-status-upcoming td { background: #f8fbfd; }
.nip-installments-table tr.nip-status-partial td { background: #f7faff; }

.nip-installments-table .button {
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	padding: 7px 16px;
	background: var(--nip-accent-2);
	color: #fff;
	border: none;
	text-decoration: none;
	display: inline-block;
	transition: background 0.15s ease;
}

.nip-installments-table .button:hover {
	background: var(--nip-accent);
	color: #fff;
}

/* Account credit */
.nip-account-credit,
.nip-dashboard-credit {
	border: 1px solid var(--nip-line);
	border-radius: var(--nip-radius);
	padding: 20px;
	margin: 18px 0;
	background:
		radial-gradient(420px 180px at 100% 0%, rgba(15, 122, 132, 0.1), transparent 70%),
		linear-gradient(160deg, #ffffff, #f3f9f9);
	direction: rtl;
	text-align: right;
	box-shadow: var(--nip-shadow);
	font-family: var(--nip-font);
	color: var(--nip-ink);
}

.nip-account-credit h3,
.nip-dashboard-credit h3 {
	margin: 0 0 14px;
	color: var(--nip-ink);
	font-size: 17px;
	font-weight: 800;
}

.nip-account-credit ul,
.nip-credit-summary {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nip-credit-summary li,
.nip-account-credit ul li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 1px dashed #d5e1e8;
	padding: 11px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--nip-ink);
}

.nip-credit-summary li:last-child,
.nip-account-credit ul li:last-child {
	border-bottom: none;
}

.nip-credit-summary li.nip-credit-available strong {
	color: var(--nip-ok);
	font-size: 16px;
	font-weight: 800;
}

.nip-dashboard-credit a {
	display: inline-flex;
	margin-top: 12px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--nip-accent-2);
	color: #fff !important;
	font-weight: 800;
	text-decoration: none;
	font-size: 13px;
}

.nip-dashboard-credit a:hover {
	background: var(--nip-accent);
}

.nip-suspended-note {
	color: var(--nip-danger);
	font-weight: 800;
	background: var(--nip-danger-bg);
	border-radius: 12px;
	padding: 11px 14px;
	font-size: 13px;
}

/* English (LTR) */
body.nip-ltr .nip-product-widget,
body.nip-ltr .nip-checkout-box,
body.nip-ltr .nip-account-credit,
body.nip-ltr .nip-dashboard-credit {
	direction: ltr;
	text-align: left;
}

body.nip-ltr .nip-plan-table th,
body.nip-ltr .nip-plan-table td,
body.nip-ltr .nip-installments-table th,
body.nip-ltr .nip-installments-table td {
	text-align: left;
}

/* Responsive */
@media (max-width: 600px) {
	.nip-plan-table,
	.nip-installments-table {
		display: block;
		overflow-x: auto;
	}

	.nip-plan-table th,
	.nip-plan-table td,
	.nip-installments-table th,
	.nip-installments-table td {
		padding: 9px 7px;
		font-size: 12px;
	}

	.nip-checkout-box select,
	.nip-checkout-box input[type="number"],
	.nip-checkout-box input[type="text"] {
		max-width: 100%;
	}
}
