/**
 * The public application form.
 *
 * Loaded as a real stylesheet rather than an inline <style> block, because the
 * shortcode's return value passes through the_content filters — wptexturize encodes
 * bare ampersands, and anything inlined there is at the mercy of that.
 *
 * @package DAM
 */

.dam-application__fieldset {
	border: 1px solid currentColor;
	padding: 1em;
	margin-bottom: 1.5em;
}

.dam-application__dancers {
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.dam-application__dancer {
	border: 1px solid currentColor;
	padding: 1em;
	margin-bottom: 1em;
}

.dam-application__course-list {
	list-style: none;
	margin: 0.25em 0 0;
	padding: 0;
}

.dam-application__course {
	margin: 0.4em 0;
}

.dam-application__course-block {
	margin: 0.5em 0 1em 1.6em;
	padding-left: 0.8em;
	border-left: 2px solid currentColor;
}

.dam-application__help,
.dam-application__dob {
	font-size: 0.9em;
	opacity: 0.8;
}

/*
 * The groups a returning dancer is already applied for. Deliberately *not* dimmed like
 * the help and date-of-birth lines beside it: it is the one line on the row that can stop
 * a family submitting a duplicate, and it only does that if it is read.
 */
.dam-application__held {
	font-weight: 700;
	margin: 0.25em 0;
}

.dam-application__error {
	display: block;
	font-weight: 700;
}

.dam-application__notice {
	font-style: italic;
}

/*
 * The terms and privacy consent, immediately above the submit button. The margin is
 * deliberately larger than a field's: it is the last thing read before submitting, and it
 * should not look like one more question about a dancer.
 */
.dam-application__consent {
	margin-top: 1.5em;
}

.dam-application__consent--error {
	font-weight: 700;
}

/*
 * The Turnstile widget, when the site has one. Spaced like the consent above it and
 * nothing more: its own size, theme and language are the Turnstile plugin's settings, and
 * styling the box it draws would be this stylesheet reaching into another plugin's markup.
 */
.dam-application__turnstile {
	margin-top: 0.5em;
}

.dam-application__label {
	display: block;
	font-weight: 700;
	margin-top: 0.5em;
}

.dam-application__experience label {
	margin-right: 1em;
}

/*
 * The `hidden` attribute is the form's whole safety property: a course option the
 * dancer has not been shown to be eligible for is hidden and disabled in the markup
 * itself, and only revealed once the server says so.
 *
 * The browser's own `[hidden] { display: none }` comes from the user-agent stylesheet,
 * which *any* author rule beats regardless of specificity — a theme styling
 * `li { display: list-item }` would put every hidden course back on screen. This rule
 * is an author rule of our own, so the guarantee survives whatever theme the
 * association picks.
 */
.dam-application [hidden] {
	display: none !important;
}
