/* صفحه ثبت‌نام آزمون — فونت و دکمه‌ها هم‌تراز با agency-home */

:root {
	--kah-font-stack: iransans, Vazirmatn, Tahoma, sans-serif;
	--kah-exam-blue: #1e3a8a;
	--kah-exam-blue-hover: #1d4ed8;
	--kah-exam-green: #10b981;
	--kah-exam-green-hover: #059669;
	--kah-exam-red: #dc2626;
	--kah-exam-red-hover: #b91c1c;
	--kah-exam-outline: #2563eb;
}

html:has(body.kah-exam-register-body),
body.kah-exam-register-body {
	overflow-x: hidden;
	overscroll-behavior-x: none;
}

.kah-exam-register-body,
.kah-exam-register-body .kah-exam-register-page,
.kah-exam-register-body .kcp-site-header,
.kah-exam-register-body .kcp-reg-form,
.kah-exam-register-body .kah-exam-panel,
.kah-exam-register-body .kah-exam-modal-dialog {
	font-family: var(--kah-font-stack);
	color: #3b3b4f;
}

.kah-exam-register-body button,
.kah-exam-register-body input,
.kah-exam-register-body select,
.kah-exam-register-body textarea {
	font-family: var(--kah-font-stack);
}

.kah-exam-register-page {
	padding: 24px 0 48px;
	background: #f3f4f6;
	min-height: 60vh;
}

.kah-exam-register-wrap {
	max-width: 1100px;
	margin: 0 auto;
}

.kah-exam-step[hidden],
.kah-exam-mode-card[hidden],
.kah-exam-mode-card.is-hidden {
	display: none !important;
}

.kah-exam-summary-dual {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	align-items: stretch;
}

.kah-exam-summary-dual.is-single {
	grid-template-columns: minmax(0, 560px);
	justify-content: center;
}

.kah-exam-panel {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
	padding: 16px 18px;
	margin-bottom: 16px;
}

.kah-exam-mode-card {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.kah-exam-mode-card.is-unavailable {
	opacity: 0.85;
	background: #fafafa;
}

.kah-exam-panel-title {
	color: var(--kah-exam-red);
	font-size: 15px;
	font-weight: 800;
	margin: 0 0 8px;
	line-height: 1.5;
}

.kah-exam-panel-desc {
	color: #6b7280;
	margin-bottom: 8px;
	font-size: 12.5px;
}

.kah-exam-panel-desc p {
	margin: 4px 0 0;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.kah-exam-summary-list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
}

.kah-exam-summary-list li {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: baseline;
	padding: 7px 0;
	border-bottom: 1px solid #e5e7eb;
	font-size: 13px;
}

.kah-exam-summary-list li.kah-exam-payable {
	border-bottom: none;
	padding-top: 10px;
}

.kah-exam-summary-list strong {
	font-weight: 800;
}

.kah-exam-blue { color: #2563eb; }
.kah-exam-orange { color: #f59e0b; }
.kah-exam-red { color: var(--kah-exam-red); }
.kah-exam-green { color: var(--kah-exam-green); font-size: 16px; }

.kah-exam-mode-error {
	margin: 8px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fef2f2;
	color: #b91c1c;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
}

/* دکمه‌های اصلی */
.kah-exam-primary-btn,
.kah-exam-outline-btn,
.kah-exam-green-btn,
.kah-exam-modal-ok,
.kah-exam-link-btn,
#submit-btn-new {
	font-family: var(--kah-font-stack) !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
	text-decoration: none;
	box-sizing: border-box;
}

.kah-exam-primary-btn {
	display: block;
	width: 100%;
	border: none;
	border-radius: 10px;
	background: var(--kah-exam-blue);
	color: #fff;
	padding: 11px 14px;
	cursor: pointer;
	margin-top: 8px;
	transition: background 0.2s ease, transform 0.15s ease;
	box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
	font-size: 13.5px !important;
}

.kah-exam-primary-btn:hover {
	background: var(--kah-exam-blue-hover);
	transform: translateY(-1px);
}

.kah-exam-summary-actions {
	margin-top: auto;
	padding-top: 10px;
}

.kah-exam-summary-secondary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 8px;
}

.kah-exam-outline-btn,
.kah-exam-green-btn {
	min-width: 0;
	width: 100%;
	border-radius: 10px;
	padding: 10px 8px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
	font-size: 12.5px !important;
	line-height: 1.35 !important;
	text-align: center;
}

.kah-exam-outline-btn {
	background: #fff;
	border: 2px solid var(--kah-exam-outline);
	color: var(--kah-exam-outline);
}

.kah-exam-outline-btn:hover {
	background: #eff6ff;
	border-color: #1d4ed8;
	color: #1d4ed8;
}

.kah-exam-green-btn {
	background: var(--kah-exam-green);
	border: 2px solid var(--kah-exam-green);
	color: #fff;
	box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.kah-exam-green-btn:hover {
	background: var(--kah-exam-green-hover);
	border-color: var(--kah-exam-green-hover);
	transform: translateY(-1px);
}

.kah-exam-installment-head {
	font-size: 17px;
	font-weight: 800;
	margin: 0 0 10px;
}

.kah-exam-muted {
	color: #6b7280;
	font-size: 14px;
	line-height: 1.8;
	margin-bottom: 16px;
}

.kah-exam-field-inline {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.kah-exam-field-inline span {
	font-weight: 600;
	font-size: 14px;
}

#kah-exam-installment-count,
.kah-exam-field-inline select {
	min-width: 140px;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-family: var(--kah-font-stack);
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	background: #fff;
	cursor: pointer;
}

#kah-exam-installment-count:focus,
.kah-exam-field-inline select:focus {
	outline: none;
	border-color: #8b5cf6;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.kah-exam-installment-block {
	padding: 18px 0;
	border-top: 1px solid #e5e7eb;
}

.kah-exam-installment-block:first-child {
	border-top: none;
}

.kah-exam-installment-block h4 {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 800;
}

.kah-exam-payable-line {
	margin: 8px 0 12px;
}

.kah-exam-em-red { color: var(--kah-exam-red); font-weight: 700; }
.kah-exam-em-green { color: var(--kah-exam-green); font-weight: 700; }
.kah-exam-em-blue { color: #2563eb; font-weight: 700; }

/* بازگشت به خلاصه */
.kah-exam-link-btn,
#kah-exam-back-summary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 16px;
	padding: 11px 20px;
	border: 1px solid #c4b5fd;
	border-radius: 12px;
	background: #faf5ff;
	color: #5b21b6;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.kah-exam-link-btn:hover,
#kah-exam-back-summary:hover {
	background: #f3e8ff;
	border-color: #a855f7;
	color: #4c1d95;
}

.kah-exam-step--installment .kah-exam-link-btn {
	margin-top: 8px;
}

/* مودال ویژگی‌ها */
.kah-exam-modal {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 10000;
}

.kah-exam-modal.is-open {
	display: flex;
}

.kah-exam-modal-dialog {
	background: #fff;
	border-radius: 16px;
	max-width: 720px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	padding: 0;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.kah-exam-modal-body {
	padding: 24px 28px 28px;
}

.kah-exam-modal-body h2 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.6;
}

.kah-exam-modal-body h3 {
	margin: 18px 0 10px;
	font-size: 15px;
	font-weight: 800;
}

.kah-exam-modal-body p {
	margin: 0 0 10px;
	line-height: 1.9;
	font-size: 14px;
}

.kah-exam-features-list {
	margin: 0 0 24px;
	padding-right: 20px;
	line-height: 1.9;
	font-size: 14px;
}

.kah-exam-modal-ok,
#kah-exam-features-close {
	display: block;
	width: 100%;
	border: none;
	border-radius: 12px;
	background: var(--kah-exam-red);
	color: #fff;
	font-weight: 800;
	font-size: 16px;
	padding: 15px 20px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
	box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
	margin-top: 4px;
}

.kah-exam-modal-ok:hover,
#kah-exam-features-close:hover {
	background: var(--kah-exam-red-hover);
	transform: translateY(-1px);
}

.kah-exam-form-card {
	margin: 0;
}

.kah-exam-due-note {
	margin: 6px 0 10px;
	font-size: 13px;
	color: #2563eb;
	line-height: 1.7;
}

.kah-exam-locked-msg {
	margin: 8px 0 0;
	font-size: 12.5px;
	color: #9ca3af;
	line-height: 1.7;
}

.kah-exam-paid-badge {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 14px;
	border-radius: 10px;
	background: #d1fae5;
	color: #047857;
	font-weight: 700;
}

.kah-exam-primary-btn.is-disabled,
.kah-exam-primary-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none;
}

.kah-exam-installment-block.is-locked {
	opacity: 0.92;
}

@media (max-width: 900px) {
	.kah-exam-summary-dual {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

@media (max-width: 768px) {
	.kah-exam-register-page,
	.kah-exam-register-wrap,
	.kah-exam-summary-dual,
	.kah-exam-panel,
	.kah-exam-form-card,
	.kcp-reg-card,
	.kcp-reg-form,
	.kah-exam-summary-actions,
	.kah-exam-summary-secondary {
		max-width: 100%;
		box-sizing: border-box;
	}
	.kah-exam-register-page {
		padding: 14px 0 28px;
	}
	.kah-exam-panel {
		padding: 12px 12px;
		border-radius: 12px;
	}
	.kah-exam-panel-title {
		font-size: 14px;
		margin-bottom: 6px;
	}
	.kah-exam-panel-desc {
		margin-bottom: 6px;
		font-size: 12px;
	}
	.kah-exam-panel-desc p {
		-webkit-line-clamp: 2;
		line-height: 1.5;
	}
	.kah-exam-summary-list li {
		padding: 5px 0;
		font-size: 12.5px;
		gap: 4px;
	}
	.kah-exam-summary-list li.kah-exam-payable {
		padding-top: 8px;
	}
	.kah-exam-green { font-size: 15px; }
	.kah-exam-summary-actions {
		padding-top: 6px;
	}
	.kah-exam-primary-btn {
		padding: 10px 12px;
		font-size: 13px !important;
		margin-top: 6px;
		white-space: normal;
		word-break: break-word;
	}
	.kah-exam-summary-secondary {
		grid-template-columns: 1fr;
		gap: 6px;
		margin-top: 6px;
	}
	.kah-exam-outline-btn,
	.kah-exam-green-btn {
		padding: 9px 6px;
		font-size: 11.5px !important;
		white-space: normal;
		word-break: break-word;
	}
	.kah-exam-modal-body {
		padding: 16px 14px 18px;
	}
}
