/* Single-page career form. Scoped under .fthc; the page around it is dark. */
.fthc {
	--ink: #000911;
	--slate: #5f6368;
	--line: #dedfe3;
	--paper: #fcfbfc;
	--violet: #693efc;
	--violet-dark: #5430d6;
	--lavender: #efecff;
	--teal: #00d9d2;
	--err: #b3261e;
	max-width: 880px;
	margin: 0 auto;
	padding: 0 16px 56px;
	font-family: inherit;
	color: var(--paper);
	box-sizing: border-box;
}
.fthc *, .fthc *::before, .fthc *::after { box-sizing: border-box; }
.fthc [hidden] { display: none !important; }

/* the theme styles links and submit buttons site-wide; its page wrapper also adds padding on top of 100% width */
.site-main:has(.fthc) { box-sizing: border-box; max-width: 100%; }
.fthc a.fthc-tab, .fthc a.fthc-tab:hover, .fthc a.fthc-tab span { text-decoration: none !important; }
.fthc .fthc-form button.fthc-submit { background: var(--violet) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; }
.fthc .fthc-form button.fthc-submit:hover, .fthc .fthc-form button.fthc-submit:focus { background: var(--violet-dark) !important; color: #fff !important; }

/* vacancies */
.fthc-jobs-title { margin: 0 0 14px; font-size: 20px; font-weight: 700; color: var(--paper); }
.fthc-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.fthc-tabs li { margin: 0; padding: 0; min-width: 0; }
.fthc-tabs li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.fthc-tab {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: 100%;
	min-height: 72px;
	padding: 12px 14px;
	border: 1px solid rgba(252, 251, 252, .28);
	border-radius: 10px;
	color: var(--paper);
	background: transparent;
	text-decoration: none;
	transition: background-color .15s, border-color .15s, color .15s;
}
.fthc-tab:hover { border-color: var(--teal); color: var(--paper); }
.fthc-tab-title { font-size: 16px; font-weight: 700; line-height: 1.35; }
.fthc-tab-mode { font-size: 13px; line-height: 1.3; opacity: .72; }
.fthc-tab.is-active, .fthc-tab.is-active:hover {
	background: var(--teal);
	border-color: var(--teal);
	color: var(--ink);
}
.fthc-tab.is-active .fthc-tab-mode { opacity: .85; }
.fthc-tab:focus-visible,
.fthc-sheet :focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.fthc-tab:focus-visible { outline-color: var(--teal); }
.fthc-prompt { margin: 16px 0 0; font-size: 15px; opacity: .8; }

/* sheet */
.fthc-sheet {
	margin-top: 22px;
	padding: 24px 18px 26px;
	border-radius: 14px;
	background: var(--paper);
	color: var(--ink);
	scroll-margin-top: 90px;
}
.fthc-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.fthc-meta { margin: 6px 0 0; font-size: 14px; color: var(--slate); }
.fthc-intro { margin-top: 14px; font-size: 15px; line-height: 1.7; color: #33383d; }
.fthc-intro p { margin: 0 0 8px; }
.fthc-intro p:last-child { margin-bottom: 0; }

.fthc-section { margin: 26px 0 0; padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); }
.fthc-section-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; color: var(--ink); }
.fthc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

/* fields */
.fthc-field { min-width: 0; }
.fthc-field > label,
.fthc-field legend {
	display: block;
	width: 100%;
	margin: 0 0 7px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--ink);
}
.fthc-field fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fthc-req { color: var(--err); }
.fthc-help { display: block; margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--slate); }
.fthc-field legend + .fthc-help { margin: -2px 0 9px; }

.fthc-field input[type=text],
.fthc-field input[type=email],
.fthc-field input[type=tel],
.fthc-field input[type=url],
.fthc-field input[type=number],
.fthc-field select,
.fthc-field textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #b9bbc2;
	border-radius: 8px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	box-shadow: none;
}
.fthc-field textarea { min-height: 112px; resize: vertical; }
.fthc-field input:focus,
.fthc-field select:focus,
.fthc-field textarea:focus { border-color: var(--violet); outline: 2px solid rgba(105, 62, 252, .22); outline-offset: 0; }
.fthc-field input[dir=ltr] { text-align: left; }

/* choices: pills for short single-choice and multi-choice */
.fthc-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fthc-opt { position: relative; display: inline-flex; max-width: 100%; margin: 0; cursor: pointer; }
.fthc-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fthc-opt span {
	display: block;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid #b9bbc2;
	border-radius: 8px;
	background: #fff;
	color: var(--ink);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
}
.fthc-opt:hover span { border-color: var(--violet); }
.fthc-opt input:checked + span {
	border-color: var(--violet);
	background: var(--lavender);
	color: var(--violet-dark);
	font-weight: 600;
	box-shadow: inset 0 0 0 1px var(--violet);
}
.fthc-opt input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }

/* file */
.fthc-file {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 6px 6px 6px 12px;
	border: 1px dashed #9a9da6;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}
.fthc-file input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fthc-file-btn {
	flex: none;
	padding: 7px 14px;
	border-radius: 6px;
	background: var(--ink);
	color: var(--paper);
	font-size: 14px;
	font-weight: 600;
}
.fthc-file-name { min-width: 0; overflow: hidden; color: var(--slate); font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.fthc-file:focus-within { border-color: var(--violet); outline: 2px solid rgba(105, 62, 252, .22); }

/* errors */
.fthc-bad input[type=text], .fthc-bad input[type=email], .fthc-bad input[type=tel], .fthc-bad input[type=url],
.fthc-bad input[type=number], .fthc-bad select, .fthc-bad textarea, .fthc-bad .fthc-opt span, .fthc-bad .fthc-file { border-color: var(--err); }
.fthc-ferr { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--err); }
.fthc-error { margin: 20px 0 0; padding: 10px 12px; border-radius: 8px; background: #fbeceb; color: var(--err); font-size: 15px; font-weight: 600; }
.fthc-alt { margin: 10px 0 0; font-size: 14px; }
.fthc-alt a { color: var(--violet-dark); text-decoration: underline; }
.fthc-hp { position: absolute !important; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; }

/* submit + done */
.fthc-actions { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.fthc-submit {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 12px 28px;
	border: 0;
	border-radius: 8px;
	background: var(--violet);
	color: #fff;
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .15s;
}
.fthc-submit:hover, .fthc-submit:focus { background: var(--violet-dark); color: #fff; }
.fthc-submit:disabled { opacity: .65; cursor: wait; }
.fthc-done { margin-top: 18px; padding: 18px; border-radius: 10px; background: var(--lavender); }
.fthc-done h3 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.fthc-done p { margin: 0; font-size: 15px; color: var(--ink); }

.fthc-msg { max-width: 720px; margin: 24px auto; padding: 0 16px; text-align: center; color: inherit; }

@media (min-width: 720px) {
	.fthc { padding-bottom: 80px; }
	.fthc-tabs { grid-template-columns: repeat(6, 1fr); }
	.fthc-tabs li, .fthc-tabs li:last-child:nth-child(odd) { grid-column: span 2; }
	.fthc-tabs li:nth-child(3n+1):nth-last-child(2),
	.fthc-tabs li:nth-child(3n+2):last-child { grid-column: span 3; }
	.fthc-tabs li:nth-child(3n+1):last-child { grid-column: 1 / -1; }
	.fthc-sheet { padding: 36px 40px 40px; }
	.fthc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
	.fthc-field--wide { grid-column: 1 / -1; }
	.fthc-submit { display: inline-block; width: auto; min-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
	.fthc-tab, .fthc-submit { transition: none; }
}
