/*
 * AUK Global: rules the Contact and Submit CV forms need on top of auk.css.
 * Loaded after auk.css (see auk_enqueue_assets()). Only what that file does not already cover.
 */

/* Start a new row in the two-column field grid. Replaces the design's empty spacer cells,
   which turned into blank gaps once the grid drops to one column. */
.fgrid > .auk-col-start {
	grid-column: 1;
}

/* Content that only makes sense with, or without, JavaScript. */
.no-js .auk-js-only,
.js .auk-nojs-only {
	display: none !important;
}

/* Before the script has started: keep the later steps and the conditional blocks out of sight, so
   the page does not open with all three steps and then collapse. If the script never arrives,
   the delay runs out and everything appears, which is the same form the no-JavaScript visitor gets. */
@keyframes auk-await-script {
	from {
		position: absolute;
		visibility: hidden;
		height: 0;
		overflow: hidden;
	}
}

.js form[data-auk-steps]:not(.is-stepped) [data-auk-step]:not(.is-initial),
.js form[data-auk-steps]:not(.is-stepped) [data-auk-show-if] {
	animation: auk-await-script 0s linear 4s backwards;
}

/* With every step on screen there is no current step to highlight. */
.no-js .auk-step.is-cur .auk-step__dot {
	border-color: var(--border-field);
	background: var(--periwinkle-100);
	color: var(--navy-900);
}

.no-js .auk-step.is-cur .auk-step__label {
	color: var(--navy-900);
}

/* A step's Next / Previous row is empty without JavaScript. */
.no-js [data-auk-stepnav] {
	display: none;
}

/* Line above the Submit CV form: required-field note on the left, draft status on the right. */
.auk-cvbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-1) var(--space-5);
	margin: 0 0 var(--space-3);
}

.auk-cvbar__draft {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 var(--space-4);
}

.auk-cvbar__status {
	margin: 0;
	font: 400 13px/18px var(--font-sans);
	color: var(--navy-700);
}

.auk-cvbar__status:empty {
	display: none;
}

/* A button that reads as a text link, with a full-height touch target. */
.auk-linkbtn {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	font: 600 14px/20px var(--font-sans);
	color: var(--navy-700);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.auk-linkbtn:hover {
	color: var(--navy-900);
	text-decoration-thickness: 2px;
}

.auk-linkbtn:active {
	color: var(--orange-700);
}

/* Privacy agreement between the last panel and the Send button. */
.auk-cvconsent {
	margin-top: var(--space-5);
}

/* Hint between a legend and its options, and the note after them: keep both clear of the options. */
.auk-fieldset > .auk-field__hint {
	margin-bottom: var(--space-2);
}

.auk-fieldset > .checks + .auk-field__hint {
	margin-top: var(--space-2);
	margin-bottom: 0;
}

/* A single checkbox wrapped in .auk-field: the error ring goes on the box itself. */
.auk-field.has-error .auk-check input {
	outline: 2px solid var(--danger-600);
	outline-offset: 1px;
}

/* Month fields and the drop zone share a row with 44px controls; keep the native picker the same height. */
input[type="month"].auk-field__control {
	min-width: 0;
	-webkit-appearance: none;
	appearance: none;
}

/* The office address is set in capitals in the design; the stored value keeps normal case. */
.contactrow__text--caps {
	text-transform: uppercase;
}

/* While the form is being sent the button says so without changing its label. */
form.is-submitting .auk-btn[type="submit"] {
	cursor: progress;
}

@media (max-width: 640px) {
	.auk-cvbar {
		align-items: flex-start;
		flex-direction: column;
	}
}
