/* Alfatah Exam Section — Frontend styles */

.afx-es-wrap {
	--afx-primary: #0f4d3a;
	--afx-secondary: #1f6b45;
	--afx-accent: #d9a134;
	--afx-text: #1a1a1a;

	max-width: 780px;
	margin: 30px auto;
	padding: 32px 36px;
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(15, 77, 58, 0.12);
	border: 1px solid rgba(15, 77, 58, 0.08);
	font-family: 'Hind Siliguri', sans-serif;
	color: var(--afx-text);
	box-sizing: border-box;
}
.afx-es-wrap *, .afx-es-wrap *::before, .afx-es-wrap *::after {
	box-sizing: border-box;
}

.afx-es-header {
	text-align: center;
	margin-bottom: 26px;
}
.afx-es-heading {
	font-family: 'Tiro Bangla', serif;
	font-size: 28px;
	color: var(--afx-primary);
	margin: 0 0 8px;
	line-height: 1.4;
}
.afx-es-subheading {
	font-size: 15px;
	color: #555;
	margin: 0;
	line-height: 1.7;
}

.afx-es-locked-badge {
	display: none;
}

.afx-es-reselect-bar {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 20px;
}
.afx-es-reselect-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 999px;
	font-family: 'Hind Siliguri', sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.afx-es-reselect-btn:hover,
.afx-es-reselect-btn:focus {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
	filter: brightness(1.08);
	color: inherit;
	text-decoration: none;
}
.afx-es-reselect-btn:active {
	transform: translateY(0);
	filter: brightness(0.96);
}
.afx-es-reselect-icon {
	flex-shrink: 0;
}

.afx-es-error {
	max-width: 640px;
	margin: 20px auto;
	padding: 14px 18px;
	border-radius: 10px;
	background: #fdecea;
	color: #b32d2e;
	font-size: 14.5px;
	text-align: center;
}

.afx-es-selectors {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
}
.afx-es-field {
	flex: 1 1 260px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.afx-es-field label {
	font-weight: 600;
	font-size: 14px;
	color: var(--afx-primary);
}

.afx-es-select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	padding: 13px 42px 13px 16px;
	font-size: 15px;
	font-family: inherit;
	color: var(--afx-text);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%230f4d3a' d='M7 9 0 0h14z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	border: 2px solid #e2e8e5;
	border-radius: 10px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
}
.afx-es-select:hover:not(:disabled) {
	border-color: var(--afx-secondary);
}
.afx-es-select:focus {
	outline: none;
	border-color: var(--afx-primary);
	box-shadow: 0 0 0 3px rgba(15, 77, 58, 0.15);
}
.afx-es-select:disabled {
	background-color: #f4f5f4;
	color: #9aa39d;
	cursor: not-allowed;
	border-color: #edeeec;
}

.afx-es-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}
.afx-es-tab-btn {
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	padding: 10px 20px;
	border-radius: 999px;
	border: 2px solid var(--afx-secondary);
	background-color: #fff;
	color: var(--afx-secondary);
	font-family: 'Hind Siliguri', sans-serif;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
}
.afx-es-tab-btn:hover {
	background-color: rgba(31, 107, 69, 0.08);
}
.afx-es-tab-btn.is-active,
.afx-es-tab-btn.is-active:hover,
.afx-es-tab-btn.is-active:focus {
	background-color: var(--afx-secondary) !important;
	color: #ffffff !important;
	border-color: var(--afx-secondary) !important;
}

.afx-es-status {
	margin-top: 18px;
	font-size: 14px;
	min-height: 0;
}
.afx-es-status.is-loading {
	color: var(--afx-secondary);
	display: flex;
	align-items: center;
	gap: 10px;
}
.afx-es-status.is-error {
	color: #b3261e;
	background: #fdecea;
	border: 1px solid #f6c6c2;
	padding: 10px 14px;
	border-radius: 8px;
}
.afx-es-status.is-empty {
	color: #8a6d00;
	background: #fdf6e3;
	border: 1px solid #f0dfa8;
	padding: 10px 14px;
	border-radius: 8px;
}

.afx-es-spinner {
	width: 16px;
	height: 16px;
	border: 3px solid rgba(31, 107, 69, 0.25);
	border-top-color: var(--afx-secondary);
	border-radius: 50%;
	animation: afx-es-spin 0.8s linear infinite;
	flex: 0 0 auto;
}
@keyframes afx-es-spin {
	to { transform: rotate(360deg); }
}

.afx-es-quiz-output {
	margin-top: 22px;
}
.afx-es-quiz-output:not(:empty) {
	padding-top: 22px;
	border-top: 2px dashed rgba(217, 161, 52, 0.4);
	animation: afx-es-fadein 0.35s ease;
}
@keyframes afx-es-fadein {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Tablet */
@media (max-width: 992px) {
	.afx-es-wrap {
		max-width: 94%;
		padding: 26px 24px;
	}
	.afx-es-heading {
		font-size: 24px;
	}
}

/* Mobile */
@media (max-width: 576px) {
	.afx-es-wrap {
		padding: 20px 16px;
		border-radius: 14px;
		margin: 18px auto;
	}
	.afx-es-heading {
		font-size: 20px;
	}
	.afx-es-subheading {
		font-size: 13.5px;
	}
	.afx-es-reselect-bar {
		justify-content: center;
		margin: 0 0 16px;
	}
	.afx-es-reselect-btn {
		width: 100%;
		justify-content: center;
		padding: 12px 20px;
		font-size: 13.5px;
	}
	.afx-es-selectors {
		flex-direction: column;
		gap: 14px;
	}
	.afx-es-field {
		flex-basis: auto;
	}
	.afx-es-select {
		padding: 12px 38px 12px 14px;
		font-size: 14px;
	}
	.afx-es-tab-btn {
		font-size: 13px;
		padding: 9px 16px;
	}
}
