/**
 * Quick checkout canvas (buy link + custom amount).
 *
 * Font faces stay here so blank canvases do not depend on theme/Elementor.
 * Family tokens come from hafez-typography.css (--hafez-font-body / heading).
 */

@font-face {
	font-family: "IRANSans";
	src: url("../fonts/iransans-fa.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IRANSans";
	src: url("../fonts/iransans.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.hafez-qc-canvas,
body.hafez-tools-page,
body.hafez-qc-canvas .hafez-qc,
body.hafez-tools-page .hafez-qc,
body.hafez-qc-canvas input,
body.hafez-qc-canvas select,
body.hafez-qc-canvas textarea,
body.hafez-qc-canvas button,
body.hafez-tools-page input,
body.hafez-tools-page select,
body.hafez-tools-page textarea,
body.hafez-tools-page button {
	font-family: var(--hafez-font-body, "IRANSans", Tahoma, Arial, sans-serif);
}

body.hafez-qc-canvas .hafez-qc__title,
body.hafez-qc-canvas .hafez-qc__card h2,
body.hafez-tools-page .hafez-qc__title,
body.hafez-tools-page .hafez-qc__card h2 {
	font-family: var(--hafez-font-heading, var(--hafez-font-body, "IRANSans", Tahoma, Arial, sans-serif));
}

body.hafez-qc-canvas {
	margin: 0;
	background: var(--hafez-color-bg, #f6f3f0);
	color: var(--hafez-color-text-body, #1d2327);
}

.hafez-qc {
	min-height: 100vh;
	padding: 24px 16px 48px;
	box-sizing: border-box;
}

.hafez-qc__shell {
	max-width: 560px;
	margin: 0 auto;
}

body.hafez-qc-canvas .hafez_kyc__logo,
body.hafez-tools-page .hafez_kyc__logo,
.hafez-qc .hafez_kyc__logo {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 8px 0 4px;
	text-align: center;
}

body.hafez-qc-canvas .hafez_kyc__logo-link,
body.hafez-tools-page .hafez_kyc__logo-link,
.hafez-qc .hafez_kyc__logo-link {
	display: inline-flex;
	justify-content: center;
	line-height: 0;
}

body.hafez-qc-canvas .hafez_kyc__logo img,
body.hafez-tools-page .hafez_kyc__logo img,
.hafez-qc .hafez_kyc__logo img {
	display: block;
	width: auto;
	max-width: 168px;
	height: auto;
	max-height: 56px;
	margin-inline: auto;
	object-fit: contain;
}

.hafez-qc__stage {
	margin-top: 16px;
}

.hafez-qc__head {
	margin-bottom: 16px;
	text-align: center;
}

.hafez-qc__title {
	margin: 0 0 8px;
	font-size: 1.4rem;
	font-weight: 700;
}

.hafez-qc__price {
	font-size: 1.1rem;
	color: #9a3412;
	font-weight: 600;
}

.hafez-qc__amount-words {
	margin: 8px 0 0;
	padding: 0;
	color: var(--hafez-color-text-muted, #6e6560);
	font-size: 0.92rem;
	line-height: 1.55;
	text-align: center;
}

.hafez-qc__card .hafez-qc__amount-words {
	text-align: start;
}

.hafez-qc__amount-words:empty {
	display: none;
}

.hafez-qc__card {
	background: #fff;
	border: 1px solid #e5e1dc;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.hafez-qc__card h2 {
	margin: 0 0 12px;
	font-size: 1rem;
}

.hafez-qc__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}

.hafez-qc__field span {
	font-weight: 600;
	font-size: 0.9rem;
}

.hafez-qc__field input,
.hafez-qc__field select,
.hafez-qc__field textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 8px;
	background: #fff;
}

.hafez-qc__attr {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.hafez-qc__attr-label {
	font-weight: 600;
	font-size: 0.9rem;
}

.hafez-qc__swatches,
.hafez-qc__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hafez-qc__swatch,
.hafez-qc__pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
	user-select: none;
}

.hafez-qc__swatch input,
.hafez-qc__pill input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.hafez-qc__swatch {
	padding: 6px 12px 6px 8px;
	border: 1px solid #dcdcde;
	border-radius: 999px;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hafez-qc__swatch-dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--hafez-swatch, #64748b);
	border: 1px solid rgba(0, 0, 0, 0.12);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
	flex-shrink: 0;
}

.hafez-qc__swatch-name {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
}

.hafez-qc__swatch:has(input:checked),
.hafez-qc__swatch:has(input:focus-visible) {
	border-color: #F15A24;
	background: #fff7f3;
	box-shadow: 0 0 0 1px #F15A24;
}

.hafez-qc__pill span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid #dcdcde;
	border-radius: 999px;
	background: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hafez-qc__pill:has(input:checked) span,
.hafez-qc__pill:has(input:focus-visible) span {
	border-color: #F15A24;
	background: #F15A24;
	color: #fff;
	box-shadow: 0 0 0 1px #F15A24;
}

.hafez-qc__gateways {
	border: 0;
	margin: 8px 0 0;
	padding: 0;
}

.hafez-qc__gateways legend {
	font-weight: 700;
	margin-bottom: 8px;
}

.hafez-qc__gateway {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	margin-bottom: 8px;
	background: #fafafa;
	cursor: pointer;
}

.hafez-qc__gateway:has(input:checked) {
	border-color: #F15A24;
	background: #fff7f3;
}

.hafez-qc__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 8px;
}

.hafez-qc__btn {
	appearance: none;
	border: 0;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.hafez-qc__btn--primary {
	background: #F15A24;
	color: #fff;
}

.hafez-qc__btn[disabled] {
	opacity: 0.7;
	cursor: wait;
}

.hafez-qc__msg {
	margin: 10px 0 0;
	color: #b32d2e;
}

.hafez-qc__error {
	padding: 16px;
	background: #fff;
	border-radius: 10px;
}
