/*
 * Form.
 * Desktop: "Career > Application Form" (copy 440 | card 740, gap 60) and
 * "Contact > Inquiry" (card 720 | details 480, gap 40).
 */

.syb-form__inner {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.syb-form--form-left .syb-form__card {
	order: -1;
}

/* Introduction with numbered steps */

.syb-form__aside {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.syb-form__aside .syb-head {
	gap: 14px;
	margin-bottom: 4px;
}

.syb-form__steps {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.syb-form__steps li {
	display: flex;
	gap: 16px;
}

.syb-form__step-no {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid #cfe2ff;
	border-radius: 50%;
	background: var(--c-white);
	color: var(--c-blue);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
}

.syb-form__steps li > span:last-child {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 5px;
}

.syb-form__steps strong {
	color: var(--c-ink);
	font-size: 18px;
	font-weight: 600;
	line-height: 26px;
}

.syb-form__steps strong + span {
	color: var(--c-body);
	font-size: 16px;
	line-height: 24px;
}

/* Contact details card */

.syb-contact-card {
	padding: 24px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background: var(--c-white);
	box-shadow: var(--shadow-md);
}

.syb-contact-card :is(h2, h3) {
	margin-bottom: 18px;
	color: var(--c-ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 28px;
}

.syb-contact-card ul {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.syb-contact-card li {
	display: flex;
	gap: 14px;
}

.syb-contact-card li + li {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--c-line-strong);
}

.syb-contact-card__tile {
	display: grid;
	flex: none;
	place-items: center;
	width: 46px;
	height: 46px;
	margin-top: 1px;
	border-radius: 10px;
	background: var(--c-tile);
	color: var(--c-blue);
}

.syb-contact-card__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	color: var(--c-body);
	font-size: 14px;
	line-height: 20px;
}

.syb-contact-card__text strong,
.syb-contact-card__text a {
	color: var(--c-ink);
	font-size: 18px;
	font-weight: 600;
	line-height: 26px;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.syb-contact-card__text a:hover {
	color: var(--c-blue);
}

.syb-contact-card__text .is-long {
	font-size: 16px;
	line-height: 24px;
}

/* Map card: a drawn map, the office label and a link to the real map */

.syb-map-card {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 260px;
	padding: 16px;
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background-color: #e9f0fb;
	background-image:
		linear-gradient(#fff, #fff),
		linear-gradient(#fff, #fff),
		linear-gradient(#dce7f9, #dce7f9),
		linear-gradient(#dce7f9, #dce7f9),
		linear-gradient(#dce7f9, #dce7f9),
		linear-gradient(#dce7f9, #dce7f9);
	background-repeat: no-repeat;
	background-position: 0 63px, 105px 0, 126px 86px, 270px 186px, 20px 186px, 406px 86px;
	background-size: 100% 14px, 10px 100%, 108px 70px, 106px 60px, 76px 60px, 60px 70px;
}

.syb-map-card__pin {
	position: absolute;
	top: 88px;
	left: calc(50% - 22px);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(36, 124, 239, 0.18);
}

.syb-map-card__pin::after {
	content: "";
	position: absolute;
	inset: 21px;
	border: 4px solid var(--c-white);
	border-radius: 50%;
	background: var(--c-primary);
}

.syb-map-card__label {
	position: absolute;
	top: 40px;
	left: 50%;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: calc(100% - 32px);
	padding: 8px 14px;
	transform: translateX(-50%);
	border-radius: 20px;
	background: var(--c-white);
	color: var(--c-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	white-space: nowrap;
	box-shadow: var(--shadow-md);
}

.syb-map-card__label svg {
	flex: none;
	color: var(--c-primary);
}

.syb-map-card .btn {
	position: relative;
}

/* Form card */

.syb-form__card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	padding: 20px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background: var(--c-white);
	box-shadow: var(--shadow-xl);
}

.syb-form__title {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.syb-form__title :is(h2, h3) {
	color: var(--c-ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 28px;
}

.syb-form__title p {
	color: var(--c-body);
	font-size: 16px;
	line-height: 24px;
}

/* Choice cards ("I am a") */

.syb-choices {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.syb-choices legend {
	margin-bottom: 8px;
	padding: 0;
	color: var(--c-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.syb-choices__grid {
	display: grid;
	gap: 12px;
}

.syb-choice {
	position: relative;
	display: block;
	cursor: pointer;
}

.syb-choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.syb-choice__box {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
	padding: 16px;
	border: 1px solid var(--c-border);
	border-radius: 10px;
	background: var(--c-white);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.syb-choice:hover .syb-choice__box {
	border-color: var(--c-primary);
}

.syb-choice input:checked + .syb-choice__box {
	border-color: var(--c-primary);
	background: #eef5ff;
	box-shadow: inset 0 0 0 0.5px var(--c-primary);
}

.syb-choice input:focus-visible + .syb-choice__box {
	outline: 2px solid var(--c-primary);
	outline-offset: 2px;
}

.syb-choice__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--c-blue);
}

.syb-choice__radio {
	width: 18px;
	height: 18px;
	border: 1.5px solid #b9bfd4;
	border-radius: 50%;
	background: var(--c-white);
}

.syb-choice input:checked + .syb-choice__box .syb-choice__radio {
	border-color: var(--c-primary);
	box-shadow: inset 0 0 0 3.5px var(--c-white);
	background: var(--c-primary);
}

.syb-choice__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.syb-choice__text strong {
	color: var(--c-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
}

.syb-choice__text span {
	color: var(--c-body);
	font-size: 14px;
	line-height: 20px;
}

/* Fields */

.syb-form__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

.syb-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.syb-field__label {
	color: var(--c-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.syb-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.syb-field select,
.syb-field textarea {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	background: var(--c-white);
	color: var(--c-ink);
	font: inherit;
	font-size: 16px;
	line-height: 24px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.syb-field textarea {
	height: 132px;
	padding: 12px 16px;
	resize: vertical;
}

.syb-field ::placeholder {
	color: #9a9cab;
	opacity: 1;
}

.syb-field input:focus,
.syb-field select:focus,
.syb-field textarea:focus {
	border-color: var(--c-primary);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(36, 124, 239, 0.16);
}

.syb-field__select {
	position: relative;
	display: block;
}

.syb-field__select select {
	padding-right: 44px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.syb-field__select select:invalid,
.syb-field__select select.is-empty {
	color: #9a9cab;
}

.syb-field__select svg {
	position: absolute;
	top: 15px;
	right: 16px;
	color: var(--c-body);
	pointer-events: none;
}

.syb-field__help {
	color: var(--c-mute);
	font-size: 14px;
	line-height: 20px;
}

/* File upload */

.syb-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 124px;
	padding: 16px;
	border: 1px dashed #c3c9dd;
	border-radius: var(--radius);
	background: #f8f9fd;
	text-align: center;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.syb-drop:hover,
.syb-drop:focus-within,
.syb-drop.is-over {
	border-color: var(--c-primary);
	background: #eef5ff;
}

.syb-drop input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.syb-drop svg {
	color: var(--c-blue);
}

.syb-drop strong {
	color: var(--c-ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	overflow-wrap: anywhere;
}

.syb-drop span {
	color: var(--c-mute);
	font-size: 14px;
	line-height: 20px;
}

/* Checkbox */

.syb-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--c-body);
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}

.syb-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1px solid #b9bfd4;
	border-radius: 4px;
	background: var(--c-white) center / 14px 14px no-repeat;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.syb-check input:checked {
	border-color: var(--c-primary);
	background-color: var(--c-primary);
	background-image: 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='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.syb-check input:focus-visible {
	outline: 2px solid var(--c-primary);
	outline-offset: 2px;
}

/* Submit row */

.syb-form__submit {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.syb-form__submit .btn {
	width: 100%;
	cursor: pointer;
}

.syb-form__submit p {
	color: var(--c-mute);
	font-size: 14px;
	line-height: 20px;
}

.syb-form__status {
	padding: 12px 16px;
	border-radius: var(--radius);
	background: #fff8e5;
	color: #6b4e00;
	font-size: 14px;
	line-height: 20px;
}

.syb-form__status[hidden] {
	display: none;
}

@media (min-width: 600px) {
	.syb-choices__grid {
		grid-template-columns: repeat(var(--syb-cols, 3), minmax(0, 1fr));
	}

	.syb-form__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.syb-field {
		grid-column: 1 / -1;
	}

	.syb-field--half {
		grid-column: auto;
	}

	.syb-form__submit {
		flex-direction: row;
		align-items: center;
		gap: 16px;
	}

	.syb-form__submit .btn {
		flex: none;
		width: auto;
	}
}

@media (min-width: 768px) {
	.syb-form__aside {
		gap: 32px;
	}

	.syb-form--form-left .syb-form__aside {
		gap: 20px;
	}

	.syb-form__aside .syb-head {
		margin-bottom: 0;
	}

	.syb-contact-card {
		padding: 28px;
	}

	.syb-form__card {
		padding: 32px;
	}

	.syb-form__title :is(h2, h3) {
		font-size: 24px;
		line-height: 32px;
	}
}

@media (min-width: 1000px) {
	.syb-form__inner {
		display: grid;
		grid-template-columns: minmax(0, 440fr) minmax(0, 740fr);
		align-items: start;
		gap: 60px;
	}

	.syb-form--form-left .syb-form__inner {
		grid-template-columns: minmax(0, 720fr) minmax(0, 480fr);
		gap: 40px;
	}

	.syb-form__inner--solo {
		grid-template-columns: minmax(0, 740px);
		justify-content: center;
	}
}

/* A field the visitor has to look at again */

.syb-field__error {
	color: #b42318;
	font-size: 14px;
	line-height: 20px;
}

.syb-field.is-invalid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.syb-field.is-invalid select,
.syb-field.is-invalid textarea,
.syb-field.is-invalid .syb-drop,
.syb-field.is-invalid .syb-check input {
	border-color: #d92d20;
}

.syb-field--checkbox .syb-field__error {
	padding-left: 30px;
}

.syb-choices .syb-field__error {
	display: block;
	margin-top: 8px;
}

/* Thank-you panel: takes the place of the fields once the form is sent */

.syb-form__done {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 40px 12px;
	text-align: center;
	outline: 0;
}

.syb-form__done[hidden] {
	display: none;
}

.syb-form__done-icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: #e7f6ec;
	color: #1a7f4b;
}

.syb-form__done :is(h2, h3) {
	color: var(--c-ink);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
}

.syb-form__done p {
	max-width: 440px;
	color: var(--c-body);
	font-size: 16px;
	line-height: 24px;
}

.syb-form__card.is-done > :not(.syb-form__done) {
	display: none;
}
