/**
 * Frontend CSS - CSTC Result Management
 */

.cstc-result-wrapper {
	max-width: 850px;
	margin: 20px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #2c3e50;
}

/* ==========================================
   1. Search Form Box
   ========================================== */
.cstc-search-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	margin-bottom: 25px;
}

.cstc-search-title {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 20px;
	font-weight: 700;
	color: #1a202c;
	border-bottom: 2px solid #009944;
	padding-bottom: 8px;
	display: inline-block;
}

.cstc-form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
}

.cstc-form-group {
	flex: 1;
	min-width: 200px;
}

.cstc-form-group label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
	color: #4a5568;
}

.cstc-req {
	color: #e53e3e;
}

.cstc-form-group input {
	width: 100%;
	padding: 10px 14px;
	font-size: 15px;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.cstc-form-group input:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.cstc-submit-group {
	flex: 0 0 auto;
}

/* Blue View Results Button */
.cstc-btn-blue {
	background-color: #0073aa;
	color: #ffffff;
	border: none;
	padding: 11px 24px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
}

.cstc-btn-blue:hover {
	background-color: #005177;
}

.cstc-btn-blue:active {
	transform: translateY(1px);
}

.cstc-btn-blue:disabled {
	background-color: #a0aec0;
	cursor: not-allowed;
}

.cstc-message-box {
	margin-top: 15px;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
}

.cstc-msg-error {
	background-color: #fff5f5;
	color: #c53030;
	border: 1px solid #feb2b2;
}

/* ==========================================
   2. Result Marksheet Card Design
   ========================================== */
.cstc-marksheet-card {
	background: #ffffff;
	border: 2px solid #2d3748;
	border-radius: 4px;
	padding: 30px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Top Header Box */
.cstc-marksheet-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2px solid #2d3748;
	padding-bottom: 20px;
	margin-bottom: 25px;
}

.cstc-org-name {
	margin: 0 0 10px 0;
	font-size: 26px;
	font-weight: 800;
	color: #009944;
	letter-spacing: 0.5px;
}

.cstc-header-regi {
	font-size: 16px;
	color: #4a5568;
}

.cstc-header-regi .cstc-val {
	font-weight: 700;
	color: #1a202c;
}

/* Passport Photo Right */
.cstc-header-photo {
	flex: 0 0 auto;
}

.cstc-passport-img {
	width: 120px;
	height: 150px;
	object-fit: cover;
	border: 2px solid #2d3748;
	border-radius: 4px;
	padding: 2px;
	background: #fff;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cstc-placeholder-img {
	opacity: 0.8;
	background: #edf2f7;
}

/* Section Title Headers */
.cstc-section-title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 8px 12px;
	background: #edf2f7;
	color: #2d3748;
	border: 1px solid #cbd5e0;
	border-bottom: none;
	margin-top: 10px;
}

/* Middle Section: 2-Column Bordered Table */
.cstc-info-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 25px;
}

.cstc-info-table td {
	border: 1px solid #cbd5e0;
	padding: 10px 14px;
	font-size: 14px;
}

.cstc-td-label {
	width: 20%;
	background-color: #f7fafc;
	font-weight: 600;
	color: #4a5568;
}

.cstc-td-val {
	width: 30%;
	color: #1a202c;
}

/* Result Status Badges */
.cstc-result-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 4px;
	font-weight: 700;
	font-size: 13px;
}

.cstc-badge-passed {
	background-color: #e6f4ea;
	color: #009944;
	border: 1px solid #009944;
}

.cstc-badge-failed {
	background-color: #fff5f5;
	color: #e53e3e;
	border: 1px solid #e53e3e;
}

/* Print Button Box */
.cstc-card-actions {
	text-align: right;
	margin-top: 20px;
}

.cstc-print-btn {
	background-color: #2b6cb0;
	color: #ffffff;
	border: none;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cstc-print-btn:hover {
	background-color: #2c5282;
}

/* ==========================================
   3. Clean Print CSS (@media print)
   ========================================== */
@media print {
	/* Hide everything on page except the printable marksheet */
	body * {
		visibility: hidden !important;
	}

	#printable-marksheet, #printable-marksheet * {
		visibility: visible !important;
	}

	#printable-marksheet {
		position: absolute !important;
		left: 0 !important;
		top: 0 !important;
		width: 100% !important;
		border: 2px solid #000 !important;
		box-shadow: none !important;
		padding: 20px !important;
		margin: 0 !important;
		background: #fff !important;
	}

	.cstc-no-print {
		display: none !important;
	}

	.cstc-badge-passed {
		background-color: #e6f4ea !important;
		color: #009944 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}
