/* Pre-admission inquiry: mobile wizard / stepper UX */
#wlsm-submit-inquiry-form.wlsm-wizard-form {
	padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
	scroll-padding-top: 120px;
	scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

.wlsm-wizard-progress {
	position: sticky;
	top: 0;
	z-index: 40;
	background: #fff;
	border: 1px solid #e6eaf2;
	border-radius: 14px;
	padding: 14px 14px 10px;
	margin: 0 0 16px;
	box-shadow: 0 8px 24px rgba(25, 30, 45, 0.06);
	/* Let taps pass through the sticky chrome onto fields scrolling underneath */
	pointer-events: none;
}

.wlsm-wizard-progress .wlsm-wizard-steps__item,
.wlsm-wizard-progress button {
	pointer-events: auto;
}

.wlsm-wizard-progress__meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 13px;
	color: #5f6b7c;
}

.wlsm-wizard-progress__meta strong {
	color: #1f2a44;
	font-size: 14px;
}

.wlsm-wizard-progress__track {
	height: 8px;
	background: #edf2f8;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 12px;
}

.wlsm-wizard-progress__bar {
	height: 100%;
	width: 25%;
	background: linear-gradient(90deg, #1a73e8, #4c8dff);
	border-radius: 999px;
	transition: width 0.25s ease;
}

.wlsm-wizard-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
}

.wlsm-wizard-steps__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-align: center;
	min-height: 48px;
	padding: 4px 2px;
	border: 0;
	background: transparent;
	color: #7a8699;
	cursor: pointer;
}

.wlsm-wizard-steps__num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	background: #edf2f8;
	color: #5f6b7c;
}

.wlsm-wizard-steps__label {
	font-size: 10px;
	line-height: 1.2;
	max-width: 72px;
}

.wlsm-wizard-steps__item.is-active .wlsm-wizard-steps__num,
.wlsm-wizard-steps__item.is-done .wlsm-wizard-steps__num {
	background: #1a73e8;
	color: #fff;
}

.wlsm-wizard-steps__item.is-active {
	color: #1a73e8;
	font-weight: 700;
}

.wlsm-wizard-step {
	display: none;
}

.wlsm-wizard-step.is-active {
	display: block;
}

/* Touch-friendly card radios / segmented controls */
#wlsm-submit-inquiry-section .wlsm-choice-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

#wlsm-submit-inquiry-section .wlsm-form-check-inline {
	position: relative;
	margin: 0 !important;
	padding: 0 !important;
}

#wlsm-submit-inquiry-section .wlsm-form-check-inline > input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

#wlsm-submit-inquiry-section .wlsm-form-check-inline > label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	min-width: 96px;
	padding: 10px 16px;
	border: 1.5px solid #d9e1ef;
	border-radius: 12px;
	background: #f9fafc;
	color: #2f3a4d;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
	margin: 0 !important;
}

#wlsm-submit-inquiry-section .wlsm-form-check-inline > input[type="radio"]:checked + label,
#wlsm-submit-inquiry-section .wlsm-form-check-inline > input[type="radio"]:focus-visible + label {
	border-color: #1a73e8;
	background: #eaf2ff;
	color: #135cbc;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

#wlsm-submit-inquiry-section .wlsm-form-control,
#wlsm-submit-inquiry-section select,
#wlsm-submit-inquiry-section textarea,
#wlsm-submit-inquiry-section input[type="text"],
#wlsm-submit-inquiry-section input[type="email"],
#wlsm-submit-inquiry-section input[type="number"],
#wlsm-submit-inquiry-section input[type="date"],
#wlsm-submit-inquiry-section input[type="tel"] {
	height: auto !important;
	min-height: 48px !important;
	font-size: 16px; /* prevent iOS zoom */
	color: #1f2a44 !important;
	-webkit-text-fill-color: #1f2a44;
	text-transform: none;
}

#wlsm-submit-inquiry-section #wlsm_school_class {
	width: 100% !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	-webkit-appearance: menulist !important;
	appearance: auto !important;
	min-height: 48px !important;
	color: #1f2a44 !important;
	-webkit-text-fill-color: #1f2a44 !important;
}
#wlsm-submit-inquiry-section #wlsm_school_class option {
	color: #1f2a44 !important;
	background: #fff !important;
}

.wlsm-wizard-step.is-active #wlsm_school_class,
.wlsm-wizard-step.is-active #wlsm_section,
.wlsm-wizard-step.is-active #wlsm_medium,
.wlsm-wizard-step.is-active #wlsm_student_type {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	min-height: 48px !important;
}

#wlsm-submit-inquiry-section.wlsm-edu-mode-semester .wlsm-sem-label,
#wlsm-ug-edu-section.wlsm-edu-mode-semester .wlsm-sem-label {
	display: inline !important;
}

#wlsm-ug-edu-section.wlsm-edu-mode-semester .wlsm-year-label,
#wlsm-pg-section.wlsm-edu-mode-semester .wlsm-year-label {
	display: none !important;
}

.wlsm-pg-sem-accordion-host {
	margin-bottom: 12px;
}

.wlsm-ug-sem-split-acc,
.wlsm-pg-sem-split-acc {
	margin-bottom: 12px;
}

.wlsm-edu-mode-semester .wlsm-result-awaited-option {
	margin-bottom: 12px;
}

/* Mobile / all browsers: make readonly percentage fields reliably tappable for marks popup */
#wlsm-submit-inquiry-section .wlsm-ugpg-score[readonly],
#wlsm-submit-inquiry-section #wlsm_percentage_10th[readonly],
#wlsm-submit-inquiry-section #wlsm_percentage_12th[readonly],
#wlsm-submit-inquiry-section #wlsm_other_percentage[readonly] {
	cursor: pointer !important;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
	caret-color: transparent;
	pointer-events: auto !important;
	-webkit-tap-highlight-color: rgba(26, 115, 232, 0.15);
	/* Keep field clear of sticky progress + fixed bottom nav on tap/scrollIntoView */
	scroll-margin-top: 120px;
	scroll-margin-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
	position: relative;
	z-index: 3;
	min-height: 44px;
}

/* Expand tap target around Percentage label + input on mobile */
#wlsm-submit-inquiry-section .wlsm-form-group:has(> .wlsm-ugpg-score),
#wlsm-submit-inquiry-section .wlsm-form-group:has(> #wlsm_percentage_10th),
#wlsm-submit-inquiry-section .wlsm-form-group:has(> #wlsm_percentage_12th),
#wlsm-submit-inquiry-section .wlsm-form-group:has(> #wlsm_other_percentage) {
	position: relative;
	z-index: 3;
}

#wlsm-submit-inquiry-section .SumoSelect > .CaptionCont > span {
	color: #1f2a44 !important;
	-webkit-text-fill-color: #1f2a44 !important;
	opacity: 1 !important;
}

/* Subject multi-select: SumoSelect owns the UI, native list stays hidden */
#wlsm-submit-inquiry-section select.wlsm-form-control-select[multiple] {
	display: none !important;
}

#wlsm-submit-inquiry-section .SumoSelect.wlsm-subject-select {
	position: relative;
	z-index: 1;
	width: 100% !important;
}

#wlsm-submit-inquiry-section .SumoSelect.wlsm-subject-select:not(.open) > .optWrapper {
	display: none !important;
}

#wlsm-submit-inquiry-section .SumoSelect.wlsm-subject-select.open {
	z-index: 30;
}

#wlsm-submit-inquiry-section .SumoSelect.wlsm-subject-select.open > .optWrapper {
	display: block !important;
	z-index: 30;
	max-height: 50vh !important;
	overflow: auto !important;
	-webkit-overflow-scrolling: touch;
}

/* Education accordion */
.wlsm-edu-accordion {
	border: 1px solid #e6eaf2;
	border-radius: 12px;
	margin-bottom: 12px;
	overflow: hidden;
	background: #fff;
}

.wlsm-edu-accordion.is-open {
	overflow: visible;
	position: relative;
	z-index: 2;
}

.wlsm-edu-accordion.wlsm-university-panel-open {
	z-index: 120;
}

.wlsm-extra-edu-host,
.wlsm-extra-edu-host .wlsm-edu-accordion,
#wlsm-ug-edu-section,
#wlsm-pg-section {
	overflow: visible;
}

.wlsm-edu-accordion__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 52px;
	padding: 12px 14px;
	border: 0;
	background: #f5f8fc;
	color: #1f2a44;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}

.wlsm-edu-accordion__toggle::after {
	content: '+';
	font-size: 22px;
	line-height: 1;
	color: #1a73e8;
	flex: 0 0 auto;
}

.wlsm-edu-accordion.is-open .wlsm-edu-accordion__toggle::after {
	content: '−';
}

.wlsm-edu-accordion__body {
	display: none;
	padding: 12px 12px 4px;
	border-top: 1px solid #e6eaf2;
	overflow: visible;
}

.wlsm-edu-accordion.is-open .wlsm-edu-accordion__body {
	display: block;
	overflow: visible;
}

.wlsm-extra-edu-add {
	min-height: 44px;
	padding: 8px 16px;
	border: 1.5px dashed #1a73e8;
	border-radius: 10px;
	background: #eaf2ff;
	color: #135cbc;
	font-weight: 700;
	cursor: pointer;
}

.wlsm-extra-edu-add:hover {
	background: #d6e6ff;
}

.wlsm-extra-edu-header {
	display: flex;
	align-items: stretch;
	background: #f5f8fc;
	border-bottom: 0;
}

.wlsm-extra-edu-header .wlsm-edu-accordion__toggle {
	flex: 1 1 auto;
	border-radius: 0;
	background: transparent;
}

.wlsm-extra-edu-remove {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	min-height: 52px;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid #e6eaf2;
	background: #fde8e8;
	color: #c62828;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.wlsm-extra-edu-remove:hover {
	background: #f8d0d0;
}

.wlsm-extra-awaited-host {
	width: 100%;
	padding: 0 0 8px;
}

/* Upload boxes */
.wlsm-upload-box {
	border: 1.5px dashed #b7c5db;
	border-radius: 14px;
	padding: 14px;
	background: #f9fafc;
	text-align: center;
}

.wlsm-upload-box__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 10px;
}

.wlsm-upload-box__btn {
	min-height: 48px;
	min-width: 120px;
	padding: 10px 14px;
	border-radius: 12px;
	border: 1px solid #d9e1ef;
	background: #fff;
	color: #1f2a44;
	font-weight: 700;
	cursor: pointer;
}

.wlsm-upload-box__btn.is-primary {
	background: #1a73e8;
	border-color: #1a73e8;
	color: #fff;
}

.wlsm-upload-box__preview {
	margin-top: 12px;
	min-height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wlsm-upload-box__preview img {
	max-width: 160px;
	max-height: 160px;
	border-radius: 10px;
	object-fit: cover;
	border: 1px solid #e6eaf2;
}

.wlsm-upload-box__hint {
	font-size: 12px;
	color: #5f6b7c;
	margin-top: 6px;
}

.wlsm-upload-box input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.wlsm-upload-wrap {
	position: relative;
}

/* Sticky bottom nav — interactive only on buttons so edge overlaps don't steal field taps */
.wlsm-wizard-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	display: block;
	padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid #e6eaf2;
	box-shadow: 0 -8px 24px rgba(25, 30, 45, 0.08);
	backdrop-filter: blur(8px);
	pointer-events: none;
}

.wlsm-wizard-nav__actions,
.wlsm-wizard-nav .button,
.wlsm-wizard-nav button {
	pointer-events: auto;
}

.wlsm-wizard-nav__actions {
	display: flex;
	gap: 10px;
	width: 100%;
	align-items: stretch;
}

.wlsm-wizard-nav .button,
.wlsm-wizard-nav button {
	flex: 1;
	min-height: 48px;
	border-radius: 12px !important;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wlsm-wizard-nav__back {
	flex: 0 0 38% !important;
	max-width: 160px;
	background: #fff !important;
	color: #1f2a44 !important;
	border: 1.5px solid #c5d0e0 !important;
	box-shadow: none !important;
}

.wlsm-wizard-nav__back:disabled,
.wlsm-wizard-nav__back[aria-disabled="true"] {
	opacity: 0.45;
	cursor: not-allowed;
}

.wlsm-wizard-nav__next,
.wlsm-wizard-nav__submit {
	flex: 1 1 auto !important;
}

.wlsm-wizard-nav__draft {
	position: absolute;
	top: -22px;
	left: 14px;
	font-size: 11px;
	color: #5f6b7c;
	background: #fff;
	padding: 2px 8px;
	border-radius: 8px;
	border: 1px solid #e6eaf2;
}

/* Review step */
.wlsm-review-card {
	border: 1px solid #e6eaf2;
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 12px;
	background: #fff;
}

.wlsm-review-card h4 {
	margin: 0 0 8px;
	font-size: 14px;
	color: #1f2a44;
}

.wlsm-review-card dl {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 6px 10px;
	font-size: 13px;
}

.wlsm-review-card dt {
	color: #5f6b7c;
}

.wlsm-review-card dd {
	margin: 0;
	color: #1f2a44;
	font-weight: 600;
	word-break: break-word;
}

/* Crop modal — free adjustable crop, no dark image overlay */
.wlsm-crop-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2000;
	background: rgba(15, 23, 42, 0.35);
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.wlsm-crop-modal.is-open {
	display: flex;
}

.wlsm-crop-modal__dialog {
	width: min(560px, 100%);
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.wlsm-crop-modal__header,
.wlsm-crop-modal__footer {
	padding: 12px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border-bottom: 1px solid #eef2f7;
	background: #fff;
}

.wlsm-crop-modal__footer {
	border-bottom: 0;
	border-top: 1px solid #eef2f7;
	flex-wrap: wrap;
}

.wlsm-crop-modal__body {
	padding: 12px;
	text-align: center;
	background: #f4f7fb;
}

.wlsm-crop-stage {
	position: relative;
	display: inline-block;
	max-width: 100%;
	max-height: 60vh;
	touch-action: none;
	user-select: none;
	line-height: 0;
	background: #fff;
	border: 1px solid #dbe3ef;
	border-radius: 8px;
	overflow: hidden;
}

.wlsm-crop-stage img {
	display: block;
	max-width: 100%;
	max-height: 60vh;
	width: auto;
	height: auto;
	pointer-events: none;
	-webkit-user-drag: none;
}

.wlsm-crop-box {
	position: absolute;
	box-sizing: border-box;
	border: 2px solid #1a73e8;
	background: transparent;
	cursor: move;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.wlsm-crop-handle {
	position: absolute;
	width: 14px;
	height: 14px;
	background: #fff;
	border: 2px solid #1a73e8;
	border-radius: 3px;
	box-sizing: border-box;
	z-index: 2;
}

.wlsm-crop-handle[data-handle="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.wlsm-crop-handle[data-handle="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.wlsm-crop-handle[data-handle="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.wlsm-crop-handle[data-handle="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }

.wlsm-crop-handle--edge {
	width: 18px;
	height: 10px;
	border-radius: 4px;
}

.wlsm-crop-handle[data-handle="n"] {
	left: 50%;
	top: -5px;
	transform: translateX(-50%);
	cursor: ns-resize;
}

.wlsm-crop-handle[data-handle="s"] {
	left: 50%;
	bottom: -5px;
	transform: translateX(-50%);
	cursor: ns-resize;
}

.wlsm-crop-handle[data-handle="w"] {
	left: -5px;
	top: 50%;
	width: 10px;
	height: 18px;
	transform: translateY(-50%);
	cursor: ew-resize;
}

.wlsm-crop-handle[data-handle="e"] {
	right: -5px;
	top: 50%;
	width: 10px;
	height: 18px;
	transform: translateY(-50%);
	cursor: ew-resize;
}

.wlsm-crop-modal__footer .button {
	min-height: 44px;
	border-radius: 10px;
}

@media (min-width: 768px) {
	.wlsm-wizard-steps__label {
		font-size: 11px;
		max-width: none;
	}

	.wlsm-wizard-nav {
		position: sticky;
		bottom: 0;
		margin-top: 16px;
		border-radius: 14px;
		border: 1px solid #e6eaf2;
	}

	#wlsm-submit-inquiry-form.wlsm-wizard-form {
		padding-bottom: 0;
	}
}
