/* BMD Customisations — Tourfic login / register forms. */

/* Space between a label and its field (both forms). */
.tf-reg-wrap .tf-reg-field > label:not(.bmd-check),
.tf-reg-wrap .tf-reg-field > .tf-field-label {
	display: block !important;
	margin: 0 0 8px !important;
	line-height: 1.35 !important;
}
.tf-reg-wrap .tf-reg-field > h4 { margin-bottom: 10px !important; }

/* Login: "Forgot your password?" away from the field, Login button close below it. */
.tf-reg-wrap #tf-login .tf-reg-field .tf-forgot-password {
	margin: 8px 0 0 !important;
	padding: 0 !important;
	line-height: 1.2 !important;
}
.tf-reg-wrap #tf-login .tf-reg-field:has(.tf-forgot-password),
.tf-reg-wrap #tf-login .tf-reg-field:last-of-type { margin-bottom: 6px !important; padding-bottom: 0 !important; }
.tf-reg-wrap #tf-login .tf-submit { margin-top: 0 !important; }

/* Date picker + phone look like the other fields. */
.tf-reg-wrap .tf-reg-field input[type="date"],
.tf-reg-wrap .tf-reg-field input[type="tel"] {
	width: 100%;
	box-sizing: border-box;
}
.tf-reg-wrap .tf-reg-field input[type="date"] { min-height: 46px; cursor: pointer; }
.tf-reg-wrap .tf-reg-field input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .75; }

/* Consent / marketing boxes. */
.tf-reg-wrap .bmd-consent { margin: 6px 0 22px; text-align: left; }
.tf-reg-wrap .bmd-consent .tf-reg-field { margin: 0 0 12px !important; }
.tf-reg-wrap label.bmd-check {
	display: flex !important;
	align-items: flex-start;
	gap: 10px;
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: #27333f;
	cursor: pointer;
	text-align: left;
}
.tf-reg-wrap label.bmd-check a { color: #1c4385; text-decoration: underline; font-weight: 500; }
.tf-reg-wrap label.bmd-check .bmd-req { color: #c62828; text-decoration: none; border: 0; }
.tf-reg-wrap label.bmd-check input[type="checkbox"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	flex: none;
	width: 20px !important;
	height: 20px !important;
	min-height: 0 !important;
	margin: 1px 0 0 !important;
	padding: 0 !important;
	border: 2px solid #223167 !important;
	border-radius: 5px !important;
	background: #fff !important;
	cursor: pointer;
	position: static !important;
	opacity: 1 !important;
}
.tf-reg-wrap label.bmd-check input[type="checkbox"]:checked {
	background: #223167 no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") !important;
}
.tf-reg-wrap label.bmd-check input[type="checkbox"]:focus-visible { outline: 2px solid #fdc60f; outline-offset: 2px; }
.tf-reg-wrap .bmd-consent-field .text-danger { display: block; margin: 6px 0 0 30px; }
.tf-reg-wrap .bmd-consent-field:has(.text-danger) input[type="checkbox"] { border-color: #c62828 !important; }

/* Student / School wording. */
.tf-reg-wrap .bmd-for-school { display: none; }
.tf-reg-wrap .bmd-role-school .bmd-for-school { display: inline; }
.tf-reg-wrap .bmd-role-school .bmd-for-student { display: none; }

/* Tourfic email-verification page message. */
.tf-verification-msg {
	max-width: 640px;
	margin: 60px auto;
	padding: 28px 32px;
	background: #f4f6fb;
	border-radius: 10px;
	text-align: center;
	font-size: 17px;
	line-height: 1.6;
	color: #223167;
}
.tf-verification-msg a { color: #1c4385; font-weight: 600; text-decoration: underline; }

/* Labels always left-aligned (the page's own CSS centred one of the fields). */
.tf-reg-wrap .tf-reg-extra-fields .tf-reg-field,
.tf-reg-wrap .tf-reg-field > label:not(.bmd-check),
.tf-reg-wrap .tf-reg-field > .tf-field-label { text-align: left !important; }

/* Error state for fields whose real input is hidden (phone, date, country). */
.tf-reg-wrap .bmd-has-error .iti input,
.tf-reg-wrap .tf-reg-field:has(> small.text-danger) .bmd-fp-input,
.tf-reg-wrap .tf-reg-field:has(> small.text-danger) .iti input,
.tf-reg-wrap .tf-reg-field:has(> small.text-danger) .select2-selection--single { border-color: #c62828 !important; }

/* ---------- Phone: country picker + number ---------- */
.tf-reg-wrap .iti { display: block; width: 100%; }
.tf-reg-wrap .iti input[type="tel"] { width: 100%; }
.tf-reg-wrap .iti--separate-dial-code .iti__selected-dial-code { margin-right: 2px; }
.tf-reg-wrap .iti__selected-country { border-radius: 6px 0 0 6px; }
.tf-reg-wrap .iti__selected-country-primary { padding: 0 8px 0 14px; }
.tf-reg-wrap .iti__selected-dial-code { color: #223167; font-weight: 600; margin-left: 6px; }
.tf-reg-wrap .iti__arrow { border-top-color: #223167; margin-left: 8px; }
.tf-reg-wrap .iti__arrow--up { border-bottom-color: #223167; }
.tf-reg-wrap .iti--separate-dial-code .iti__selected-country::after,
.tf-reg-wrap .iti__country-container { border-right: 1px solid rgba(34, 49, 103, .18); }
.iti--container .iti__dropdown-content,
.tf-reg-wrap .iti__dropdown-content {
	border: 1.5px solid #223167 !important;
	border-radius: 8px !important;
	box-shadow: 0 12px 28px rgba(34, 49, 103, .18) !important;
	overflow: hidden;
	font-family: inherit;
}
.tf-reg-wrap .iti__search-input,
.iti--container .iti__search-input {
	height: 42px;
	margin: 0 !important;
	padding: 8px 12px 8px 34px !important;
	border: 0 !important;
	border-bottom: 1px solid #dfe5ef !important;
	border-radius: 0 !important;
	background: #fff !important;
	font-size: 14px !important;
	outline: none;
}
.tf-reg-wrap .iti__country-list,
.iti--container .iti__country-list,
.tf-reg-wrap .select2-results__options { padding: 0 !important; margin: 0 !important; list-style: none !important; }
.tf-reg-wrap .iti__country,
.iti--container .iti__country { padding: 9px 12px !important; font-size: 14px; color: #27333f; }
.tf-reg-wrap .iti__country.iti__highlight,
.iti--container .iti__country.iti__highlight { background: #dde8f6 !important; color: #223167; }
.tf-reg-wrap .iti__dial-code, .iti--container .iti__dial-code { color: #6b7280; }

/* ---------- Country dropdown (searchable, with flags) ---------- */
.tf-reg-wrap .select2-container { width: 100% !important; }
.tf-reg-wrap .tf-reg-field.bmd-country-field { position: relative !important; }
.tf-reg-wrap .bmd-country-field > .select2-container:not(.select2) {
	position: absolute !important;
	top: var(--bmd-dd-top, 100%) !important;
	left: var(--bmd-dd-left, 0) !important;
	width: var(--bmd-dd-width, 100%) !important;
	z-index: 1000;
}
.tf-reg-wrap .bmd-country-field > .select2-container:not(.select2) .select2-dropdown { width: 100% !important; position: static !important; }
.tf-reg-wrap .select2-container .select2-selection--single {
	display: flex !important;
	align-items: center;
	height: 46px;
	box-sizing: border-box;
	background: #eef4fb;
	border: 1px solid #223167;
	border-radius: 6px;
	outline: none;
}
.tf-reg-wrap .select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0 40px 0 0 !important;
	line-height: 1.3 !important;
	color: inherit !important;
	width: 100%;
}
.tf-reg-wrap .select2-container .select2-selection--single .select2-selection__arrow {
	top: 0 !important;
	right: 12px !important;
	height: 100% !important;
	display: flex;
	align-items: center;
}
.tf-reg-wrap .select2-container .select2-selection--single .select2-selection__arrow b {
	position: static !important;
	margin: 0 !important;
	border: 0 !important;
	width: 12px;
	height: 12px;
	background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23223167' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.tf-reg-wrap .select2-container--open .select2-selection--single .select2-selection__arrow b { transform: rotate(180deg); }
.tf-reg-wrap .select2-dropdown {
	border: 1.5px solid #223167 !important;
	border-radius: 8px !important;
	box-shadow: 0 12px 28px rgba(34, 49, 103, .18) !important;
	overflow: hidden;
	background: #fff !important;
	margin-top: 4px;
}
.tf-reg-wrap .select2-container--open .select2-dropdown--above { margin-top: -4px; }
.tf-reg-wrap .select2-search--dropdown { padding: 0 !important; }
.tf-reg-wrap .select2-search--dropdown .select2-search__field {
	height: 42px !important;
	margin: 0 !important;
	padding: 8px 12px !important;
	border: 0 !important;
	border-bottom: 1px solid #dfe5ef !important;
	border-radius: 0 !important;
	background: #fff !important;
	font-size: 14px !important;
	outline: none;
}
.tf-reg-wrap .select2-results__options { max-height: 260px !important; }
.tf-reg-wrap .select2-results__option {
	padding: 9px 12px !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #27333f !important;
	background: #fff !important;
	margin: 0 !important;
}
.tf-reg-wrap .select2-results__option[aria-selected="true"],
.tf-reg-wrap .select2-results__option[data-selected="true"] { background: #eef4fb !important; color: #223167 !important; font-weight: 600 !important; }
.tf-reg-wrap .select2-search--dropdown .select2-search__field::placeholder { color: #8a94a6; opacity: 1; }
.tf-reg-wrap .select2-container .select2-selection__rendered { font-weight: 400 !important; }
.tf-reg-wrap .select2-results__option--highlighted,
.tf-reg-wrap .select2-results__option--highlighted[aria-selected],
.tf-reg-wrap .select2-results__option--highlighted[data-selected] { background: #dde8f6 !important; color: #223167 !important; }
.bmd-cflag { display: inline-flex; align-items: center; gap: 10px; }
.tf-reg-wrap .select2-selection__rendered.bmd-cflag { display: flex !important; }
.bmd-cflag .iti__flag { flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }

/* ---------- Date of birth calendar ---------- */
.tf-reg-wrap input.bmd-fp-input {
	cursor: pointer;
	padding-right: 44px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23223167' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 18px !important;
}
.flatpickr-calendar.bmd-fp {
	width: 320px;
	padding: 0 0 10px;
	border: 1px solid #dfe5ef;
	border-radius: 12px;
	box-shadow: 0 14px 34px rgba(34, 49, 103, .2);
	font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
	overflow: visible;
}
.flatpickr-calendar.bmd-fp.arrowTop::before { border-bottom-color: #223167; }
.flatpickr-calendar.bmd-fp.arrowTop::after { border-bottom-color: #223167; }
.flatpickr-calendar.bmd-fp.arrowBottom::before,
.flatpickr-calendar.bmd-fp.arrowBottom::after { border-top-color: #dfe5ef; }
.bmd-fp .flatpickr-months {
	background: #223167;
	border-radius: 11px 11px 0 0;
	padding: 6px 4px;
	margin-bottom: 6px;
}
.bmd-fp .flatpickr-months .flatpickr-month { height: 44px; color: #fff; fill: #fff; }
.bmd-fp .flatpickr-months .flatpickr-prev-month,
.bmd-fp .flatpickr-months .flatpickr-next-month { top: 6px; height: 44px; padding: 14px 12px; color: #fff; fill: #fff; }
.bmd-fp .flatpickr-months .flatpickr-prev-month:hover svg,
.bmd-fp .flatpickr-months .flatpickr-next-month:hover svg { fill: #fdc60f; }
.bmd-fp .flatpickr-current-month {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	left: 10%;
	width: 80%;
	height: 44px;
	padding: 0;
	font-size: 15px;
}
.bmd-fp .flatpickr-current-month .flatpickr-monthDropdown-months,
.bmd-fp select.bmd-fp-year {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 6px 26px 6px 10px;
	height: auto;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 6px;
	background: rgba(255, 255, 255, .08) no-repeat right 8px center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	outline: none;
}
.bmd-fp .flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.bmd-fp select.bmd-fp-year:hover { background-color: rgba(255, 255, 255, .16); }
.bmd-fp .flatpickr-current-month .flatpickr-monthDropdown-months option,
.bmd-fp select.bmd-fp-year option { color: #27333f; background: #fff; }
.bmd-fp .flatpickr-weekdays { height: 32px; }
.bmd-fp span.flatpickr-weekday { color: #6b7280; font-weight: 600; font-size: 12px; }
.bmd-fp .flatpickr-innerContainer,
.bmd-fp .flatpickr-rContainer,
.bmd-fp .flatpickr-days,
.bmd-fp .dayContainer { width: 100%; min-width: 0; max-width: none; }
.bmd-fp .dayContainer { padding: 0 8px; }
.bmd-fp .flatpickr-day {
	max-width: none;
	height: 38px;
	line-height: 36px;
	border-radius: 8px;
	color: #27333f;
	font-size: 14px;
}
.bmd-fp .flatpickr-day:hover,
.bmd-fp .flatpickr-day:focus { background: #eef4fb; border-color: #eef4fb; }
.bmd-fp .flatpickr-day.today { border-color: #223167; }
.bmd-fp .flatpickr-day.selected,
.bmd-fp .flatpickr-day.selected:hover,
.bmd-fp .flatpickr-day.selected:focus { background: #fdc60f; border-color: #fdc60f; color: #223167; font-weight: 700; }
.bmd-fp .flatpickr-day.prevMonthDay,
.bmd-fp .flatpickr-day.nextMonthDay { color: #b6bdc9; }
.bmd-fp .flatpickr-day.flatpickr-disabled,
.bmd-fp .flatpickr-day.flatpickr-disabled:hover { color: #d3d8e0; background: transparent; border-color: transparent; }
