/* بله پی — استایل سمت کاربر */
.bp-wrap {
	--bp-primary: #0fae93;
	--bp-primary-2: #0b7f9e;
	--bp-ink: #0f2a33;
	--bp-muted: #5b7079;
	--bp-line: #e3eef0;
	--bp-bg: #ffffff;
	--bp-soft: #f3faf9;
	--bp-danger: #d64545;
	--bp-radius: 18px;
	font-family: Vazirmatn, Vazir, "IRANSans", Tahoma, system-ui, sans-serif;
	direction: rtl;
	text-align: right;
	color: var(--bp-ink);
	max-width: 440px;
	margin: 1.5em auto;
	line-height: 1.8;
}
.bp-wrap *, .bp-wrap *::before, .bp-wrap *::after { box-sizing: border-box; }
.bp-wrap.bp-compact { max-width: 340px; margin: 1em 0; }

.bp-card {
	background: var(--bp-bg);
	border: 1px solid var(--bp-line);
	border-radius: var(--bp-radius);
	padding: 22px;
	box-shadow: 0 1px 2px rgba(15, 42, 51, .04), 0 12px 32px -12px rgba(11, 127, 158, .22);
	position: relative;
	overflow: hidden;
}
.bp-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: linear-gradient(90deg, var(--bp-primary), var(--bp-primary-2));
}
.bp-compact .bp-card { padding: 0; border: 0; box-shadow: none; background: transparent; }
.bp-compact .bp-card::before { display: none; }

.bp-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.bp-logo { flex: 0 0 auto; line-height: 0; }
.bp-title { margin: 0; font-size: 1.08em; font-weight: 800; color: var(--bp-ink); line-height: 1.5; }
.bp-desc { margin: 2px 0 0; font-size: .88em; color: var(--bp-muted); }

.bp-amount {
	display: flex; justify-content: space-between; align-items: center;
	background: var(--bp-soft);
	border: 1px dashed #bfe5dd;
	border-radius: 14px;
	padding: 12px 16px;
	margin-bottom: 14px;
}
.bp-amount span { color: var(--bp-muted); font-size: .9em; }
.bp-amount strong { font-size: 1.25em; font-weight: 900; color: var(--bp-primary-2); }

.bp-field { display: block; margin-bottom: 12px; }
.bp-field > span { display: block; font-size: .88em; font-weight: 700; margin-bottom: 4px; }
.bp-input {
	width: 100%;
	border: 1.5px solid var(--bp-line);
	border-radius: 12px;
	padding: 11px 14px;
	font: inherit;
	font-size: 1em;
	background: #fff;
	color: var(--bp-ink);
	transition: border-color .15s, box-shadow .15s;
}
.bp-input:focus { outline: none; border-color: var(--bp-primary); box-shadow: 0 0 0 4px rgba(15, 174, 147, .14); }
.bp-amount-input { font-size: 1.15em; font-weight: 800; letter-spacing: .5px; }
.bp-hint, .bp-amount-words { display: block; font-size: .8em; color: var(--bp-muted); margin-top: 3px; min-height: 1em; }
.bp-amount-words { color: var(--bp-primary-2); font-weight: 700; }

.bp-btn {
	display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px;
	border: 0; cursor: pointer;
	background: linear-gradient(135deg, var(--bp-primary), var(--bp-primary-2));
	color: #fff !important;
	font: inherit; font-weight: 800; font-size: 1.02em;
	padding: 13px 18px;
	border-radius: 14px;
	text-decoration: none !important;
	box-shadow: 0 8px 18px -8px rgba(11, 127, 158, .7);
	transition: transform .15s, box-shadow .15s, filter .15s;
}
.bp-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 12px 24px -10px rgba(11, 127, 158, .8); }
.bp-btn:active { transform: translateY(0); }
.bp-btn:disabled { opacity: .7; cursor: wait; }
.bp-btn svg { border-radius: 7px; }
.bp-spinner {
	display: none; width: 18px; height: 18px; border-radius: 50%;
	border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff;
	animation: bp-spin .8s linear infinite;
}
.is-loading .bp-spinner { display: inline-block; }
@keyframes bp-spin { to { transform: rotate(360deg); } }

.bp-msg { margin-top: 10px; font-size: .9em; min-height: 0; }
.bp-msg.is-error { color: var(--bp-danger); background: #fdf1f1; border-radius: 10px; padding: 8px 12px; }

.bp-steps { margin: 16px 0 8px; padding: 0 20px 0 0; color: var(--bp-muted); font-size: .88em; }
.bp-steps li { margin-bottom: 4px; }

.bp-status {
	display: flex; align-items: center; gap: 10px;
	background: #f6f9fa; border-radius: 12px; padding: 10px 14px; margin: 12px 0 6px;
	font-size: .92em; line-height: 1.7;
}
.bp-pulse { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: #f0a92e; position: relative; }
.bp-pulse::after {
	content: ""; position: absolute; inset: -5px; border-radius: 50%;
	border: 2px solid #f0a92e; opacity: .6; animation: bp-ping 1.6s ease-out infinite;
}
@keyframes bp-ping { from { transform: scale(.5); opacity: .8; } to { transform: scale(1.4); opacity: 0; } }
.bp-status[data-state="checking"] .bp-pulse { background: #3b8fd6; }
.bp-status[data-state="checking"] .bp-pulse::after { border-color: #3b8fd6; }
.bp-status[data-state="paid"] { background: #e9f9f2; color: #0c6b4c; }
.bp-status[data-state="paid"] .bp-pulse { background: #12a26f; }
.bp-status[data-state="paid"] .bp-pulse::after { display: none; }
.bp-status[data-state="failed"] { background: #fdf1f1; color: #9a2b2b; }
.bp-status[data-state="failed"] .bp-pulse { background: var(--bp-danger); }
.bp-status[data-state="failed"] .bp-pulse::after,
.bp-status[data-state="idle"] .bp-pulse::after { display: none; }
.bp-status[data-state="idle"] .bp-pulse { background: #9aa9ae; }

.bp-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-top: 8px; }
.bp-link-btn {
	background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; font-size: .88em;
	color: var(--bp-primary-2); font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
}
.bp-link-btn:disabled { opacity: .5; cursor: wait; }
.bp-small { font-size: .78em; color: var(--bp-muted); text-align: center; margin: 10px 0 0; }
.bp-small a { color: var(--bp-primary-2); }

.bp-stage.is-paid .bp-amount { border-color: #9fdcc4; }

.bp-foot {
	display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
	margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--bp-line);
	font-size: .78em; color: var(--bp-muted);
}
.bp-foot svg { color: var(--bp-primary); }
.bp-test-badge {
	background: #fff4dd; color: #8a5a00; border: 1px solid #f3d38c;
	border-radius: 999px; padding: 1px 10px; font-size: .95em; font-weight: 700;
}
.bp-alert { border-radius: 12px; padding: 12px 14px; font-size: .92em; }
.bp-alert-warn { background: #fff7e6; color: #7a5200; }

/* صفحه مستقل لینک پرداخت */
body.bp-page {
	margin: 0; min-height: 100vh;
	background:
		radial-gradient(1000px 500px at 100% -10%, rgba(20, 196, 162, .18), transparent 60%),
		radial-gradient(800px 500px at -10% 110%, rgba(11, 127, 158, .16), transparent 60%),
		#f4f8f9;
	font-family: Vazirmatn, Vazir, "IRANSans", Tahoma, system-ui, sans-serif;
	direction: rtl;
}
.bp-page-main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; }
.bp-page-main .bp-wrap { width: 100%; margin: 14px auto; }
.bp-page-brand { font-weight: 900; font-size: 1.1em; color: #0f2a33; }
.bp-page-back { color: #5b7079; font-size: .85em; text-decoration: none; margin-top: 6px; }
.bp-page-back:hover { color: #0b7f9e; }

@media (max-width: 480px) {
	.bp-card { padding: 18px 16px; }
	.bp-amount strong { font-size: 1.12em; }
}
