@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
	font-weight: 700;
	font-display: swap;
}

.kartchi-wrap {
	direction: rtl;
	font-family: 'Vazirmatn', Tahoma, sans-serif;
	max-width: 560px;
	margin: 24px auto;
	padding: 0 14px;
	box-sizing: border-box;
	text-align: right;
	line-height: 1.8;
	--kartchi-primary: #2563eb;
	--kartchi-secondary: #1e3a8a;
}
.kartchi-color-green  { --kartchi-primary: #059669; --kartchi-secondary: #065f46; }
.kartchi-color-purple { --kartchi-primary: #7c3aed; --kartchi-secondary: #4c1d95; }
.kartchi-color-red    { --kartchi-primary: #dc2626; --kartchi-secondary: #7f1f1d; }
.kartchi-color-dark   { --kartchi-primary: #475569; --kartchi-secondary: #0f172a; }
.kartchi-color-gold   { --kartchi-primary: #d97706; --kartchi-secondary: #92400e; }
.kartchi-color-teal   { --kartchi-primary: #0d9488; --kartchi-secondary: #134e4a; }
.kartchi-color-pink   { --kartchi-primary: #ec4899; --kartchi-secondary: #831843; }
.kartchi-color-orange { --kartchi-primary: #f97316; --kartchi-secondary: #7c2d12; }
.kartchi-color-indigo { --kartchi-primary: #6366f1; --kartchi-secondary: #312e81; }
.kartchi-color-rose   { --kartchi-primary: #e11d48; --kartchi-secondary: #881337; }
.kartchi-color-slate  { --kartchi-primary: #64748b; --kartchi-secondary: #1e293b; }
.kartchi-wrap *,
.kartchi-wrap *::before,
.kartchi-wrap *::after {
	box-sizing: border-box;
}
.kartchi-panel {
	background: #fff;
	border: 1px solid #e4e7ec;
	border-radius: 14px;
	padding: 24px 20px;
	box-shadow: 0 4px 18px rgba(15, 40, 80, 0.06);
}
.kartchi-header {
	text-align: center;
	margin-bottom: 18px;
}
.kartchi-title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	color: #1b2430;
}
.kartchi-desc {
	margin: 0;
	font-size: 13.5px;
	color: #6b7280;
}

/* ---------- کارت بانکی ---------- */
.kartchi-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin-bottom: 16px;
}
.kartchi-card-item {
	cursor: pointer;
	border-radius: 14px;
	background: linear-gradient(135deg, #1e3a8a, #2563eb);
	color: #fff;
	padding: 18px 16px;
	position: relative;
	transition: transform .15s ease, box-shadow .15s ease;
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
	border: 2px solid transparent;
}
.kartchi-card-item.kartchi-selected {
	border-color: #fbbf24;
	transform: translateY(-3px);
}
.kartchi-card-item:hover {
	transform: translateY(-2px);
}
.kartchi-card-inner {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.kartchi-card-bank {
	font-size: 12px;
	opacity: .85;
	letter-spacing: .5px;
}
.kartchi-card-number {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: 2px;
	direction: ltr;
	text-align: center;
	display: block;
	padding: 6px 0;
	cursor: pointer;
	position: relative;
	user-select: all;
}
.kartchi-card-holder {
	font-size: 13px;
	text-align: center;
}
.kartchi-card-shaba {
	font-size: 12px;
	direction: ltr;
	text-align: center;
	opacity: .9;
	cursor: pointer;
	background: rgba(255, 255, 255, .16);
	border-radius: 8px;
	padding: 4px 8px;
}
.kartchi-card-number.kartchi-copied::after,
.kartchi-card-shaba.kartchi-copied::after {
	content: 'کپی شد ✓';
	position: absolute;
	top: -8px;
	left: 10px;
	background: #111827;
	color: #fff;
	font-size: 11px;
	padding: 2px 10px;
	border-radius: 20px;
	z-index: 2;
}
.kartchi-card-shaba.kartchi-copied {
	position: relative;
}

/* ---------- رنگ‌بندی‌ها ---------- */
.kartchi-color-green .kartchi-card-item,
.kartchi-color-purple .kartchi-card-item,
.kartchi-color-red .kartchi-card-item,
.kartchi-color-dark .kartchi-card-item,
.kartchi-color-gold .kartchi-card-item {
	background: linear-gradient(135deg, var(--kartchi-secondary), var(--kartchi-primary));
	box-shadow: 0 6px 16px color-mix(in srgb, var(--kartchi-primary) 40%, transparent);
}

/* ---------- کیوآر ---------- */
.kartchi-qr {
	text-align: center;
	margin: 6px 0 18px;
}
.kartchi-qr-box {
	display: inline-block;
	background: #fff;
	border: 1px solid #e4e7ec;
	border-radius: 12px;
	padding: 12px;
}
.kartchi-qr-canvas {
	line-height: 0;
}
.kartchi-qr-canvas img,
.kartchi-qr-canvas canvas {
	width: 160px;
	height: 160px;
}
.kartchi-qr-hint {
	margin: 8px 0 0;
	font-size: 12px;
	color: #6b7280;
}

/* ---------- فرم ---------- */
.kartchi-form {
	margin-top: 6px;
}
.kartchi-field {
	margin-bottom: 14px;
}
.kartchi-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 14px;
	align-items: start;
}
.kartchi-fields .kartchi-field-full {
	grid-column: 1 / -1;
}
.kartchi-fields .kartchi-field-half {
	grid-column: span 1;
}
.kartchi-file-list {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.kartchi-file-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 12px;
}
.kartchi-file-thumb {
	width: 34px;
	height: 34px;
	border-radius: 6px;
	overflow: hidden;
	flex: 0 0 34px;
	background: #eef2f7;
	display: flex;
	align-items: center;
	justify-content: center;
}
.kartchi-file-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.kartchi-file-ico {
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	background: #eef2f7;
	border-radius: 6px;
}
.kartchi-file-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #1f2937;
}
.kartchi-file-size {
	color: #64748b;
	direction: ltr;
	font-size: 11px;
}
.kartchi-file-remove {
	border: 0;
	background: none;
	color: #ef4444;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	padding: 4px;
	border-radius: 4px;
	transition: background 0.15s;
}
.kartchi-file-remove:hover {
	background: #fee2e2;
}
.kartchi-field label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	margin-bottom: 5px;
}
.kartchi-req {
	color: #dc2626;
}
.kartchi-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 9px;
	font-size: 14px;
	font-family: inherit;
	background: #f9fafb;
	color: #111827;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.kartchi-input:focus {
	outline: none;
	border-color: #2563eb;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.kartchi-hint {
	display: block;
	font-size: 12px;
	color: #9ca3af;
	margin-top: 4px;
}
.kartchi-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.kartchi-amount-show {
	font-size: 22px;
	font-weight: 700;
	color: #1e3a8a;
	background: #eff6ff;
	border: 1px dashed #93c5fd;
	border-radius: 10px;
	padding: 10px 14px;
	text-align: center;
}
.kartchi-amount-show small {
	font-size: 13px;
	color: #6b7280;
}
.kartchi-btn {
	display: block;
	width: 100%;
	background: var(--kartchi-primary);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 13px 18px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
	margin-top: 6px;
}
.kartchi-btn:hover {
	filter: brightness(1.1);
}
.kartchi-btn:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.kartchi-hp-wrap {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	overflow: hidden;
}

/* ---------- پیام‌ها ---------- */
.kartchi-form-msg {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 9px;
	font-size: 13px;
	display: none;
}
.kartchi-form-msg.kartchi-msg-error,
.kartchi-alert-error {
	display: block;
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}
.kartchi-form-msg.kartchi-msg-ok {
	display: block;
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}
.kartchi-alert {
	padding: 10px 14px;
	border-radius: 9px;
	font-size: 13px;
	margin-bottom: 14px;
}

/* ---------- نتیجه ---------- */
.kartchi-result {
	text-align: center;
}
.kartchi-result-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	color: #fff;
	margin-bottom: 10px;
}
.kartchi-icon-pending {
	background: #f59e0b;
}
.kartchi-icon-confirmed {
	background: #10b981;
}
.kartchi-icon-rejected {
	background: #ef4444;
}
.kartchi-icon-expired {
	background: #6b7280;
}
.kartchi-result-box {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 8px 16px;
	margin: 16px 0;
	text-align: right;
}
.kartchi-result-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px dashed #e5e7eb;
	font-size: 14px;
}
.kartchi-result-row:last-child {
	border-bottom: none;
}
.kartchi-result-row span {
	color: #6b7280;
}
.kartchi-result-msg {
	font-size: 14px;
	color: #374151;
}
.kartchi-result-hint {
	font-size: 12.5px;
	color: #9ca3af;
}
.kartchi-result-actions {
	margin-top: 14px;
}
.kartchi-result-actions .kartchi-btn {
	max-width: 220px;
	margin: 0 auto;
}

/* ---------- پیگیری ---------- */
.kartchi-track-result {
	margin-top: 20px;
	text-align: center;
	border-top: 1px solid #e5e7eb;
	padding-top: 18px;
}
.kartchi-track-result h3 {
	margin: 4px 0 0;
	font-size: 17px;
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 480px) {
	.kartchi-row {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.kartchi-fields {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.kartchi-card-number {
		font-size: 16px;
		letter-spacing: 1px;
	}
	.kartchi-panel {
		padding: 18px 14px;
	}
}


/* ---------- راهنمای مراحل ---------- */
.kartchi-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 4px 0 22px;
	padding: 14px 10px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	border-radius: 12px;
}
.kartchi-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}
.kartchi-step-num {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #64748b;
	font-weight: 700;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}
.kartchi-step-label {
	font-size: 11.5px;
	color: #94a3b8;
	font-weight: 600;
}
.kartchi-step-active .kartchi-step-num {
	background: linear-gradient(135deg, var(--kartchi-primary), var(--kartchi-secondary));
	color: #fff;
	box-shadow: 0 4px 10px color-mix(in srgb, var(--kartchi-primary) 40%, transparent);
}
.kartchi-step-active .kartchi-step-label {
	color: var(--kartchi-secondary);
}
.kartchi-step-line {
	width: 34px;
	height: 2px;
	background: #e2e8f0;
	border-radius: 2px;
	margin-bottom: 20px;
}

/* ---------- بهبود کارت ---------- */
.kartchi-card-item.kartchi-selected {
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}
.kartchi-card-item.kartchi-selected::after {
	content: '✓ انتخاب شد';
	position: absolute;
	top: 10px;
	left: 12px;
	background: #fbbf24;
	color: #78350f;
	font-size: 10.5px;
	font-weight: 700;
	padding: 2px 10px;
	border-radius: 20px;
}
.kartchi-card-number {
	background: rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	margin: 4px 0;
}
.kartchi-card-number:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* ---------- اسپینر دکمه ---------- */
.kartchi-btn:disabled::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	vertical-align: -2px;
	margin-left: 8px;
	animation: kartchi-spin 0.7s linear infinite;
}
@keyframes kartchi-spin {
	to { transform: rotate(360deg); }
}

/* ---------- انیمیشن نتیجه ---------- */
.kartchi-result-icon {
	animation: kartchi-pop 0.4s ease;
}
@keyframes kartchi-pop {
	0% { transform: scale(0.5); opacity: 0; }
	70% { transform: scale(1.08); }
	100% { transform: scale(1); opacity: 1; }
}

/* ---------- واکنش‌گرا مراحل ---------- */
@media (max-width: 480px) {
	.kartchi-step-label {
		font-size: 10px;
	}
	.kartchi-step-line {
		width: 18px;
	}
}


/* ---------- شمارش معکوس مهلت ---------- */
.kartchi-deadline {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 10px;
	padding: 10px 16px;
	margin: 14px auto 0;
	max-width: 320px;
	font-size: 14px;
	color: #92400e;
}
.kartchi-deadline-label {
	font-weight: 600;
}
.kartchi-deadline-time {
	font-weight: 800;
	font-size: 17px;
	direction: ltr;
	font-variant-numeric: tabular-nums;
	background: #f59e0b;
	color: #fff;
	padding: 2px 12px;
	border-radius: 8px;
}
.kartchi-deadline-expired {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}


/* =========================================
   طراحی درگاه بانکی — گام واریز
   ========================================= */

/* جعبه مبلغ */
.kartchi-gate-head {
	text-align: center;
	margin-bottom: 20px;
}
.kartchi-amount-box {
	display: inline-block;
	background: linear-gradient(135deg, #eff6ff, #f8fafc);
	border: 1px solid #dbeafe;
	border-radius: 14px;
	padding: 14px 34px;
}
.kartchi-amount-label {
	display: block;
	font-size: 12.5px;
	color: #64748b;
	margin-bottom: 4px;
}
.kartchi-amount-value {
	display: block;
	font-size: 30px;
	font-weight: 800;
	color: #1e3a8a;
	line-height: 1.3;
	direction: rtl;
}
.kartchi-amount-value small {
	font-size: 14px;
	color: #64748b;
	font-weight: 600;
}
.kartchi-amount-input {
	max-width: 260px;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	display: inline-block;
	vertical-align: middle;
}
.kartchi-amount-hint {
	display: block;
	font-size: 12px;
	color: #94a3b8;
	margin-top: 6px;
}

/* کارت بانکی واقعی‌نما */
.kartchi-card-item {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 4px 14px rgba(15, 40, 80, 0.06);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.kartchi-card-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 22px rgba(15, 40, 80, 0.1);
}
.kartchi-card-item.kartchi-selected {
	border-color: #2563eb;
	box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}
.kartchi-bank-card {
	background: linear-gradient(135deg, var(--kartchi-secondary) 0%, var(--kartchi-primary) 65%, var(--kartchi-primary) 130%);
	border-radius: 16px;
	padding: 20px 22px 18px;
	color: #fff;
	position: relative;
	overflow: hidden;
	min-height: 165px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 10px 24px color-mix(in srgb, var(--kartchi-primary) 45%, transparent);
}
.kartchi-bank-card::after {
	content: '';
	position: absolute;
	left: -40px;
	top: -60px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
}
.kartchi-color-green .kartchi-bank-card,
.kartchi-color-purple .kartchi-bank-card,
.kartchi-color-red .kartchi-bank-card,
.kartchi-color-dark .kartchi-bank-card,
.kartchi-color-gold .kartchi-bank-card {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 10px 24px color-mix(in srgb, var(--kartchi-primary) 45%, transparent);
}

.kartchi-bank-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	z-index: 1;
}
.kartchi-bank-chip {
	display: inline-block;
	width: 46px;
	height: 34px;
	border-radius: 7px;
	background: linear-gradient(135deg, #fbbf24, #f59e0b 50%, #fcd34d);
	position: relative;
	box-shadow: inset 0 0 0 1px rgba(120, 53, 15, 0.35);
}
.kartchi-bank-chip::before,
.kartchi-bank-chip::after {
	content: '';
	position: absolute;
	background: rgba(120, 53, 15, 0.35);
}
.kartchi-bank-chip::before {
	left: 8px;
	right: 8px;
	top: 50%;
	height: 1px;
}
.kartchi-bank-chip::after {
	top: 6px;
	bottom: 6px;
	left: 50%;
	width: 1px;
}
.kartchi-bank-name {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
}
.kartchi-bank-card-number {
	font-size: 21px;
	font-weight: 700;
	letter-spacing: 3px;
	direction: ltr;
	text-align: center;
	padding: 10px 0;
	position: relative;
	z-index: 1;
	user-select: all;
	cursor: pointer;
}
.kartchi-bank-card-bottom {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	position: relative;
	z-index: 1;
}
.kartchi-bank-holder {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
}
.kartchi-bank-scheme {
	font-size: 11px;
	opacity: 0.85;
	letter-spacing: 1px;
}

/* دکمه کپی و شبا */
.kartchi-copy-btn {
	margin-top: 12px;
	width: 100%;
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s ease;
}
.kartchi-copy-btn:hover {
	background: #dbeafe;
}
.kartchi-shaba-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 10px;
	font-size: 12px;
	color: #64748b;
	background: #f8fafc;
	border-radius: 8px;
	padding: 7px 12px;
}
.kartchi-shaba-row strong {
	direction: ltr;
	cursor: pointer;
	color: #1e293b;
}

/* گام‌ها */
.kartchi-step-panel {
	animation: kartchi-fadein 0.35s ease;
}
@keyframes kartchi-fadein {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}
.kartchi-step-actions {
	margin-top: 20px;
}
.kartchi-form-title {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 800;
	color: #1b2430;
}
.kartchi-form-sub {
	margin: 0 0 18px;
	font-size: 13px;
	color: #64748b;
}
.kartchi-field-static .kartchi-amount-show {
	margin-top: 4px;
}
.kartchi-form-nav {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 8px;
}
.kartchi-form-nav .kartchi-btn {
	flex: 1;
	margin-top: 0;
}
.kartchi-btn-ghost {
	flex: 0 0 auto;
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 13px 18px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s ease;
}
.kartchi-btn-ghost:hover {
	background: #e2e8f0;
}


/* =========================================
   طراحی پریمیوم — افکت‌های لوکس
   ========================================= */

/* پنل */
.kartchi-panel {
	background: linear-gradient(180deg, #ffffff, #f8fafc);
	border-radius: 20px;
	box-shadow: 0 10px 40px rgba(15, 40, 80, 0.09);
	position: relative;
	overflow: hidden;
}
.kartchi-panel::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--kartchi-secondary), var(--kartchi-primary), var(--kartchi-secondary));
}

/* جعبه مبلغ با رنگ سفارشی */
.kartchi-amount-box {
	background: linear-gradient(135deg, color-mix(in srgb, var(--kartchi-primary) 8%, #ffffff), #f8fafc);
	border: 1px solid color-mix(in srgb, var(--kartchi-primary) 22%, transparent);
}
.kartchi-amount-value {
	color: var(--kartchi-secondary);
}

/* افکت براق روی کارت بانکی */
.kartchi-bank-card::before {
	content: '';
	position: absolute;
	top: -60%;
	left: -40%;
	width: 55%;
	height: 220%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
	transform: rotate(22deg);
	animation: kartchi-shine 4.5s ease-in-out infinite;
	z-index: 1;
}
@keyframes kartchi-shine {
	0%, 55% { left: -45%; }
	100% { left: 135%; }
}

/* کارت انتخابی با رنگ سفارشی */
.kartchi-card-item.kartchi-selected {
	border-color: var(--kartchi-primary);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--kartchi-primary) 18%, transparent);
}

/* دکمه کپی */
.kartchi-copy-btn {
	background: color-mix(in srgb, var(--kartchi-primary) 8%, #ffffff);
	color: var(--kartchi-secondary);
	border: 1px solid color-mix(in srgb, var(--kartchi-primary) 25%, transparent);
}
.kartchi-copy-btn:hover {
	background: color-mix(in srgb, var(--kartchi-primary) 15%, #ffffff);
}

/* QR پریمیوم */
.kartchi-qr-box {
	background: linear-gradient(180deg, #ffffff, #f8fafc);
	border-radius: 16px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 8px 24px rgba(15, 40, 80, 0.08);
}

/* عنوان فرم */
.kartchi-form-title {
	display: flex;
	align-items: center;
	gap: 8px;
}
.kartchi-form-title::before {
	content: '🧾';
}

/* گام‌ها پریمیوم */
.kartchi-steps {
	background: linear-gradient(180deg, #ffffff, #f8fafc);
	border: 1px solid #eef2f7;
}

/* انیمیشن ورود کارت */
.kartchi-card-item {
	animation: kartchi-fadein 0.45s ease both;
}
.kartchi-card-item:nth-child(2) {
	animation-delay: 0.08s;
}
.kartchi-card-item:nth-child(3) {
	animation-delay: 0.16s;
}


/* =========================================
   طراحی مدرن و ریسپانسیو — نسخه ۱.۵
   ========================================= */

/* پنل گلسی */
.kartchi-panel {
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

/* عنوان و توضیح */
.kartchi-title {
	font-size: clamp(18px, 4.5vw, 22px);
}
.kartchi-desc {
	font-size: clamp(12.5px, 3vw, 13.5px);
}

/* جعبه مبلغ مدرن */
.kartchi-gate-head {
	margin-bottom: 18px;
}
.kartchi-amount-box {
	border-radius: clamp(14px, 3vw, 20px);
	padding: clamp(12px, 3vw, 18px) clamp(20px, 5vw, 36px);
}
.kartchi-amount-value {
	font-size: clamp(24px, 6vw, 32px);
}
.kartchi-amount-input {
	font-size: clamp(18px, 5vw, 22px);
	max-width: 100%;
}

/* کارت بانکی */
.kartchi-bank-card {
	min-height: clamp(140px, 30vw, 170px);
	border-radius: clamp(14px, 3vw, 18px);
	padding: clamp(14px, 3.5vw, 20px) clamp(16px, 4vw, 22px);
}
.kartchi-bank-card-number {
	font-size: clamp(15px, 4.5vw, 21px);
	letter-spacing: clamp(1px, 0.5vw, 3px);
}
.kartchi-bank-chip {
	width: clamp(38px, 10vw, 46px);
	height: clamp(28px, 7vw, 34px);
}

/* مراحل */
.kartchi-steps {
	padding: clamp(10px, 2.5vw, 14px) 6px;
	border-radius: 14px;
	gap: clamp(6px, 1.5vw, 10px);
}
.kartchi-step-num {
	width: clamp(26px, 7vw, 30px);
	height: clamp(26px, 7vw, 30px);
}
.kartchi-step-line {
	width: clamp(16px, 5vw, 34px);
}
.kartchi-step-label {
	font-size: clamp(10px, 2.5vw, 11.5px);
	white-space: nowrap;
}

/* فیلدها */
.kartchi-input {
	border-radius: clamp(10px, 2vw, 12px);
	padding: clamp(10px, 2.5vw, 12px);
	font-size: 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.kartchi-input:focus {
	border-color: var(--kartchi-primary);
	background: #fff;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--kartchi-primary) 18%, transparent);
}
.kartchi-field label {
	font-size: clamp(12.5px, 3vw, 13px);
}

/* دکمه اصلی با گرادیان و سایه */
.kartchi-btn {
	background: linear-gradient(135deg, var(--kartchi-primary), var(--kartchi-secondary));
	border-radius: clamp(12px, 2.5vw, 14px);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--kartchi-primary) 35%, transparent);
	font-size: clamp(14px, 3.5vw, 15px);
}
.kartchi-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 12px 26px color-mix(in srgb, var(--kartchi-primary) 45%, transparent);
}
.kartchi-btn:active {
	transform: translateY(0);
}

/* QR */
.kartchi-qr-box {
	border-radius: clamp(14px, 3vw, 18px);
	padding: clamp(12px, 3vw, 16px);
}

/* شمارش معکوس */
.kartchi-deadline {
	border-radius: 12px;
	padding: clamp(9px, 2vw, 11px) clamp(12px, 3vw, 16px);
	gap: 8px;
	flex-wrap: wrap;
	text-align: center;
}
.kartchi-deadline-time {
	font-size: clamp(15px, 4vw, 17px);
}

/* ناوبری فرم */
.kartchi-form-nav {
	flex-wrap: wrap;
}

/* ---------- ریسپانسیو موبایل ---------- */
@media (max-width: 640px) {
	body.kartchi-standalone {
		padding-top: clamp(10px, 3vw, 20px);
	}
	.kartchi-wrap {
		padding: 0 8px;
	}
	.kartchi-panel {
		padding: clamp(16px, 4vw, 22px) clamp(14px, 3.5vw, 18px);
	}
	.kartchi-card-item {
		padding: 12px;
	}
	.kartchi-copy-btn {
		font-size: 12.5px;
	}
	.kartchi-shaba-row {
		font-size: 11px;
		overflow-x: auto;
		white-space: nowrap;
	}
	.kartchi-form-nav .kartchi-btn,
	.kartchi-form-nav .kartchi-btn-ghost {
		font-size: 13.5px;
	}
	.kartchi-step-label {
		max-width: 92px;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.kartchi-amount-hint {
		font-size: 11px;
	}
}

@media (max-width: 420px) {
	.kartchi-header {
		margin-bottom: 12px;
	}
	.kartchi-step-label {
		font-size: 9.5px;
		max-width: 70px;
	}
	.kartchi-step-line {
		width: 10px;
	}
	.kartchi-bank-card-number {
		font-size: 13px;
		letter-spacing: 0.5px;
	}
	.kartchi-bank-card {
		min-height: 120px;
	}
	.kartchi-bank-holder,
	.kartchi-bank-scheme {
		font-size: 11px;
	}
	.kartchi-qr-canvas img,
	.kartchi-qr-canvas canvas {
		width: 130px !important;
		height: 130px !important;
	}
	.kartchi-brand {
		font-size: 12.5px;
	}
	.kartchi-brand-ico {
		width: 30px;
		height: 30px;
	}
	.kartchi-deadline-label {
		font-size: 12px;
	}
	.kartchi-amount-box {
		width: 100%;
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* جلوگیری از اسکرول افقی */
html, body { overflow-x: hidden; }
.kartchi-wrap, .kartchi-panel, .kartchi-bank-card, .kartchi-qr-box, .kartchi-steps, .kartchi-amount-box {
	max-width: 100%;
	box-sizing: border-box;
}


/* ---------- پرداخت دوباره ---------- */
.kartchi-restart-box {
	text-align: center;
	margin-top: 16px;
}
.kartchi-restart-box .kartchi-btn {
	max-width: 320px;
	margin: 0 auto;
}
.kartchi-restart-btn {
	display: block;
	width: 100%;
	margin-top: 14px;
	text-align: center;
	text-decoration: none;
	box-sizing: border-box;
}

/* ---------- دکمه تغییر حالت (تیره/روشن) ---------- */
.kartchi-brand {
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}
.kartchi-theme-toggle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid rgba(15, 40, 80, 0.15);
	background: rgba(255, 255, 255, 0.85);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(15, 40, 80, 0.12);
	transition: transform 0.15s ease, background 0.15s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.kartchi-theme-toggle:hover {
	transform: scale(1.1);
}
body.kartchi-dark .kartchi-theme-toggle {
	background: rgba(30, 41, 59, 0.9);
	border-color: #2a3a5c;
}

/* ---------- وسط‌چین بودن QR ---------- */
.kartchi-qr {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}
.kartchi-qr-box {
	display: inline-block;
	margin: 0 auto;
}
.kartchi-qr-canvas {
	display: flex;
	justify-content: center;
	align-items: center;
}
.kartchi-qr-canvas img,
.kartchi-qr-canvas canvas {
	margin: 0 auto;
	display: block;
}



/* ---------- انصراف از پرداخت ---------- */
.kartchi-cancel-row {
	text-align: center;
	margin-top: 12px;
}
.kartchi-cancel-link {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 600;
	color: #94a3b8;
	text-decoration: none;
	padding: 6px 14px;
	border-radius: 8px;
	transition: color 0.15s ease, background 0.15s ease;
}
.kartchi-cancel-link:hover {
	color: #dc2626;
	background: rgba(220, 38, 38, 0.06);
}
body.kartchi-dark .kartchi-cancel-link {
	color: #64748b;
}
body.kartchi-dark .kartchi-cancel-link:hover {
	color: #f87171;
	background: rgba(248, 113, 113, 0.1);
}

/* ---------- مشکی لوکس — حالت روشن: خوانایی ---------- */
.kartchi-color-dark .kartchi-input {
	background: #fff;
	border: 1px solid #94a3b8;
	color: #0f172a;
}
.kartchi-color-dark .kartchi-input:focus {
	border-color: #334155;
	box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.18);
}
.kartchi-color-dark .kartchi-field label {
	color: #1e293b;
}
.kartchi-color-dark .kartchi-amount-show {
	background: #f1f5f9;
	border-color: #94a3b8;
	color: #0f172a;
}
.kartchi-color-dark .kartchi-hint {
	color: #64748b;
}

/* مشکی لوکس — حالت روشن: تضمین خوانایی دکمه‌ها (حتی اگر رنگ سفارشی روشن باشد) */
.kartchi-color-dark .kartchi-btn {
	background: linear-gradient(135deg, #334155, #0f172a) !important;
	color: #ffffff !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	border: 1px solid #0f172a;
}
.kartchi-color-dark .kartchi-btn:hover {
	background: linear-gradient(135deg, #475569, #1e293b) !important;
}
.kartchi-color-dark .kartchi-btn-ghost {
	background: #f8fafc;
	color: #1e293b;
	border: 1px solid #64748b;
}
.kartchi-color-dark .kartchi-btn-ghost:hover {
	background: #eef2f7;
	color: #0f172a;
}
.kartchi-color-dark .kartchi-restart-btn {
	background: linear-gradient(135deg, #334155, #0f172a) !important;
	color: #fff !important;
}

/* ---------- هاور کپی ---------- */
.kartchi-bank-card-number,
.kartchi-shaba-row strong,
.kartchi-card-number,
.kartchi-card-shaba,
.kartchi-account-row strong {
	transition: background 0.15s ease, transform 0.1s ease;
	border-radius: 6px;
}
.kartchi-bank-card-number:hover {
	background: rgba(255, 255, 255, 0.18);
	transform: scale(1.02);
}
.kartchi-shaba-row strong:hover,
.kartchi-account-row strong:hover {
	background: #eef2f7;
	padding: 2px 8px;
}

/* ---------- توست «کپی شد» ---------- */
.kartchi-copy-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translate(-50%, 20px);
	background: #111827;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 22px;
	border-radius: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 99999;
	pointer-events: none;
}
.kartchi-copy-toast-show {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- کارت مقصد در گام ۲ (یادآوری) ---------- */
.kartchi-selected-card {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
	background: #f0fdf4;
	border: 1px dashed #86efac;
	border-radius: 12px;
	padding: 10px 14px;
	margin: 12px 0 16px;
	font-size: 13px;
	color: #166534;
}
.kartchi-selected-card-label {
	font-weight: 600;
}
.kartchi-selected-card-bank {
	font-weight: 600;
	color: #14532d;
}
.kartchi-selected-card-num {
	direction: ltr;
	unicode-bidi: isolate;
	letter-spacing: 1px;
	font-weight: 700;
}

/* ---------- تضمین خوانایی دکمه اصلی «واریز انجام شد — ثبت رسید» در حالت روز (همه پالت‌ها) ---------- */
.kartchi-step-actions .kartchi-btn,
.kartchi-form-nav .kartchi-btn,
.kartchi-restart-box .kartchi-btn {
	color: #ffffff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

