/* درگاه کارت به کارت - استایل صفحه پرداخت و مودال */

.ctc-payment-wrapper,
.ctc-modal,
[class^="ctc-"],
[class*=" ctc-"] {
	font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

.ctc-payment-wrapper {
	margin-top: 10px;
}

.ctc-steps {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	flex-wrap: wrap;
}

.ctc-steps__item {
	flex: 1;
	min-width: 90px;
	text-align: center;
	padding: 8px 6px;
	font-size: 12px;
	background: #f0f0f1;
	border-radius: 6px;
	color: #666;
}

.ctc-steps__item.is-active {
	background: #2271b1;
	color: #fff;
	font-weight: 600;
}

.ctc-steps__item.is-done {
	background: #d5e8d4;
	color: #1e4620;
}

.ctc-qr-wrap {
	flex-shrink: 0;
}

.ctc-qr {
	border-radius: 4px;
	border: 1px solid #eee;
}

body.ctc-modal-open {
	overflow: hidden;
}

.ctc-status-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	background: #f0f0f1;
	font-size: 12px;
}

.ctc-payment-form-wrap {
	margin: 20px 0;
	padding: 16px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
}

.ctc-payment-form .ctc-input {
	width: 100%;
	max-width: 420px;
}

.ctc-account-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 12px;
}

.ctc-accounts-block .ctc-bank-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px dashed #eee;
}

.ctc-installments table {
	width: 100%;
	margin-bottom: 16px;
}

.ctc-rcp-fields,
.ctc-integration-fields {
	border: 1px solid #ddd;
	padding: 12px;
	margin: 12px 0;
	border-radius: 6px;
}

.ctc-integration-fields label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.ctc-integration-fields input,
.ctc-integration-fields select {
	width: 100%;
	max-width: 100%;
	margin-bottom: 10px;
}

.ctc-integration-notice {
	padding: 10px 12px;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 6px;
}

.ctc-hidden {
	display: none !important;
}

.ctc-pending-delivery-notice {
	background: #f0f6fc !important;
	border: 1px solid #c5d9ed !important;
	color: #1d2327;
}

.ctc-pending-delivery-notice p:last-child {
	margin-bottom: 0;
}

.ctc-open-modal {
	margin-bottom: 12px !important;
}

.ctc-tracking-row input,
.ctc-receipt-row input {
	width: 100%;
}

/* مودال */
.ctc-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.ctc-modal.is-open {
	display: block;
}

.ctc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
}

.ctc-modal__box {
	position: relative;
	max-width: 460px;
	margin: 8vh auto 0;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.25 );
	overflow: hidden;
	font-family: inherit;
	direction: rtl;
}

.ctc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid #eee;
}

.ctc-modal__header h3 {
	margin: 0;
	font-size: 16px;
}

.ctc-modal__close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #888;
}

.ctc-modal__body {
	padding: 12px 18px;
	max-height: 60vh;
	overflow: auto;
}

.ctc-bank-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	margin: 14px 0 4px;
	background: #f7f7f8;
	border-radius: 6px;
}

.ctc-bank-logo {
	width: 34px;
	height: 34px;
	border-radius: 6px;
	object-fit: contain;
	background: #fff;
}

.ctc-bank-name {
	font-weight: 700;
	font-size: 14px;
}

.ctc-bank-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ctc-bank-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px dashed #eee;
}

.ctc-bank-label {
	color: #666;
	font-size: 13px;
	min-width: 70px;
}

.ctc-bank-value {
	flex: 1;
	font-weight: 700;
	letter-spacing: 1px;
	text-align: left;
}

.ctc-copy {
	background: #f0f0f1;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 4px 10px;
	cursor: pointer;
	font-size: 12px;
}

.ctc-copy:hover {
	background: #e5e5e5;
}

.ctc-modal__footer {
	padding: 14px 18px;
	border-top: 1px solid #eee;
	text-align: left;
}

.ctc-modal__confirm {
	width: 100%;
}

/* استایل پشتیبان دکمه تایید در صورتی که قالب رنگی نکند */
.ctc-modal__confirm:not([class*="has-"]) {
	background: var( --wp--preset--color--primary, var( --wc-btn-primary, #2271b1 ) );
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ctc-modal__confirm:hover {
	opacity: 0.9;
}
