/**
 * CardToCard — frontend styles
 */

.ctc-payment-fields,
.ctc-thankyou,
.ctc-account-block {
	direction: rtl;
	text-align: right;
}

.ctc-instructions {
	margin: 0 0 14px;
	padding: 12px 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	font-size: 0.95em;
	line-height: 1.7;
}

.ctc-cards {
	border: 0;
	margin: 0 0 16px;
	padding: 0;
}

.ctc-cards legend {
	font-weight: 700;
	margin-bottom: 10px;
	padding: 0;
}

.ctc-cards__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ctc-card-option {
	display: block;
	cursor: pointer;
	border: 1px solid #e4e4e7;
	border-radius: 12px;
	padding: 12px 14px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ctc-card-option:has(input:checked) {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.ctc-card-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ctc-card-option__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ctc-card-option__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ctc-card-option__title {
	font-weight: 700;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ctc-card-option__title small {
	font-weight: 400;
	color: #71717a;
}

.ctc-bank-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 10px;
}

.ctc-bank-logo--sm {
	width: 28px;
	height: 28px;
	font-size: 9px;
	border-radius: 7px;
}

.ctc-bank-logo--md {
	width: 44px;
	height: 44px;
	font-size: 11px;
}

.ctc-bank-logo--lg {
	width: 56px;
	height: 56px;
	font-size: 13px;
	border-radius: 12px;
}

.ctc-bank-logo--badge {
	background: var(--ctc-bank, #52525b);
	color: #fff;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.ctc-bank-logo--image {
	background: #fff;
	border: 1px solid #e4e4e7;
}

.ctc-bank-logo--image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ctc-thankyou__bank {
	margin-bottom: 12px;
}

.ctc-card-option__number,
.ctc-card-option__sheba,
.ctc-card-option__holder {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 0.92em;
}

.ctc-card-option__number code,
.ctc-card-option__sheba code {
	direction: ltr;
	unicode-bidi: isolate;
	font-size: 1.05em;
	letter-spacing: 0.04em;
	background: #f4f4f5;
	padding: 2px 8px;
	border-radius: 6px;
}

.ctc-copy-btn {
	appearance: none;
	border: 1px solid #d4d4d8;
	background: #fff;
	border-radius: 6px;
	padding: 2px 8px;
	font-size: 12px;
	cursor: pointer;
	line-height: 1.5;
}

.ctc-copy-btn:hover {
	background: #f4f4f5;
}

.ctc-copy-btn.is-copied {
	border-color: #059669;
	color: #047857;
}

.ctc-custom-fields .ctc-field {
	margin-bottom: 12px;
}

.ctc-custom-fields input,
.ctc-custom-fields textarea,
.ctc-receipt-field input[type="file"] {
	width: 100%;
}

.ctc-hint {
	display: block;
	margin-top: 6px;
	color: #71717a;
	font-size: 12px;
}

.ctc-thankyou,
.ctc-account-block {
	margin: 24px 0;
	padding: 20px;
	border: 1px solid #e4e4e7;
	border-radius: 14px;
	background: #fff;
}

.ctc-thankyou__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.ctc-thankyou__header h2 {
	margin: 0;
	font-size: 1.2rem;
}

.ctc-info-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ctc-info-list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	background: #fafafa;
	border-radius: 8px;
	flex-wrap: wrap;
}

.ctc-info-list li span {
	color: #71717a;
}

.ctc-receipt-preview {
	max-width: 280px;
	height: auto;
	border-radius: 10px;
	border: 1px solid #e4e4e7;
}

.ctc-upload-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.ctc-upload-form .button,
.ctc-upload-form button {
	align-self: flex-start;
}

.ctc-status-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.ctc-status--pending {
	background: #fff7ed;
	color: #c2410c;
}

.ctc-status--confirmed {
	background: #ecfdf5;
	color: #047857;
}

.ctc-status--rejected {
	background: #fef2f2;
	color: #b91c1c;
}

.ctc-status--needs-review {
	background: #eff6ff;
	color: #1d4ed8;
}

.ctc-ltr {
	direction: ltr;
	unicode-bidi: isolate;
}

.ctc-empty {
	color: #b91c1c;
}

@media (max-width: 600px) {
	.ctc-info-list li {
		flex-direction: column;
	}
}

/* Keep the checkout within its theme column; Golden Light variables are optional. */
.ctc-payment-fields,
.ctc-thankyou,
.ctc-account-block {
	--ctc-accent: var(--gl-gold, #b68c3d);
	--ctc-ink: var(--gl-charcoal, #1f232b);
	--ctc-muted: var(--gl-gray, #667085);
	--ctc-line: var(--gl-gray-light, #dfe3e8);
	--ctc-surface: var(--gl-white, Canvas);
	color: var(--ctc-ink);
	font-family: 'Peyda', Tahoma, sans-serif;
	min-width: 0;
}

.ctc-payment-fields *,
.ctc-thankyou *,
.ctc-account-block * { box-sizing: border-box; }

.ctc-payment-steps {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: grid;
	gap: 8px;
}

.ctc-payment-steps li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 0.92em;
	line-height: 1.5;
}
#payment .ctc-payment-steps li { padding: 0; }

.ctc-payment-steps li span {
	display: grid;
	place-items: center;
	flex: 0 0 26px;
	height: 26px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--ctc-accent) 18%, var(--ctc-surface));
	color: var(--ctc-ink);
	font-size: 0.82em;
	font-weight: 700;
}

.ctc-instructions {
	background: color-mix(in srgb, var(--ctc-accent) 8%, var(--ctc-surface));
	border-color: color-mix(in srgb, var(--ctc-accent) 30%, var(--ctc-line));
	color: var(--ctc-ink);
	margin-bottom: 20px;
}
.ctc-instructions p { margin: 0; }
.ctc-cards legend { color: var(--ctc-ink); font-size: 1em; }

.ctc-payment-fields .ctc-custom-fields { clear: both; margin-top: 18px; }
.ctc-payment-fields .ctc-custom-fields h3 {
	font-size: 1em;
	margin: 0 0 12px;
	color: var(--ctc-ink);
}
.ctc-payment-fields .ctc-custom-fields .ctc-field,
.ctc-payment-fields .ctc-receipt-field { float: none; width: 100%; clear: both; }
.ctc-payment-fields .ctc-custom-fields input,
.ctc-payment-fields .ctc-custom-fields textarea,
.ctc-payment-fields .ctc-receipt-field input[type="file"] {
	max-width: 100%;
	min-height: 44px;
	font-family: inherit;
}
.ctc-payment-fields .ctc-custom-fields input:focus,
.ctc-payment-fields .ctc-custom-fields textarea:focus {
	border-color: var(--ctc-accent);
	outline: 2px solid color-mix(in srgb, var(--ctc-accent) 28%, transparent);
}
.ctc-payment-fields .ctc-receipt-field {
	padding-top: 16px;
	border-top: 1px solid var(--ctc-line);
}
.ctc-hint { color: var(--ctc-muted); }

.ctc-thankyou,
.ctc-account-block {
	background: var(--ctc-surface);
	border-color: var(--ctc-line);
	border-radius: var(--gl-radius-lg, 16px);
	box-shadow: var(--gl-shadow, 0 4px 24px rgba(0, 0, 0, 0.06));
}
.ctc-thankyou__header h2 { color: var(--ctc-ink); }
.ctc-info-list li {
	background: color-mix(in srgb, var(--ctc-accent) 5%, var(--ctc-surface));
	min-width: 0;
}
.ctc-info-list li span { color: var(--ctc-muted); }
.ctc-info-list li strong { overflow-wrap: anywhere; }
.ctc-thankyou .ctc-copy-btn,
.ctc-account-block .ctc-copy-btn { min-height: 36px; margin-inline-start: 8px; }
.ctc-upload-form input[type="file"] { max-width: 100%; }

@media (max-width: 600px) {
	.ctc-card-option { padding: 14px; }
	.ctc-card-option__number { align-items: flex-start; }
	.ctc-thankyou, .ctc-account-block { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.ctc-card-option { transition: none; }
}

/* Destination card and receipt uploader are styled as part of the checkout payment panel. */
.ctc-payment-fields .ctc-cards__list { align-items: stretch; gap: 12px; }
.ctc-payment-fields .ctc-card-option {
	position: relative; display: block; width: 100%; min-width: 0; min-height: 190px; aspect-ratio: auto; overflow: hidden; padding: 20px 22px; border: 1px solid #e4dfd5; border-radius: 18px;
	background: linear-gradient(135deg, #fff 0%, #f8f6f0 100%); color: #28251f;
	box-shadow: 0 5px 18px rgba(39, 31, 17, .045); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ctc-payment-fields .ctc-card-option::after { position: absolute; inset: auto -35px -85px auto; width: 210px; height: 210px; border: 1px solid rgba(184,147,63,.12); border-radius: 50%; content: ""; box-shadow: 0 0 0 18px rgba(184,147,63,.035), 0 0 0 38px rgba(184,147,63,.025); pointer-events: none; }
.ctc-payment-fields .ctc-card-option:hover { transform: translateY(-1px); border-color: #c6aa6c; }
.ctc-payment-fields .ctc-card-option:has(input:checked) { border: 1px solid #ad8a3c; background: linear-gradient(135deg, #fffdf8, #f5f0e5); box-shadow: 0 0 0 3px rgba(184,147,63,.13), 0 12px 25px rgba(39,31,17,.08); }
.ctc-payment-fields .ctc-card-option:focus-within { outline: 3px solid rgba(184,147,63,.27); outline-offset: 2px; }
.ctc-card-option__body { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: none; align-content: start; gap: 15px; min-height: 148px; }
.ctc-card-option__head { position: relative; grid-column: 1 / -1; padding-inline-end: 28px; }
.ctc-card-option__title { color: #28251f; }
.ctc-card-option__title small { color: #777064; }
.ctc-bank-logo--image { border-color: #eee8dc; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ctc-card-option__chip { display: none; }
.ctc-card-option__chip svg { display: block; width: 100%; height: 100%; }
.ctc-card-option__chip rect { fill: #f0e8d5; stroke: #bda568; }
.ctc-card-option__chip path { stroke: #bda568; }
.ctc-card-option__number { grid-column: 1 / -1; grid-row: auto; justify-content: space-between; flex-wrap: wrap; min-width: 0; }
.ctc-card-option__number code, .ctc-card-option__sheba code { padding: 0; background: transparent; color: #292720; font: 600 1.15rem/1.6 Peyda, Tahoma, sans-serif; letter-spacing: .06em; text-shadow: none; white-space: nowrap; }
.ctc-card-option__sheba code { font-size: .85rem; letter-spacing: .015em; overflow-wrap: anywhere; white-space: normal; }
.ctc-card-option .ctc-copy-btn { min-height: 34px; padding: 4px 9px; border-color: #e1d8c4; background: #fff; color: #76602e; }
.ctc-card-option__holder, .ctc-card-option__sheba { grid-column: 1 / -1; color: #777064; }
.ctc-card-option__holder strong { color: #28251f; }
.ctc-card-option__missing { color: #a72d24; font-size: .85rem; line-height: 1.7; }
.ctc-payment-fields .ctc-custom-fields { margin-top: 22px; padding-top: 18px; border-top: 1px solid #ece7de; }
.ctc-payment-fields .ctc-custom-fields .ctc-field label, .ctc-receipt-field__label { display: block; margin-bottom: 7px; color: #39352d; font-weight: 650; }
.ctc-payment-fields .ctc-custom-fields input, .ctc-payment-fields .ctc-custom-fields textarea { width: 100%; border: 1px solid #ddd7cb; border-radius: 10px; background: #fff; }
.ctc-payment-fields .ctc-custom-fields input:focus, .ctc-payment-fields .ctc-custom-fields textarea:focus { outline: 3px solid rgba(184,147,63,.18); }
.ctc-payment-fields .ctc-receipt-field { clear: both; padding-top: 18px; border-top: 1px solid #ece7de; }
.ctc-upload-dropzone { position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 92px; margin-top: 8px; padding: 16px; border: 1.5px dashed #c9bea5; border-radius: 14px; background: linear-gradient(135deg,#fffefa,#faf8f2); cursor: pointer; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.ctc-upload-dropzone:hover, .ctc-upload-dropzone:focus-visible, .ctc-upload-dropzone.is-dragging { border-color: #a88943; background: #fbf7ed; box-shadow: 0 0 0 3px rgba(184,147,63,.12); outline: none; }
.ctc-upload-dropzone__icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 13px; background: #f1ead9; color: #96752e; }
.ctc-upload-dropzone__icon svg { width: 27px; height: 27px; }
.ctc-upload-dropzone__copy { display: grid; gap: 4px; min-width: 0; }
.ctc-upload-dropzone__copy strong { color: #302c25; font-size: .92rem; }
.ctc-upload-dropzone__copy small { color: #797367; }
.ctc-upload-dropzone__button { padding: 9px 13px; border: 1px solid #e2d6b9; border-radius: 9px; background: #fff; color: #806121; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.ctc-file-input { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.ctc-file-input:focus-visible + * { outline: 2px solid #ad8a3c; }
.ctc-file-status { display: block; min-height: 0; margin-top: 7px; color: #426b50; font-size: .86rem; overflow-wrap: anywhere; }
.ctc-file-status:empty { display: none; }
.ctc-file-status.is-error { color: #a72d24; }
.ctc-receipt-field.has-error .ctc-upload-dropzone { border-color: #c4473c; background: #fff7f6; }
.ctc-receipt-field .ctc-hint { display: block; margin-top: 7px; color: #797367; }
.ctc-receipt-feedback[hidden], .ctc-upload-progress[hidden] { display: none !important; }
.ctc-receipt-preview { display: grid; grid-template-columns: 76px minmax(0,1fr) auto; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border: 1px solid #e8e3d9; border-radius: 12px; background: #fff; }
.ctc-receipt-preview__image { display: block; width: 76px; height: 76px; border: 1px solid #eee9df; border-radius: 9px; background: #faf9f6; object-fit: contain; }
.ctc-receipt-preview__image[hidden], .ctc-receipt-preview__document[hidden] { display: none; }
.ctc-receipt-preview__document { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 9px; background: #f4efe2; color: #8b6b2d; font-size: .8rem; font-weight: 800; }
.ctc-receipt-preview__meta { display: grid; gap: 3px; min-width: 0; }
.ctc-receipt-preview__name { overflow-wrap: anywhere; color: #302c25; font-size: .86rem; }
.ctc-receipt-preview__size { color: #797367; font-size: .76rem; }
.ctc-receipt-preview__remove { min-height: 40px; padding: 7px 11px; border: 1px solid #ead5d1; border-radius: 9px; background: #fff; color: #a34239; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.ctc-receipt-preview__remove:hover { border-color: #d9aaa3; background: #fff4f2; }
.ctc-upload-progress { margin-top: 10px; padding: 10px 12px; border: 1px solid #e8e3d9; border-radius: 10px; background: #fbfaf7; }
.ctc-upload-progress__meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: #6f695e; font-size: .78rem; }
.ctc-upload-progress__percent { color: #806121; font-variant-numeric: tabular-nums; }
.ctc-upload-progress__track { height: 7px; overflow: hidden; border-radius: 8px; background: #eeeae1; }
.ctc-upload-progress__track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#b89950,#856522); transition: width .12s linear; }
@media (max-width: 560px) {
	.ctc-payment-fields .ctc-card-option { min-height: 176px; padding: 16px; }
	.ctc-card-option__body { min-height: 140px; }
	.ctc-upload-dropzone { grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 13px; }
	.ctc-upload-dropzone__icon { grid-column: 1; grid-row: 1; width: 42px; height: 42px; }
	.ctc-upload-dropzone__copy { grid-column: 2; grid-row: 1; }
	.ctc-upload-dropzone__button { grid-column: 2; grid-row: 2; justify-self: start; margin: 0; }
	.ctc-receipt-preview { grid-template-columns: 56px minmax(0,1fr); }
	.ctc-receipt-preview__image, .ctc-receipt-preview__document { grid-row: 1 / span 2; width: 56px; height: 56px; }
	.ctc-receipt-preview__remove { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
	.ctc-payment-fields .ctc-card-option, .ctc-upload-dropzone { transition: none; }
}
.ctc-card-option__head::after { content: ""; position: absolute; inset-inline-end: 0; top: 3px; width: 17px; height: 17px; border: 2px solid #b8a671; border-radius: 50%; }
.ctc-card-option:has(input:checked) .ctc-card-option__head::after { border-color: #ad8a3c; background: #ad8a3c; box-shadow: inset 0 0 0 4px #fffdf8; }

.ctc-payment-fields, .ctc-payment-fields button, .ctc-payment-fields input, .ctc-payment-fields select, .ctc-payment-fields textarea, .ctc-thankyou, .ctc-account-block { font-family: 'Peyda', Tahoma, sans-serif; }

/* Adapt to the actual gateway width, including narrow desktop sidebars. */
.ctc-payment-fields { container: ctc-panel / inline-size; }
.ctc-payment-fields .ctc-card-option__holder { display: flex; justify-content: space-between; gap: 10px; }
.ctc-payment-fields .ctc-card-option__holder small { color: #777064; }
.ctc-payment-fields .ctc-card-option__sheba { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid #e4dccb; }
.ctc-payment-fields .ctc-copy-btn { line-height: 1.5; }
.ctc-payment-fields .ctc-upload-dropzone__copy strong { line-height: 1.7; overflow-wrap: normal; word-break: normal; }
.ctc-payment-fields .ctc-upload-dropzone__copy small { font-size: .78rem; line-height: 1.7; }
@container ctc-panel (max-width: 380px) {
 .ctc-upload-dropzone { grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 13px; }
 .ctc-upload-dropzone__icon { grid-column: 1; grid-row: 1; width: 42px; height: 42px; }
 .ctc-upload-dropzone__copy { grid-column: 2; grid-row: 1; }
 .ctc-upload-dropzone__button { grid-column: 2; grid-row: 2; justify-self: start; margin: 0; }
 .ctc-payment-fields .ctc-card-option { padding: 16px; }
 .ctc-card-option__number code { font-size: 1rem; letter-spacing: .03em; }
}

/* SVGs must not use their intrinsic 300x150 size inside copy controls. */
.ctc-payment-fields .ctc-card-option .ctc-copy-btn { display: inline-flex; align-items: center; justify-content: center; align-self: center; flex: 0 0 auto; gap: 5px; width: auto; min-width: 0; height: 36px; min-height: 36px; max-height: 36px; padding: 5px 9px; line-height: 1.4; font-size: 12px; }
.ctc-payment-fields .ctc-card-option .ctc-copy-btn svg { display: block; flex: 0 0 16px; width: 16px; height: 16px; max-width: 16px; max-height: 16px; stroke: currentColor; stroke-width: 1.5; }
.ctc-custom-fields .ctc-field.has-error input, .ctc-custom-fields .ctc-field.has-error textarea { border-color: #c9473d; box-shadow: 0 0 0 2px #c9473d16; }
.ctc-input-error { display: block; color: #ad352c; margin-top: 5px; font-size: .8rem; line-height: 1.7; }
.ctc-input-error[hidden] { display: none; }
