.badgehub-wrapper {
	max-width: 900px;
	margin: 0 auto;
	font-family: "Vazirmatn", Tahoma, sans-serif;
	direction: rtl;
	text-align: right;
}

.badgehub-search-form {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	flex-wrap: wrap;
	direction: rtl;
}

.badgehub-input {
	flex: 1;
	min-width: 200px;
	padding: 10px 12px;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	font-family: inherit;
	font-size: 14px;
	direction: rtl;
	text-align: right;
}

.badgehub-btn {
	padding: 10px 18px;
	border-radius: 6px;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
}

.badgehub-btn-outline {
	background: transparent;
	color: #2271b1;
}

.badgehub-btn:hover {
	opacity: 0.9;
}

.badgehub-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.badgehub-card {
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 20px;
	background: #fff;
}

.badgehub-not-found {
	text-align: center;
	border-color: #d63638;
}

.badgehub-not-found-title {
	font-weight: bold;
	color: #d63638;
	font-size: 18px;
}

/* ===== گواهی به‌صورت overlay روی تصویر پس‌زمینه ===== */

.badgehub-certificate-outer {
	width: 100%;
}

.badgehub-cert-canvas {
	position: relative;
	width: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 6px;
	overflow: hidden;
	container-type: inline-size;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

.badgehub-cert-field {
	position: absolute;
	transform: translate(-50%, -50%);
	line-height: 1.5;
	text-decoration: none !important;
}

.badgehub-cert-field a {
	color: inherit !important;
	text-decoration: none !important;
}

.badgehub-align-center {
	transform: translate(-50%, -50%);
	text-align: center;
}

.badgehub-align-right {
	transform: translate(-100%, -50%);
	text-align: right;
}

.badgehub-align-left {
	transform: translate(0, -50%);
	text-align: left;
}

.badgehub-field-nowrap {
	white-space: nowrap;
}

.badgehub-field-wrap {
	white-space: pre-wrap;
	max-width: 75cqw;
	word-break: break-word;
}

.badgehub-cert-image {
	position: absolute;
	transform: translate(-50%, -50%);
	height: auto;
	max-width: none;
}

.badgehub-cert-photo {
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 2px;
	background: #f5f5f5;
}

.badgehub-cert-actions {
	margin-top: 16px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

@media print {
	.badgehub-no-print,
	.badgehub-search-form {
		display: none !important;
	}

	.badgehub-cert-canvas {
		box-shadow: none;
	}

	body * {
		visibility: hidden;
	}

	#badgehub-print-area,
	#badgehub-print-area * {
		visibility: visible;
	}

	#badgehub-print-area {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
	}
}
