/**
 * CBSE Admission Enquiry Form - Frontend Styling
 */

:root {
	--cbse-primary: #1e3a8a;
	--cbse-primary-hover: #1e40af;
	--cbse-accent: #2563eb;
	--cbse-accent-light: #eff6ff;
	--cbse-text-dark: #1e293b;
	--cbse-text-muted: #64748b;
	--cbse-border: #cbd5e1;
	--cbse-border-light: #e2e8f0;
	--cbse-bg-card: #ffffff;
	--cbse-bg-subtle: #f8fafc;
	--cbse-success: #16a34a;
	--cbse-success-light: #f0fdf4;
	--cbse-danger: #dc2626;
	--cbse-danger-light: #fef2f2;
	--cbse-radius-sm: 6px;
	--cbse-radius-md: 10px;
	--cbse-radius-lg: 16px;
	--cbse-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
	--cbse-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cbse-enquiry-wrapper {
	font-family: var(--cbse-font-stack);
	color: var(--cbse-text-dark);
	margin: 25px auto;
	max-width: 1200px;
	box-sizing: border-box;
	line-height: 1.5;
}

.cbse-enquiry-wrapper * {
	box-sizing: border-box;
}

.cbse-enquiry-container {
	display: grid;
	gap: 28px;
}

.cbse-enquiry-container.has-sidebar {
	grid-template-columns: 1fr;
}

@media (min-width: 992px) {
	.cbse-enquiry-container.has-sidebar {
		grid-template-columns: 2.2fr 1fr;
	}
}

/* Main Form Card */
.cbse-enquiry-main {
	background: var(--cbse-bg-card);
	border-radius: var(--cbse-radius-lg);
	box-shadow: var(--cbse-shadow);
	border: 1px solid var(--cbse-border-light);
	padding: 32px 36px;
}

@media (max-width: 600px) {
	.cbse-enquiry-main {
		padding: 22px 18px;
	}
}

/* Form Header */
.cbse-form-header {
	margin-bottom: 30px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--cbse-border-light);
}

.cbse-badge-pill {
	display: inline-block;
	background: var(--cbse-accent-light);
	color: var(--cbse-accent);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 4px 12px;
	border-radius: 9999px;
	margin-bottom: 12px;
}

.cbse-form-title {
	font-size: 26px;
	font-weight: 800;
	color: var(--cbse-primary);
	margin: 0 0 10px 0;
	line-height: 1.25;
}

.cbse-form-subtitle {
	font-size: 15px;
	color: var(--cbse-text-muted);
	margin: 0 0 14px 0;
	line-height: 1.5;
}

.cbse-response-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f1f5f9;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: var(--cbse-radius-sm);
}

/* Form Sections */
.cbse-form-section {
	margin-bottom: 34px;
	padding-bottom: 28px;
	border-bottom: 1px dashed var(--cbse-border-light);
}

.cbse-form-section:last-of-type {
	border-bottom: none;
	margin-bottom: 20px;
	padding-bottom: 0;
}

.cbse-section-header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 22px;
}

.cbse-section-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: var(--cbse-primary);
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	border-radius: 50%;
	flex-shrink: 0;
}

.cbse-section-title-wrap {
	flex: 1;
}

.cbse-section-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--cbse-primary);
	margin: 0 0 4px 0;
}

.cbse-section-desc {
	font-size: 13px;
	color: var(--cbse-text-muted);
	margin: 0;
}

/* Grid Layouts */
.cbse-form-grid {
	display: grid;
	gap: 18px;
}

.cbse-grid-2 {
	grid-template-columns: 1fr;
}

.cbse-grid-3 {
	grid-template-columns: 1fr;
}

@media (min-width: 650px) {
	.cbse-grid-2 {
		grid-template-columns: 1fr 1fr;
	}
	.cbse-grid-3 {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

/* Form Groups & Inputs */
.cbse-form-group {
	margin-bottom: 16px;
}

.cbse-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--cbse-text-dark);
	margin-bottom: 6px;
}

.cbse-required {
	color: var(--cbse-danger);
	font-weight: 700;
}

.cbse-optional {
	font-size: 12px;
	color: var(--cbse-text-muted);
	font-weight: normal;
}

.cbse-input,
.cbse-select,
.cbse-textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--cbse-border);
	border-radius: var(--cbse-radius-sm);
	background: #ffffff;
	font-size: 14px;
	color: var(--cbse-text-dark);
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.cbse-input:focus,
.cbse-select:focus,
.cbse-textarea:focus {
	outline: none;
	border-color: var(--cbse-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cbse-input.is-invalid,
.cbse-select.is-invalid {
	border-color: var(--cbse-danger);
	background-color: var(--cbse-danger-light);
}

.cbse-field-error {
	display: block;
	color: var(--cbse-danger);
	font-size: 12px;
	margin-top: 4px;
	font-weight: 500;
}

.cbse-helper-text {
	display: block;
	font-size: 12px;
	color: var(--cbse-text-muted);
	margin-top: 5px;
	line-height: 1.4;
}

.cbse-input-with-prefix {
	display: flex;
	align-items: center;
}

.cbse-input-prefix {
	background: #f1f5f9;
	border: 1px solid var(--cbse-border);
	border-right: none;
	border-radius: var(--cbse-radius-sm) 0 0 var(--cbse-radius-sm);
	padding: 10px 12px;
	font-size: 14px;
	color: #475569;
	font-weight: 600;
}

.cbse-input-with-prefix .cbse-input {
	border-radius: 0 var(--cbse-radius-sm) var(--cbse-radius-sm) 0;
}

.cbse-whatsapp-check {
	margin-top: 6px;
}

/* Checkbox & Radios */
.cbse-checkbox-label,
.cbse-radio-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #334155;
	cursor: pointer;
}

.cbse-radio-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 6px;
}

.cbse-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 6px;
}

/* Conditional highlight box */
.cbse-conditional-field {
	margin-top: 14px;
	margin-bottom: 18px;
}

.cbse-highlight-box {
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-left: 4px solid var(--cbse-accent);
	border-radius: var(--cbse-radius-sm);
	padding: 16px;
}

/* Co-curricular Pills */
.cbse-checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 10px;
	margin-top: 8px;
}

.cbse-pill-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f8fafc;
	border: 1px solid var(--cbse-border);
	border-radius: 20px;
	padding: 7px 14px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
}

.cbse-pill-checkbox:hover {
	background: #e2e8f0;
}

.cbse-pill-checkbox input:checked + .cbse-pill-text {
	font-weight: 600;
	color: var(--cbse-accent);
}

/* Documents Section */
.cbse-docs-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@media (min-width: 600px) {
	.cbse-docs-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.cbse-doc-card {
	display: flex;
	gap: 12px;
	background: var(--cbse-bg-subtle);
	border: 1px solid var(--cbse-border);
	border-radius: var(--cbse-radius-md);
	padding: 14px;
}

.cbse-doc-icon {
	font-size: 24px;
	flex-shrink: 0;
	margin-top: 2px;
}

.cbse-doc-meta {
	flex: 1;
}

.cbse-doc-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--cbse-text-dark);
	margin: 0 0 3px 0;
}

.cbse-doc-formats {
	font-size: 11px;
	color: var(--cbse-text-muted);
	display: block;
	margin-bottom: 8px;
}

.cbse-file-input {
	font-size: 12px;
	width: 100%;
}

.cbse-doc-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #64748b;
	margin-top: 6px;
	cursor: pointer;
}

.cbse-docs-note {
	font-size: 13px;
	color: var(--cbse-text-muted);
	margin-top: 14px;
}

/* Footer & CTA */
.cbse-form-footer {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid var(--cbse-border-light);
}

.cbse-consent-block {
	background: #f8fafc;
	border: 1px solid var(--cbse-border-light);
	border-radius: var(--cbse-radius-md);
	padding: 16px;
	margin-bottom: 20px;
}

.cbse-consent-text {
	font-size: 13px;
	color: #334155;
	line-height: 1.4;
}

.cbse-privacy-note {
	font-size: 12px;
	color: #64748b;
	margin: 8px 0 0 24px;
}

.cbse-alert-error {
	background: var(--cbse-danger-light);
	border: 1px solid #fca5a5;
	color: var(--cbse-danger);
	padding: 12px 16px;
	border-radius: var(--cbse-radius-sm);
	font-size: 14px;
	margin-bottom: 18px;
}

.cbse-submit-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

@media (min-width: 600px) {
	.cbse-submit-wrap {
		flex-direction: row;
		justify-content: space-between;
	}
}

.cbse-btn-primary {
	background: var(--cbse-primary);
	color: #ffffff;
	border: none;
	border-radius: var(--cbse-radius-sm);
	font-size: 16px;
	font-weight: 700;
	padding: 14px 28px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: background 0.2s, transform 0.1s;
	width: 100%;
}

@media (min-width: 600px) {
	.cbse-btn-primary {
		width: auto;
	}
}

.cbse-btn-primary:hover {
	background: var(--cbse-primary-hover);
}

.cbse-btn-primary:active {
	transform: scale(0.99);
}

.cbse-btn-primary:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.cbse-btn-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: cbse-spin 0.8s linear infinite;
}

@keyframes cbse-spin {
	to { transform: rotate(360deg); }
}

.cbse-assurance-text {
	font-size: 13px;
	color: #475569;
	font-weight: 500;
}

.cbse-check-green {
	color: var(--cbse-success);
	font-weight: bold;
}

/* Sidebar Styles */
.cbse-enquiry-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cbse-sidebar-card {
	background: #ffffff;
	border: 1px solid var(--cbse-border-light);
	border-radius: var(--cbse-radius-lg);
	box-shadow: var(--cbse-shadow);
	padding: 24px;
}

.cbse-trust-card {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border-top: 4px solid var(--cbse-primary);
}

.cbse-trust-header {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--cbse-border-light);
}

.cbse-school-icon {
	font-size: 32px;
}

.cbse-sidebar-school {
	font-size: 17px;
	font-weight: 800;
	color: var(--cbse-primary);
	margin: 0;
}

.cbse-sidebar-badge {
	font-size: 11px;
	color: #0369a1;
	background: #e0f2fe;
	padding: 2px 8px;
	border-radius: 4px;
	font-weight: 600;
	display: inline-block;
	margin-top: 4px;
}

.cbse-highlights-heading {
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 14px 0;
}

.cbse-highlights-list {
	list-style: none;
	padding: 0;
	margin: 0 0 20px 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cbse-highlights-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
}

.cbse-list-bullet {
	background: #dcfce7;
	color: var(--cbse-success);
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 11px;
	flex-shrink: 0;
	margin-top: 2px;
}

.cbse-highlights-list strong {
	display: block;
	color: #1e293b;
	margin-bottom: 2px;
	font-size: 13px;
}

.cbse-highlights-list p {
	margin: 0;
	color: #64748b;
	line-height: 1.4;
	font-size: 12px;
}

.cbse-sidebar-contact {
	border-top: 1px solid var(--cbse-border-light);
	padding-top: 18px;
}

.cbse-call-box {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	padding: 12px 14px;
	border-radius: var(--cbse-radius-md);
}

.cbse-call-icon {
	font-size: 22px;
}

.cbse-call-label {
	font-size: 11px;
	text-transform: uppercase;
	color: #1e40af;
	font-weight: 700;
}

.cbse-call-link {
	font-size: 15px;
	font-weight: 800;
	color: var(--cbse-primary);
	text-decoration: none;
}

.cbse-call-link:hover {
	text-decoration: underline;
}

/* Thank You View */
.cbse-thank-you {
	text-align: center;
	padding: 30px 10px;
}

.cbse-ty-icon-wrap {
	display: inline-block;
	margin-bottom: 16px;
}

.cbse-ty-icon {
	width: 64px;
	height: 64px;
	background: #22c55e;
	color: #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	font-weight: bold;
	margin: 0 auto;
	box-shadow: 0 0 0 8px #dcfce7;
}

.cbse-ty-title {
	font-size: 24px;
	font-weight: 800;
	color: var(--cbse-primary);
	margin: 0 0 8px 0;
}

.cbse-ty-subtitle {
	font-size: 15px;
	color: #475569;
	margin: 0 0 24px 0;
}

.cbse-ty-meta-box {
	display: flex;
	justify-content: center;
	gap: 20px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: var(--cbse-radius-md);
	padding: 14px 20px;
	max-width: 480px;
	margin: 0 auto 28px;
}

.cbse-ty-meta-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cbse-ty-meta-label {
	font-size: 11px;
	text-transform: uppercase;
	color: #64748b;
	font-weight: 600;
}

.cbse-ty-meta-val {
	font-size: 15px;
	font-weight: 700;
	color: var(--cbse-primary);
}

.cbse-ty-next-steps {
	margin-bottom: 25px;
}

.cbse-ty-steps-heading {
	font-size: 15px;
	font-weight: 700;
	color: #334155;
	margin: 0 0 16px 0;
}

.cbse-ty-actions-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

.cbse-ty-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: var(--cbse-radius-sm);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.2s;
}

.cbse-ty-btn-brochure {
	background: #1e3a8a;
	color: #ffffff;
}

.cbse-ty-btn-brochure:hover {
	background: #1e40af;
	color: #ffffff;
}

.cbse-ty-btn-tour {
	background: #0284c7;
	color: #ffffff;
}

.cbse-ty-btn-tour:hover {
	background: #0369a1;
	color: #ffffff;
}

.cbse-ty-btn-wa {
	background: #16a34a;
	color: #ffffff;
}

.cbse-ty-btn-wa:hover {
	background: #15803d;
	color: #ffffff;
}

.cbse-ty-btn-another {
	background: transparent;
	border: 1px solid #cbd5e1;
	color: #64748b;
	padding: 8px 16px;
	border-radius: var(--cbse-radius-sm);
	font-size: 13px;
	cursor: pointer;
	margin-top: 15px;
}

.cbse-ty-btn-another:hover {
	background: #f1f5f9;
	color: #334155;
}
