/**
 * ISTEC application forms (BBA / MBA / MSc) – Contact Form 7 styling in the
 * istec-me.org look (Falar theme colours, Montserrat + Brother 1816).
 * Loaded only on the application-form pages (see falar-child/functions.php),
 * and every rule is scoped to body.istec-appform.
 *
 * @package    Falar Child
 * @author     Sameer Ali
 * @version    1.0.0
 */

body.istec-appform {
	--ist-green: #61a60f;
	--ist-green-dark: #4f8a0b;
	--ist-green-soft: #f2f8ea;
	--ist-navy: #0d0d25;
	--ist-ink: #28283f;
	--ist-text: #525271;
	--ist-blue: #375cc7;
	--ist-blue-soft: #eef2fc;
	--ist-yellow: #feb81c;
	--ist-line: #dde2ee;
	--ist-field: #f7f8fc;
	--ist-error: #d93036;
	--ist-radius: 8px;
	--ist-heading-font: "brother-1816", "Montserrat", sans-serif;
	--ist-body-font: "Montserrat", "montserrat", sans-serif;

	background: #f3f5fb;
	background-image: linear-gradient(180deg, #dde6f4 0, #e6eaf8 240px, #f3f5fb 520px);
	background-repeat: no-repeat;
	color: var(--ist-text);
	font-family: var(--ist-body-font);
	-webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------
 * Page title block (Elementor spacer + heading + divider)
 * ---------------------------------------------------------------- */
body.istec-appform .elementor-widget-spacer .elementor-spacer-inner {
	height: 48px !important;
}

body.istec-appform .elementor-widget-heading .elementor-heading-title {
	margin: 0;
	color: var(--ist-navy);
	font-family: var(--ist-heading-font) !important;
	font-size: clamp(26px, 3.4vw, 40px) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	letter-spacing: .5px;
	text-align: center;
	text-transform: uppercase;
}

body.istec-appform .elementor-widget-heading .elementor-widget-container::before {
	content: "ISTEC Business School \00B7  Paris";
	display: block;
	margin-bottom: 10px;
	color: var(--ist-green);
	font-family: var(--ist-body-font);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-align: center;
	text-transform: uppercase;
}

body.istec-appform .elementor-widget-divider .elementor-divider {
	display: none;
}

body.istec-appform .elementor-widget-divider .elementor-widget-container::after {
	content: "";
	display: block;
	width: 72px;
	height: 4px;
	margin: 6px auto 28px;
	border-radius: 2px;
	background: var(--ist-green);
}

/* ------------------------------------------------------------------
 * Form card
 * ---------------------------------------------------------------- */
body.istec-appform .e-con:has(.wpcf7) {
	padding: 0 16px 72px;
}

body.istec-appform .e-con:has(.wpcf7) > .e-con-inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 48px 56px 44px;
	border-top: 5px solid var(--ist-green);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 60px -24px rgba(13, 13, 37, .25), 0 2px 6px rgba(13, 13, 37, .05);
}

body.istec-appform .wpcf7 {
	width: 100%;
}

body.istec-appform .e-con:has(.wpcf7) .elementor-widget-shortcode,
body.istec-appform .e-con:has(.wpcf7) .elementor-widget-shortcode > .elementor-widget-container {
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
}

/* ------------------------------------------------------------------
 * Grid layout – two columns, full-width rows where needed
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7 form.wpcf7-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 20px;
	align-items: start;
	counter-reset: istsection;
	font-family: var(--ist-body-font);
	font-size: 14px;
}

body.istec-appform .wpcf7-form > * {
	min-width: 0;
}

body.istec-appform .wpcf7-form > p,
body.istec-appform .wpcf7-form > div > p {
	margin: 0;
}

body.istec-appform .wpcf7-form > h3,
body.istec-appform .wpcf7-form > ul,
body.istec-appform .wpcf7-form > div[data-class="wpcf7cf_group"],
body.istec-appform .wpcf7-form > .wpcf7-response-output,
body.istec-appform .wpcf7-form > p.istec-program-choice,
body.istec-appform .wpcf7-form > p.istec-full,
body.istec-appform .wpcf7-form > p.istec-pair,
body.istec-appform .wpcf7-form > p.istec-notice,
body.istec-appform .wpcf7-form > p.istec-submit-row,
body.istec-appform .wpcf7-form > p:has(.wpcf7-radio .wpcf7-list-item:nth-child(7)),
body.istec-appform .wpcf7-form > p:has(textarea),
body.istec-appform .wpcf7-form > p:has(.wpcf7-submit) {
	grid-column: 1 / -1;
}

body.istec-appform .wpcf7-form p > br,
body.istec-appform .wpcf7-form p > span > br,
body.istec-appform .wpcf7-form > p.istec-empty,
body.istec-appform .wpcf7-form > link,
body.istec-appform .wpcf7-form > script {
	display: none;
}

/* Two fields printed in one paragraph (City + Country, Installment Day + Month) */
body.istec-appform .wpcf7-form p.istec-pair,
body.istec-appform .wpcf7-form p:has(> .wpcf7-form-control-wrap[data-name] ~ .wpcf7-form-control-wrap[data-name]) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: auto auto;
	grid-auto-flow: column;
	column-gap: 24px;
	align-items: start;
}

/* ------------------------------------------------------------------
 * Section headings
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form > h3 {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 18px 0 2px;
	padding-top: 30px;
	border-top: 1px solid var(--ist-line);
	color: var(--ist-navy);
	font-family: var(--ist-heading-font);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .4px;
	text-transform: uppercase;
}

body.istec-appform .wpcf7-form > h3::before {
	counter-increment: istsection;
	content: counter(istsection, decimal-leading-zero);
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--ist-green);
	color: #fff;
	font-family: var(--ist-body-font);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
}

/* ------------------------------------------------------------------
 * Labels
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form label {
	display: block;
	margin: 0 0 8px;
	color: var(--ist-ink);
	font-family: var(--ist-body-font);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
}

body.istec-appform .wpcf7-form label:has(+ br + .wpcf7-form-control-wrap [aria-required="true"])::after,
body.istec-appform .wpcf7-form label:has(+ .wpcf7-form-control-wrap [aria-required="true"])::after {
	content: " *";
	color: var(--ist-error);
}

body.istec-appform .wpcf7-form .wpcf7-form-control-wrap {
	position: relative;
	display: block;
}

/* ------------------------------------------------------------------
 * Text inputs, selects, textarea (overrides the site-wide grey/red CF7 style)
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="date"]),
body.istec-appform .wpcf7-form select,
body.istec-appform .wpcf7-form textarea {
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100%;
	height: 50px;
	margin: 0;
	padding-top: 0;
	padding-right: 14px;
	padding-bottom: 0;
	border: 1px solid var(--ist-line) !important;
	border-radius: var(--ist-radius) !important;
	outline: 0;
	background-color: var(--ist-field) !important;
	box-shadow: none;
	color: var(--ist-navy) !important;
	font-family: var(--ist-body-font);
	font-size: 14.5px;
	line-height: 1.4;
	transition: border-color .2s, box-shadow .2s, background-color .2s;
}

/* left padding separately so the phone field keeps its flag/dial-code space */
body.istec-appform .wpcf7-form input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="date"]):not(.intl-tel-input input),
body.istec-appform .wpcf7-form select,
body.istec-appform .wpcf7-form textarea {
	padding-left: 14px;
}

body.istec-appform .wpcf7-form textarea {
	height: 120px;
	min-height: 100px;
	padding-top: 12px;
	padding-bottom: 12px;
	resize: vertical;
}

body.istec-appform .wpcf7-form select {
	padding-right: 40px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='none' stroke='%2328283f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 16px !important;
	cursor: pointer;
}

body.istec-appform .wpcf7-form input::placeholder,
body.istec-appform .wpcf7-form textarea::placeholder {
	color: #9a9ab0;
	opacity: 1;
}

body.istec-appform .wpcf7-form input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"]):hover,
body.istec-appform .wpcf7-form select:hover,
body.istec-appform .wpcf7-form textarea:hover {
	border-color: #c3cadb !important;
}

body.istec-appform .wpcf7-form input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"]):focus,
body.istec-appform .wpcf7-form select:focus,
body.istec-appform .wpcf7-form textarea:focus {
	border-color: var(--ist-green) !important;
	background-color: #fff !important;
	box-shadow: 0 0 0 3px rgba(97, 166, 15, .18);
}

/* Invalid state (also wins over :hover / :focus) */
body.istec-appform .wpcf7-form :is(input, select, textarea):is(.wpcf7-not-valid, .istec-date-invalid),
body.istec-appform .wpcf7-form :is(input, select, textarea):is(.wpcf7-not-valid, .istec-date-invalid):is(:hover, :focus) {
	border-color: var(--ist-error) !important;
	background-color: #fff6f6 !important;
}

body.istec-appform .wpcf7-form .wpcf7-not-valid-tip,
body.istec-appform .wpcf7-form .istec-date-error {
	display: block;
	margin-top: 6px;
	color: var(--ist-error);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.3;
}

body.istec-appform .wpcf7-form .istec-date-error:empty {
	display: none;
}

body.istec-appform .wpcf7-form .istec-date-wrap:has(.istec-date-error:not(:empty)) .wpcf7-not-valid-tip {
	display: none;
}

/* ------------------------------------------------------------------
 * Phone field (country-phone-field-contact-form-7 / intl-tel-input)
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form .intl-tel-input {
	display: block;
	width: 100%;
}

body.istec-appform .wpcf7-form .intl-tel-input .selected-flag {
	border-radius: var(--ist-radius) 0 0 var(--ist-radius);
	background: transparent !important;
}

body.istec-appform .wpcf7-form .intl-tel-input .selected-dial-code {
	color: var(--ist-navy);
	font-weight: 600;
}

/* Show only the flag – the dial code is already typed into the number box
   by the plugin (keyup), so showing it next to the flag doubled it.
   Hidden with CSS only: the plugin still reads this text for the
   phone1-country-code field. */
body.istec-appform .wpcf7-form .intl-tel-input.separate-dial-code .selected-dial-code {
	display: none;
}

body.istec-appform .wpcf7-form .intl-tel-input.separate-dial-code .selected-flag {
	width: 54px !important;
	padding: 0 0 0 14px;
}

body.istec-appform .wpcf7-form .intl-tel-input.separate-dial-code input:is([type="text"], [type="tel"]) {
	padding-left: 62px !important;
}

/* Country list keeps the plugin's default auto width (sized to the longest
   country name). Never use a % max-width here: the list sits inside the
   ~88px flag box, so 100% would squeeze it to 88px. */
body.istec-appform .wpcf7-form .intl-tel-input .country-list {
	z-index: 30;
	width: auto;
	min-width: 280px;
	max-width: calc(100vw - 40px);
	max-height: 260px;
	overflow-x: hidden;
	overflow-y: auto;
	white-space: nowrap;
	border: 1px solid var(--ist-line);
	border-radius: var(--ist-radius);
	box-shadow: 0 12px 30px rgba(13, 13, 37, .15);
}

/* ------------------------------------------------------------------
 * Radio groups
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form .wpcf7-radio,
body.istec-appform .wpcf7-form .wpcf7-checkbox {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

body.istec-appform .wpcf7-form .wpcf7-radio .wpcf7-list-item,
body.istec-appform .wpcf7-form .wpcf7-checkbox .wpcf7-list-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 !important;
	padding: 11px 18px 11px 14px;
	border: 1px solid var(--ist-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ist-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}

body.istec-appform .wpcf7-form .wpcf7-list-item:hover {
	border-color: var(--ist-green);
}

body.istec-appform .wpcf7-form .wpcf7-list-item.is-checked,
body.istec-appform .wpcf7-form .wpcf7-list-item:has(input:checked) {
	border-color: var(--ist-green);
	background: var(--ist-green-soft);
	box-shadow: inset 0 0 0 1px var(--ist-green);
	color: var(--ist-navy);
}

body.istec-appform .wpcf7-form .wpcf7-list-item input[type="radio"],
body.istec-appform .wpcf7-form .wpcf7-list-item input[type="checkbox"] {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 2px solid #b8bfd1;
	border-radius: 50%;
	background: #fff;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: border-color .2s;
}

body.istec-appform .wpcf7-form .wpcf7-list-item input[type="checkbox"] {
	border-radius: 4px;
}

body.istec-appform .wpcf7-form .wpcf7-list-item input:checked {
	border-color: var(--ist-green);
}

body.istec-appform .wpcf7-form .wpcf7-list-item input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--ist-green);
}

body.istec-appform .wpcf7-form .wpcf7-list-item input[type="checkbox"]:checked {
	background: var(--ist-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

body.istec-appform .wpcf7-form .wpcf7-list-item input:focus-visible {
	outline: 3px solid rgba(97, 166, 15, .35);
	outline-offset: 2px;
}

/* "I am Applying for" – programme cards */
body.istec-appform .wpcf7-form p.istec-program-choice {
	padding: 22px;
	border: 1px solid var(--ist-line);
	border-radius: 12px;
	background: var(--ist-field);
}

body.istec-appform .wpcf7-form p.istec-program-choice > label {
	margin-bottom: 14px;
	color: var(--ist-navy);
	font-family: var(--ist-heading-font);
	font-size: 19px;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
}

body.istec-appform .wpcf7-form p.istec-program-choice .wpcf7-radio {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 10px;
}

body.istec-appform .wpcf7-form p.istec-program-choice .wpcf7-list-item {
	border-radius: var(--ist-radius);
	padding: 14px 16px;
	font-size: 13.5px;
	font-weight: 600;
}

/* ------------------------------------------------------------------
 * File uploads
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form input[type="file"] {
	box-sizing: border-box;
	width: 100%;
	padding: 9px 10px;
	border: 1.5px dashed #c3cadb !important;
	border-radius: var(--ist-radius);
	background: #fff !important;
	color: var(--ist-text);
	font-family: var(--ist-body-font);
	font-size: 13px;
	cursor: pointer;
	transition: border-color .2s, background-color .2s;
}

body.istec-appform .wpcf7-form input[type="file"]:hover {
	border-color: var(--ist-green) !important;
	background: var(--ist-green-soft) !important;
}

body.istec-appform .wpcf7-form input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 9px 16px;
	border: 0;
	border-radius: 6px;
	background: var(--ist-navy);
	color: #fff;
	font-family: var(--ist-body-font);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s;
}

body.istec-appform .wpcf7-form input[type="file"]::-webkit-file-upload-button {
	margin-right: 12px;
	padding: 9px 16px;
	border: 0;
	border-radius: 6px;
	background: var(--ist-navy);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

body.istec-appform .wpcf7-form input[type="file"]:hover::file-selector-button {
	background: var(--ist-green);
}

/* ------------------------------------------------------------------
 * Notes, notice, response
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form > ul {
	margin: 0;
	padding: 16px 20px;
	border-left: 4px solid var(--ist-blue);
	border-radius: var(--ist-radius);
	background: var(--ist-blue-soft);
	list-style: none;
}

body.istec-appform .wpcf7-form > ul li {
	position: relative;
	margin: 0;
	padding-left: 22px;
}

body.istec-appform .wpcf7-form > ul li + li {
	margin-top: 6px;
}

body.istec-appform .wpcf7-form > ul li::before {
	content: "";
	position: absolute;
	top: 7px;
	left: 2px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ist-blue);
}

body.istec-appform .wpcf7-form > ul li p {
	margin: 0;
	color: var(--ist-ink);
	font-size: 13.5px;
	line-height: 1.5;
}

body.istec-appform .wpcf7-form > ul li strong {
	font-weight: 600;
}

body.istec-appform .wpcf7-form > p.istec-notice {
	padding: 14px 18px 14px 50px;
	border-left: 4px solid var(--ist-yellow);
	border-radius: var(--ist-radius);
	background: #fff8e6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c98a00' d='M12 2 1 21h22L12 2zm1 15h-2v-2h2v2zm0-4h-2V9h2v4z'/%3E%3C/svg%3E") 18px center / 20px no-repeat;
	color: #6b4e00;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: .3px;
}

body.istec-appform .wpcf7-form > p.istec-submit-row,
body.istec-appform .wpcf7-form > p:has(.wpcf7-submit) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 6px;
}

body.istec-appform .wpcf7-form .wpcf7-submit {
	min-width: 260px;
	height: auto;
	padding: 17px 48px;
	border: 0 !important;
	border-radius: 6px !important;
	background: var(--ist-green) !important;
	box-shadow: 0 10px 24px -10px rgba(97, 166, 15, .7);
	color: #fff !important;
	font-family: var(--ist-heading-font);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .5px;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s, transform .2s, box-shadow .2s;
}

body.istec-appform .wpcf7-form .wpcf7-submit:hover,
body.istec-appform .wpcf7-form .wpcf7-submit:focus-visible {
	background: var(--ist-green-dark) !important;
	box-shadow: 0 14px 28px -12px rgba(79, 138, 11, .8);
	transform: translateY(-1px);
}

body.istec-appform .wpcf7-form .wpcf7-submit:disabled {
	opacity: .7;
	cursor: wait;
	transform: none;
}

body.istec-appform .wpcf7 form .wpcf7-response-output {
	margin: 4px 0 0;
	padding: 14px 18px;
	border: 0;
	border-left: 4px solid var(--ist-blue);
	border-radius: var(--ist-radius);
	background: var(--ist-blue-soft);
	color: var(--ist-ink);
	font-size: 14px;
	font-weight: 500;
}

body.istec-appform .wpcf7 form.sent .wpcf7-response-output {
	border-left-color: var(--ist-green);
	background: var(--ist-green-soft);
	color: #3b6b07;
}

body.istec-appform .wpcf7 form:is(.invalid, .unaccepted, .payment-required, .failed, .aborted, .spam) .wpcf7-response-output {
	border-left-color: var(--ist-error);
	background: #fff1f1;
	color: #b42318;
}

/* ------------------------------------------------------------------
 * dd/mm/yyyy date field + calendar (assets/js/istec-date-ddmmyyyy.js)
 * ---------------------------------------------------------------- */
body.istec-appform .wpcf7-form .istec-date-display {
	padding-right: 48px !important;
	letter-spacing: .5px;
}

body.istec-appform .wpcf7-form .istec-date-display:focus {
	border-color: var(--ist-green) !important;
	background-color: #fff !important;
	box-shadow: 0 0 0 3px rgba(97, 166, 15, .18);
}

body.istec-appform .wpcf7-form .ui-datepicker-trigger {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 38px;
	height: 38px;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 6px;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2361a60f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / 20px no-repeat;
	color: transparent;
	font-size: 0;
	cursor: pointer;
	transition: background-color .2s;
}

body.istec-appform .wpcf7-form .ui-datepicker-trigger:hover,
body.istec-appform .wpcf7-form .ui-datepicker-trigger:focus-visible {
	background-color: var(--ist-green-soft);
	outline: 0;
}

/* Calendar popup (#ui-datepicker-div lives at the end of <body>) */
#ui-datepicker-div.istec-dp {
	z-index: 9999 !important;
	box-sizing: border-box;
	width: 306px;
	padding: 14px;
	border: 1px solid var(--ist-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 50px -12px rgba(13, 13, 37, .28);
	color: var(--ist-navy);
	font-family: var(--ist-body-font);
	font-size: 13px;
}

#ui-datepicker-div.istec-dp .ui-datepicker-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	margin: 0 0 8px;
	padding: 0 40px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--ist-navy);
}

#ui-datepicker-div.istec-dp .ui-datepicker-title {
	display: flex;
	gap: 6px;
	margin: 0;
	line-height: 1;
}

#ui-datepicker-div.istec-dp .ui-datepicker-title select {
	width: auto;
	height: 34px;
	margin: 0;
	padding: 0 26px 0 10px;
	border: 1px solid var(--ist-line);
	border-radius: 6px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background: var(--ist-field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='12' height='12'%3E%3Cpath fill='none' stroke='%2328283f' stroke-width='2.5' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 8px center / 12px no-repeat;
	color: var(--ist-navy);
	font-family: var(--ist-body-font);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

#ui-datepicker-div.istec-dp .ui-datepicker-prev,
#ui-datepicker-div.istec-dp .ui-datepicker-next {
	position: absolute;
	top: 2px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

#ui-datepicker-div.istec-dp .ui-datepicker-prev { left: 0; }
#ui-datepicker-div.istec-dp .ui-datepicker-next { right: 0; }

#ui-datepicker-div.istec-dp .ui-datepicker-prev:hover,
#ui-datepicker-div.istec-dp .ui-datepicker-next:hover {
	background: var(--ist-green-soft);
}

#ui-datepicker-div.istec-dp .ui-datepicker-prev span,
#ui-datepicker-div.istec-dp .ui-datepicker-next span {
	display: none;
}

#ui-datepicker-div.istec-dp .ui-datepicker-prev::before,
#ui-datepicker-div.istec-dp .ui-datepicker-next::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-top: 2px solid var(--ist-navy);
	border-left: 2px solid var(--ist-navy);
}

#ui-datepicker-div.istec-dp .ui-datepicker-prev::before { transform: translate(-30%, -50%) rotate(-45deg); }
#ui-datepicker-div.istec-dp .ui-datepicker-next::before { transform: translate(-70%, -50%) rotate(135deg); }

#ui-datepicker-div.istec-dp .ui-state-disabled { opacity: .3; cursor: default; }

#ui-datepicker-div.istec-dp table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 13px;
}

#ui-datepicker-div.istec-dp th {
	padding: 6px 0;
	border: 0;
	background: none;
	color: #8a8aa3;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
}

#ui-datepicker-div.istec-dp td {
	padding: 2px;
	border: 0;
	background: none;
}

#ui-datepicker-div.istec-dp td a,
#ui-datepicker-div.istec-dp td span {
	display: block;
	padding: 0;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ist-navy);
	font-weight: 500;
	line-height: 34px;
	text-align: center;
	text-decoration: none;
}

#ui-datepicker-div.istec-dp td a:hover {
	background: var(--ist-green-soft);
	color: var(--ist-navy);
}

#ui-datepicker-div.istec-dp .ui-datepicker-other-month a {
	color: #b5b5c8;
}

#ui-datepicker-div.istec-dp .ui-datepicker-today a {
	box-shadow: inset 0 0 0 1.5px var(--ist-green);
}

#ui-datepicker-div.istec-dp td a.ui-state-active,
#ui-datepicker-div.istec-dp .ui-datepicker-current-day a {
	background: var(--ist-green);
	color: #fff;
	font-weight: 700;
}

#ui-datepicker-div.istec-dp .ui-datepicker-unselectable span {
	color: #c9c9d6;
}

/* ------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------- */
@media (max-width: 991px) {
	body.istec-appform .e-con:has(.wpcf7) > .e-con-inner {
		padding: 36px 32px 32px;
	}
}

@media (max-width: 767px) {
	body.istec-appform .elementor-widget-spacer .elementor-spacer-inner {
		height: 28px !important;
	}

	body.istec-appform .e-con:has(.wpcf7) {
		padding: 0 10px 40px;
	}

	body.istec-appform .e-con:has(.wpcf7) > .e-con-inner {
		padding: 26px 18px 24px;
		border-radius: 12px;
	}

	body.istec-appform .wpcf7 form.wpcf7-form {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 18px;
	}

	body.istec-appform .wpcf7-form p.istec-pair,
	body.istec-appform .wpcf7-form p:has(> .wpcf7-form-control-wrap[data-name] ~ .wpcf7-form-control-wrap[data-name]) {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		grid-auto-flow: row;
		row-gap: 0;
	}

	body.istec-appform .wpcf7-form p.istec-pair > .wpcf7-form-control-wrap[data-name] + br + label,
	body.istec-appform .wpcf7-form p.istec-pair > .wpcf7-form-control-wrap ~ label {
		margin-top: 18px;
	}

	body.istec-appform .wpcf7-form > h3 {
		margin-top: 10px;
		padding-top: 24px;
		font-size: 18px;
	}

	body.istec-appform .wpcf7-form > h3::before {
		width: 32px;
		height: 32px;
		font-size: 13px;
	}

	body.istec-appform .wpcf7-form p.istec-program-choice {
		padding: 16px;
	}

	body.istec-appform .wpcf7-form p.istec-program-choice .wpcf7-radio {
		grid-template-columns: minmax(0, 1fr);
	}

	body.istec-appform .wpcf7-form input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"]),
	body.istec-appform .wpcf7-form select,
	body.istec-appform .wpcf7-form textarea {
		font-size: 16px; /* stops iOS zooming into fields */
	}

	body.istec-appform .wpcf7-form .wpcf7-submit {
		width: 100%;
		min-width: 0;
	}

	#ui-datepicker-div.istec-dp {
		width: 292px;
	}
}

/* ==================================================================
 * Programme chooser page – /application-forms/ (body.istec-appform-chooser)
 * Title block reuses the styles above; the three image links become cards.
 * ================================================================ */

/* Sub-heading under the green bar */
body.istec-appform-chooser .elementor-widget-divider .elementor-widget-container::before {
	content: "Choose your programme below to start your online application.";
	display: block;
	order: 2;
	margin: 0 auto;
	color: var(--ist-text);
	font-family: var(--ist-body-font);
	font-size: 16px;
	font-weight: 500;
	text-align: center;
}

body.istec-appform-chooser .elementor-widget-divider .elementor-widget-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-bottom: 36px;
}

body.istec-appform-chooser .elementor-widget-divider .elementor-widget-container::after {
	order: 1;
	margin: 6px auto 18px;
}

/* Cards row */
body.istec-appform-chooser .elementor-section:has(.elementor-widget-image) {
	padding: 0 16px 40px;
}

body.istec-appform-chooser .elementor-section:has(.elementor-widget-image) > .elementor-container {
	max-width: 1180px;
	gap: 0;
}

body.istec-appform-chooser .elementor-section:has(.elementor-widget-image) .elementor-column > .elementor-widget-wrap {
	padding: 14px !important;
}

body.istec-appform-chooser .elementor-widget-image {
	width: 100%;
	margin: 0 !important;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 22px 50px -24px rgba(13, 13, 37, .35), 0 2px 6px rgba(13, 13, 37, .06);
	transition: transform .3s ease, box-shadow .3s ease;
}

body.istec-appform-chooser .elementor-widget-image:hover,
body.istec-appform-chooser .elementor-widget-image:focus-within {
	box-shadow: 0 30px 60px -22px rgba(13, 13, 37, .45), 0 0 0 3px var(--ist-green);
	transform: translateY(-6px);
}

body.istec-appform-chooser .elementor-widget-image .elementor-widget-container {
	margin: 0 !important;
	padding: 0 !important;
}

body.istec-appform-chooser .elementor-widget-image a {
	display: block;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	outline: 0;
}

body.istec-appform-chooser .elementor-widget-image img {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	border: 0 !important;
	border-radius: 0 !important;
	transition: transform .5s ease;
}

body.istec-appform-chooser .elementor-widget-image:hover img {
	transform: scale(1.04);
}

/* "Start Application" bar under each picture */
body.istec-appform-chooser .elementor-widget-image a::after {
	content: "Start Application  \2192";
	position: relative;
	z-index: 1;
	display: block;
	padding: 18px 12px;
	border-top: 4px solid var(--ist-green);
	background: #fff;
	color: var(--ist-navy);
	font-family: var(--ist-heading-font);
	font-size: clamp(14px, 1.45vw, 18px);
	font-weight: 700;
	letter-spacing: .3px;
	text-align: center;
	text-transform: uppercase;
	white-space: pre;
	transition: background-color .25s, color .25s;
}

body.istec-appform-chooser .elementor-widget-image:hover a::after,
body.istec-appform-chooser .elementor-widget-image a:focus-visible::after {
	background: var(--ist-green);
	color: #fff;
}

/* Keep visitors on this page: only the three form links are clickable */
body.istec-appform-chooser .elementor a:not([href*="-application-form"]) {
	pointer-events: none;
	cursor: default;
}

@media (max-width: 767px) {
	body.istec-appform-chooser .elementor-section:has(.elementor-widget-image) .elementor-column {
		width: 100% !important;
	}

	body.istec-appform-chooser .elementor-section:has(.elementor-widget-image) .elementor-column > .elementor-widget-wrap {
		max-width: 420px;
		margin: 0 auto;
		padding: 10px 4px !important;
	}

	body.istec-appform-chooser .elementor-widget-divider .elementor-widget-container::before {
		font-size: 14.5px;
		padding: 0 12px;
	}

}
