/**
 * Trabalhe Conosco layout.
 *
 * The five frames are one contract: 1440, 1024, 768, 390, and 320.
 * Copy grows. Frame heights are not page heights.
 *
 * FIGMA STATIC CONTENT DIVERGENCE: the mobile and desktop form introductions
 * differ in the frames. The page has one ACF value, so every viewport uses it.
 * The demonstrative privacy paragraph in the frames is not rendered unless
 * privacy_notice is filled. From 768px up it appears in the editorial column
 * and again beside the submit. Below 768px only the copy beside the submit
 * remains.
 */

.br-careers {
	--br-careers-gutter: 24px;

	background: var(--wp--preset--color--surface-base);
	color: var(--wp--preset--color--text-primary);
}

.br-careers-hero__title,
.br-careers-hero__intro,
.br-careers-editorial__title,
.br-careers-editorial__text,
.br-careers-privacy__title,
.br-careers-privacy__notice,
.br-careers__legend,
.br-careers .br-field__label,
.br-careers .wpcf7-not-valid-tip,
.br-careers .wpcf7-response-output,
.br-careers-status__title,
.br-careers-status__body {
	overflow-wrap: anywhere;
}

.br-careers-hero {
	background: var(--wp--preset--color--surface-subtle);
	padding-bottom: 32px;
}

.br-careers-hero__content,
.br-careers-hero__copy,
.br-careers-editorial,
.br-careers-form,
.br-careers .wpcf7,
.br-careers form.wpcf7-form {
	min-width: 0;
}

.br-careers-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 720px;
}

.br-careers-hero__copy {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.br-careers-hero__title {
	margin: 0;
	color: var(--wp--preset--color--brand-primary);
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -0.3px;
	line-height: 44px;
}

.br-careers-hero__intro,
.br-careers-hero__intro p {
	width: 100%;
	max-width: 720px;
	margin: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
}

.br-careers-main {
	padding: 48px var(--br-careers-gutter);
}

.br-careers-layout {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.br-careers-editorial--empty {
	display: none;
}

.br-careers-editorial__intro,
.br-careers-editorial {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.br-careers-editorial__title,
.br-careers-status__title {
	margin: 0;
	color: var(--wp--preset--color--brand-primary);
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: 28px;
	font-weight: 600;
	letter-spacing: -0.2px;
	line-height: 36px;
}

.br-careers-editorial__text {
	margin: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
	white-space: pre-line;
}

.br-careers-editorial__rule {
	width: 100%;
	height: 0;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--border-default);
}

.br-careers-privacy {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.br-careers-privacy__title {
	margin: 0;
	color: var(--wp--preset--color--brand-primary);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 20px;
	text-transform: uppercase;
}

.br-careers-privacy__notice,
.br-careers-privacy__notice p {
	margin: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: 14px;
	font-weight: 400;
	line-height: 22px;
}

.br-careers-privacy__notice a {
	color: var(--wp--preset--color--brand-primary);
	font-weight: 600;
}

.br-careers form.wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.br-careers__required-note {
	margin: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: 13px;
	line-height: 20px;
}

.br-careers__group {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.br-careers__legend {
	padding: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 20px;
	text-transform: uppercase;
}

.br-careers__pair {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.br-careers .br-field,
.br-careers .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
	min-width: 0;
}

.br-careers .br-field__control,
.br-careers textarea.br-field__control {
	width: 100%;
	max-width: 100%;
}

.br-careers .br-careers-status__icon .br-icon {
	width: 40px;
	height: 40px;
	color: inherit;
}

.br-careers .br-field__select-wrap .br-icon {
	top: 23px;
	transform: none;
}

.br-careers .br-file__choose {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.br-careers .br-file__zone:focus-within {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 2px;
}

.br-careers .br-file__zone:has(.br-file__choose:focus-visible) {
	outline: none;
}

.br-careers .wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	color: var(--wp--preset--color--feedback-error);
	font-size: var(--wp--custom--type--label-small--font-size);
	line-height: var(--wp--custom--type--label-small--line-height);
}

.br-careers .br-field:has(.wpcf7-not-valid) .br-field__control,
.br-careers .br-field:has(.wpcf7-not-valid) .br-file__zone {
	border-color: var(--wp--preset--color--feedback-error);
}

.br-careers [data-br-file-runtime="1"] .br-file__drop,
.br-careers [data-br-file-runtime="1"] .br-file__selected {
	display: none;
	width: 100%;
	margin: 0;
}

.br-careers [data-br-file-runtime="1"][data-state="drag-over"] .br-file__actions,
.br-careers [data-br-file-runtime="1"][data-state="drag-over"] .br-file__zone > .br-icon,
.br-careers [data-br-file-runtime="1"][data-state="file-selected"] .br-file__actions,
.br-careers [data-br-file-runtime="1"][data-state="file-selected"] .br-file__zone > .br-icon,
.br-careers [data-br-file-runtime="1"][data-state="error"] .br-file__selected {
	display: none;
}

.br-careers [data-br-file-runtime="1"][data-state="drag-over"] .br-file__drop,
.br-careers [data-br-file-runtime="1"][data-state="file-selected"] .br-file__selected {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.br-careers .br-file__name {
	flex: 1 1 auto;
	white-space: nowrap;
}

.br-careers .br-file__row {
	max-width: 100%;
}

.br-careers .br-file__runtime-error {
	color: var(--wp--preset--color--feedback-error);
}

.br-careers .wpcf7-response-output {
	margin: 0;
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--preset--color--feedback-error);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--feedback-error-subtle);
	color: var(--wp--preset--color--feedback-error);
	font-size: 14px;
	line-height: 22px;
}

.br-careers .wpcf7-response-output[hidden] {
	display: none;
}

.br-careers-summary[hidden] {
	display: none;
}

.br-careers__turnstile {
	max-width: 100%;
	min-width: 0;
}

.br-careers__turnstile .wpcf7-form-control-wrap {
	max-width: 100%;
}

.br-careers__submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	margin: 0;
}

/*
 * CF7 6.1.7 keeps a 24px spinner with 24px side margins even while hidden.
 * Zero the plugin margins and place the spinner before the button so the
 * button's right edge stays on the form edge in idle and loading.
 */
.br-careers__submit .wpcf7-spinner {
	order: -1;
	margin: 0;
}

@media (max-width: 767px) {

	.br-careers__submit {
		position: relative;
	}

	.br-careers__submit .wpcf7-spinner {
		position: absolute;
		top: 50%;
		left: 16px;
		transform: translateY(-50%);
	}
}

.br-careers input.br-button {
	appearance: none;
	width: 100%;
}

.br-careers-status {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	min-width: 0;
	margin-bottom: 24px;
	padding: 48px 40px;
	border-radius: 16px;
	text-align: center;
}

.br-careers-status--success {
	background: var(--wp--preset--color--feedback-success-subtle);
}

.br-careers-status--failure {
	background: var(--wp--preset--color--feedback-error-subtle);
}

.br-careers-status__icon {
	display: flex;
}

.br-careers-status--success .br-careers-status__icon {
	color: var(--wp--preset--color--feedback-success);
}

.br-careers-status--failure .br-careers-status__icon {
	color: var(--wp--preset--color--feedback-error);
}

.br-careers-status__title {
	font-size: 24px;
	line-height: 32px;
}

.br-careers-status--success .br-careers-status__title {
	color: var(--wp--preset--color--brand-primary);
}

.br-careers-status--failure .br-careers-status__title {
	color: var(--wp--preset--color--feedback-error);
}

.br-careers-status__link {
	color: var(--wp--preset--color--brand-primary);
	font-weight: 600;
	text-decoration: underline;
}

.br-careers-status__body {
	margin: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: 15px;
	line-height: 22px;
}

.br-careers-status[hidden],
.br-careers form[hidden] {
	display: none;
}

@media (max-width: 767px) {

	.br-careers .br-file__drag,
	.br-careers-editorial .br-careers-privacy,
	.br-careers-editorial__rule,
	.br-careers form .br-careers__required-note {
		display: none;
	}
}

@media (min-width: 768px) {

	.br-careers {
		--br-careers-gutter: 40px;
	}

	.br-careers-hero {
		padding-bottom: 80px;
	}

	.br-careers-main {
		padding: 64px var(--br-careers-gutter) 80px;
	}

	.br-careers-editorial__required {
		display: none;
	}

	.br-careers-form .br-careers-privacy {
		align-items: flex-end;
		text-align: right;
	}

	.br-careers__pair {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 16px;
	}

	.br-careers__submit {
		display: flex;
		justify-content: flex-end;
	}

	.br-careers input.br-button {
		width: auto;
	}
}

@media (min-width: 1024px) {

	.br-careers {
		--br-careers-gutter: 80px;
	}

	.br-careers-editorial--empty {
		display: block;
	}

	/*
	 * The editorial track and the gap keep the 1024→1440 clamps.
	 * The form track fills whatever width remains inside the container,
	 * so 1440 is about 400 + 80 + 800 and 1920 stays on the 1280 canvas.
	 * Owner decision after frame 94:1368, which still drew the form at 640px.
	 */
	.br-careers-layout {
		display: grid;
		grid-template-columns:
			clamp(280px, calc(280px + (100vw - 1024px) * 120 / 416), 400px)
			minmax(0, 1fr);
		column-gap: clamp(48px, calc(48px + (100vw - 1024px) * 32 / 416), 80px);
		align-items: start;
	}
}

@media (prefers-reduced-motion: reduce) {

	.br-careers .br-button {
		transition: none;
	}
}
