/**
 * Public CSS for School Admission Enquiry Popup
 */

:root {
	--aep-primary: #1e3a8a;
	--aep-primary-hover: #172554;
	--aep-primary-light: #eff6ff;
	--aep-accent: #d97706;
	--aep-accent-hover: #b45309;
	--aep-text-main: #0f172a;
	--aep-text-muted: #64748b;
	--aep-border: #e2e8f0;
	--aep-border-focus: #3b82f6;
	--aep-bg-card: #ffffff;
	--aep-radius-lg: 18px;
	--aep-radius-md: 10px;
	--aep-radius-sm: 6px;
	--aep-shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
	--aep-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--aep-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   Floating Sticky Badge Trigger (Disabled/Removed)
   ========================================================================== */
.aep-floating-badge {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.aep-floating-badge:hover {
	transform: translateY(-3px) scale(1.03);
}

.aep-floating-badge:active {
	transform: translateY(1px) scale(0.98);
}

.aep-badge-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, var(--aep-primary) 0%, #1e40af 100%);
	color: #ffffff;
	padding: 13px 22px;
	border-radius: 50px;
	box-shadow: 0 10px 25px -3px rgba(30, 58, 138, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.2);
	font-weight: 600;
	font-size: 14.5px;
	letter-spacing: 0.3px;
}

.aep-badge-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
	width: 28px;
	height: 28px;
	border-radius: 50%;
}

/* Position Variants */
.aep-pos-bottom-right {
	bottom: 30px;
	right: 30px;
}

.aep-pos-bottom-left {
	bottom: 30px;
	left: 30px;
}

.aep-pos-right-middle {
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}
.aep-pos-right-middle .aep-badge-inner {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.aep-pos-left-middle {
	top: 50%;
	left: 0;
	transform: translateY(-50%);
}
.aep-pos-left-middle .aep-badge-inner {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

/* Standalone Shortcode Button */
.aep-trigger-btn {
	background: var(--aep-primary);
	color: #fff;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.aep-trigger-btn:hover {
	background: var(--aep-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(30, 58, 138, 0.3);
}

/* ==========================================================================
   Modal Backdrop & Container
   ========================================================================== */
.aep-modal-backdrop {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	background: rgba(15, 23, 42, 0.7) !important;
	backdrop-filter: blur(8px) !important;
	-webkit-backdrop-filter: blur(8px) !important;
	z-index: 999999999 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 20px !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease !important;
	box-sizing: border-box !important;
}

.aep-modal-backdrop.aep-is-active {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

/* Inline mode for shortcode embedding */
.aep-modal-backdrop.aep-is-inline {
	position: relative;
	width: 100%;
	height: auto;
	background: transparent;
	backdrop-filter: none;
	z-index: 1;
	padding: 0;
	opacity: 1;
	visibility: visible;
}

.aep-modal-container {
	position: relative;
	width: 95%;
	max-width: 1060px;
	max-height: 94vh;
	background: var(--aep-bg-card);
	border-radius: var(--aep-radius-lg);
	box-shadow: var(--aep-shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.1);
	overflow-y: auto;
	overflow-x: hidden;
	font-family: var(--aep-font-body);
	transform: scale(0.96) translateY(10px);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.aep-modal-backdrop.aep-is-active .aep-modal-container {
	transform: scale(1) translateY(0);
}

.aep-modal-backdrop.aep-is-inline .aep-modal-container {
	transform: none;
	max-height: none;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	border: 1px solid #e2e8f0;
}

/* Custom Scrollbar for container */
.aep-modal-container::-webkit-scrollbar {
	width: 6px;
}
.aep-modal-container::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 10px;
}

/* ==========================================================================
   Close Button (Prominent Cut Option)
   ========================================================================== */
.aep-close-btn {
	position: absolute !important;
	top: 14px !important;
	right: 14px !important;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	border-radius: 50% !important;
	background: #ef4444 !important;
	border: 2px solid #ffffff !important;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
	color: #ffffff !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	z-index: 99999 !important;
	padding: 0 !important;
	line-height: 1 !important;
	outline: none !important;
	transition: all 0.2s ease !important;
}

.aep-close-btn:hover {
	background: #dc2626 !important;
	transform: scale(1.1) !important;
	box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5) !important;
}

.aep-close-icon {
	font-size: 18px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	color: #ffffff !important;
	display: block !important;
	pointer-events: none !important;
	font-family: Arial, sans-serif !important;
}

/* ==========================================================================
   Header Styling (Compact Single-Screen)
   ========================================================================== */
.aep-modal-header {
	background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
	padding: 16px 28px 12px 28px;
	border-bottom: 1px solid var(--aep-border);
	text-align: left;
}

.aep-header-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(217, 119, 6, 0.12);
	color: var(--aep-accent);
	font-weight: 700;
	font-size: 10.5px;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 20px;
	margin-bottom: 6px;
}

.aep-modal-title {
	margin: 0 0 3px 0;
	font-family: var(--aep-font-heading);
	font-size: 19px;
	font-weight: 700;
	color: var(--aep-primary);
	line-height: 1.2;
	letter-spacing: -0.3px;
}

.aep-modal-subtitle {
	margin: 0;
	font-size: 12.5px;
	color: var(--aep-text-muted);
	line-height: 1.4;
}

/* ==========================================================================
   Form Body & Grid Layout (Single Screen Compact)
   ========================================================================== */
.aep-form {
	padding: 14px 28px 18px 28px;
}

.aep-form-alert {
	padding: 8px 12px;
	margin-bottom: 12px;
	border-radius: var(--aep-radius-sm);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
}
.aep-alert-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}
.aep-alert-success {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.aep-form-grid {
	display: flex;
	flex-wrap: wrap;
	margin: -4px -6px;
}

.aep-field-group {
	padding: 4px 6px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.aep-col-3 {
	width: 25%;
}

.aep-col-4 {
	width: 33.333%;
}

.aep-col-6 {
	width: 50%;
}

.aep-col-8 {
	width: 66.666%;
}

.aep-col-12 {
	width: 100%;
}

.aep-submit-col {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.aep-submit-col .aep-submit-btn {
	margin-top: 0;
	height: 38px;
	padding: 0 16px;
	font-size: 13.5px;
}

.aep-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #334155;
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aep-required {
	color: #ef4444;
	font-weight: 700;
}

.aep-optional {
	color: #94a3b8;
	font-weight: 500;
	text-transform: none;
	font-size: 11.5px;
}

/* Input Wrappers */
.aep-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.aep-input-icon {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 15px;
	color: #94a3b8;
	pointer-events: none;
	user-select: none;
	line-height: 1;
	z-index: 2;
}

.aep-input,
.aep-select {
	width: 100% !important;
	padding: 7px 10px 7px 34px !important;
	font-family: var(--aep-font-body) !important;
	font-size: 13px !important;
	color: var(--aep-text-main) !important;
	background: #f8fafc !important;
	border: 1.5px solid var(--aep-border) !important;
	border-radius: var(--aep-radius-md) !important;
	transition: all 0.2s ease;
	outline: none !important;
	box-sizing: border-box !important;
	height: 38px !important;
	line-height: 1.4 !important;
}

.aep-textarea {
	width: 100% !important;
	padding: 8px 12px !important;
	font-family: var(--aep-font-body) !important;
	font-size: 13px !important;
	color: var(--aep-text-main) !important;
	background: #f8fafc !important;
	border: 1.5px solid var(--aep-border) !important;
	border-radius: var(--aep-radius-md) !important;
	transition: all 0.2s ease;
	outline: none !important;
	box-sizing: border-box !important;
	resize: none;
	height: 38px !important;
	line-height: 1.4 !important;
}

.aep-select {
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
	background-repeat: no-repeat !important;
	background-position: right 10px center !important;
	background-size: 14px !important;
	padding-right: 28px !important;
}

.aep-input:hover,
.aep-select:hover,
.aep-textarea:hover {
	border-color: #cbd5e1;
	background: #ffffff;
}

.aep-input:focus,
.aep-select:focus,
.aep-textarea:focus {
	border-color: var(--aep-border-focus);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.aep-input.aep-has-error,
.aep-select.aep-has-error {
	border-color: #ef4444 !important;
	background: #fffbfa !important;
}

.aep-field-error {
	color: #ef4444;
	font-size: 11px;
	margin-top: 2px;
	font-weight: 500;
	display: none;
}
.aep-field-error.aep-is-visible {
	display: block;
}

/* ==========================================================================
   Radio Pill Selectors
   ========================================================================== */
.aep-radio-pill-group,
.aep-radio-pills-wrap {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	align-items: center;
}

.aep-radio-pill {
	cursor: pointer;
	user-select: none;
	display: inline-flex;
}

.aep-radio-pill input[type="radio"] {
	display: none;
}

.aep-pill-content {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	border-radius: var(--aep-radius-sm);
	background: #f1f5f9;
	border: 1.5px solid var(--aep-border);
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	transition: all 0.2s ease;
	height: 36px;
	box-sizing: border-box;
}

.aep-radio-pill:hover .aep-pill-content {
	background: #e2e8f0;
	border-color: #cbd5e1;
	color: #1e293b;
}

.aep-radio-pill input[type="radio"]:checked + .aep-pill-content {
	background: var(--aep-primary);
	border-color: var(--aep-primary);
	color: #ffffff;
	box-shadow: 0 3px 10px rgba(30, 58, 138, 0.25);
}

/* ==========================================================================
   Submit Section
   ========================================================================== */
.aep-submit-wrap {
	margin-top: 10px;
	text-align: center;
}

.aep-submit-btn {
	width: 100%;
	background: linear-gradient(135deg, var(--aep-accent) 0%, #b45309 100%);
	color: #ffffff;
	border: none;
	padding: 15px 32px;
	border-radius: var(--aep-radius-md);
	font-family: var(--aep-font-heading);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.8px;
	cursor: pointer;
	box-shadow: 0 10px 20px -3px rgba(217, 119, 6, 0.35);
	transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.aep-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 28px -3px rgba(217, 119, 6, 0.45);
	filter: brightness(1.05);
}

.aep-submit-btn:active {
	transform: translateY(1px);
}

.aep-submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none !important;
}

/* Spinner */
.aep-spinner {
	width: 20px;
	height: 20px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: aepSpin 0.7s linear infinite;
}

@keyframes aepSpin {
	to { transform: rotate(360deg); }
}

.aep-privacy-notice {
	margin: 12px 0 0 0;
	font-size: 12px;
	color: #94a3b8;
}

/* ==========================================================================
   Success State Overlay
   ========================================================================== */
.aep-success-overlay {
	display: none;
	padding: 60px 30px;
	text-align: center;
	animation: aepFadeIn 0.35s ease forwards;
}

.aep-success-overlay.aep-is-visible {
	display: block;
}

.aep-success-card {
	max-width: 420px;
	margin: 0 auto;
}

.aep-success-icon-wrap {
	width: 76px;
	height: 76px;
	margin: 0 auto 20px auto;
}

.aep-checkmark {
	width: 76px;
	height: 76px;
	border-radius: 50%;
	display: block;
	stroke-width: 3;
	stroke: #10b981;
	stroke-miterlimit: 10;
	box-shadow: inset 0px 0px 0px #10b981;
	animation: aepFill 0.4s ease-in-out 0.4s forwards, aepScale 0.3s ease-in-out 0.9s both;
}

.aep-checkmark-circle {
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	stroke-width: 3;
	stroke-miterlimit: 10;
	stroke: #10b981;
	fill: none;
	animation: aepStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.aep-checkmark-check {
	transform-origin: 50% 50%;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	stroke: #ffffff;
	animation: aepStroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.7s forwards;
}

@keyframes aepStroke {
	100% { stroke-dashoffset: 0; }
}
@keyframes aepScale {
	0%, 100% { transform: none; }
	50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes aepFill {
	100% { box-shadow: inset 0px 0px 0px 40px #10b981; }
}
@keyframes aepFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.aep-success-title {
	font-family: var(--aep-font-heading);
	font-size: 22px;
	color: #0f172a;
	margin: 0 0 10px 0;
}

.aep-success-msg {
	font-size: 14.5px;
	color: #64748b;
	line-height: 1.6;
	margin: 0 0 26px 0;
}

.aep-btn-done {
	background: var(--aep-primary);
	color: #fff;
	border: none;
	padding: 12px 30px;
	border-radius: var(--aep-radius-md);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.aep-btn-done:hover {
	background: var(--aep-primary-hover);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
	.aep-col-3 {
		width: 50% !important;
	}
	.aep-col-4 {
		width: 50% !important;
	}
	.aep-col-8 {
		width: 100% !important;
	}
	.aep-submit-col {
		width: 100% !important;
		margin-top: 8px;
	}
}

@media (max-width: 640px) {
	.aep-col-3,
	.aep-col-4,
	.aep-col-6,
	.aep-col-8 {
		width: 100% !important;
	}
	.aep-modal-header {
		padding: 16px 16px 10px 16px !important;
	}
	.aep-modal-title {
		font-size: 18px !important;
	}
	.aep-form {
		padding: 12px 14px !important;
	}
	.aep-floating-badge {
		bottom: 16px;
		right: 16px;
	}
	.aep-badge-inner {
		padding: 10px 16px;
		font-size: 13px;
	}
	.aep-modal-backdrop {
		padding: 10px;
	}
}
