/**
 * Submission form (spec section 7). Mobile first, because the acceptance test
 * is someone adding a session from a phone in under two minutes.
 *
 * Shares the find page's custom properties where it can; anything not defined
 * there is defined here so the form stands alone on a page without a search.
 */

.fc-submit {
	--fc-gap: 0.75rem;
	--fc-radius: 6px;
	--fc-border: #d6d3cd;
	--fc-muted: #5f5b55;
	--fc-accent: #7a4f2a;
	--fc-accent-contrast: #fff;
	--fc-surface: #faf8f5;
	--fc-error: #a33;

	margin: 0 0 2rem;
	max-width: 40rem;
}

.fc-submit *,
.fc-submit *::before,
.fc-submit *::after {
	box-sizing: border-box;
}

.fc-submit [hidden] {
	display: none;
}

.fc-submit__step {
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	padding: var(--fc-gap);
	margin: 0 0 1rem;
	background: var(--fc-surface);
}

.fc-submit__step legend {
	padding: 0 0.4rem;
	font-weight: 700;
}

.fc-submit__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: var(--fc-gap);
	min-width: 0;
}

.fc-submit__field:last-child {
	margin-bottom: 0;
}

.fc-submit__field label {
	font-size: 0.875rem;
	font-weight: 600;
}

.fc-submit__field input,
.fc-submit__field select,
.fc-submit__field textarea {
	width: 100%;
	padding: 0.6rem 0.5rem;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	background: #fff;
	/* 16px stops iOS zooming the page when a field is focused. */
	font-size: 1rem;
	line-height: 1.3;
	font-family: inherit;
}

.fc-submit__row {
	display: flex;
	flex-direction: column;
	gap: var(--fc-gap);
}

.fc-submit__hint {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--fc-muted);
}

/* Venue picker */

.fc-submit__suggestions {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	background: #fff;
	overflow: hidden;
}

.fc-submit__suggestion {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 0.6rem;
	border: 0;
	border-bottom: 1px solid var(--fc-border);
	background: none;
	font-size: 0.9375rem;
	text-align: left;
	cursor: pointer;
}

.fc-submit__suggestion:last-child {
	border-bottom: 0;
}

.fc-submit__suggestion:hover,
.fc-submit__suggestion:focus {
	background: var(--fc-surface);
}

.fc-submit__suggestion--empty {
	color: var(--fc-muted);
	cursor: default;
}

.fc-submit__chosen {
	display: flex;
	align-items: center;
	gap: var(--fc-gap);
	margin: 0.35rem 0 0;
	font-weight: 600;
}

.fc-submit__clear {
	min-height: 36px;
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	background: #fff;
	font-size: 0.875rem;
	cursor: pointer;
}

.fc-submit__new-venue summary {
	cursor: pointer;
	padding: 0.35rem 0;
	font-weight: 600;
}

/* The honeypot. Off-screen rather than display:none, because some bots skip
   fields that are not rendered at all. */

.fc-submit__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Errors and confirmation */

.fc-submit__errors {
	margin: 0 0 1rem;
	padding: 0.75rem;
	border-left: 3px solid var(--fc-error);
	background: var(--fc-surface);
}

.fc-submit__errors p {
	margin: 0 0 0.35rem;
	font-weight: 600;
}

.fc-submit__errors ul {
	margin: 0;
	padding-left: 1.2rem;
}

.fc-submit__done {
	padding: 1rem;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	background: var(--fc-surface);
}

.fc-submit__done h2 {
	margin-top: 0;
}

.fc-submit__actions {
	margin-top: 1rem;
}

.fc-submit__button {
	width: 100%;
	min-height: 48px;
	padding: 0.7rem 1.5rem;
	border: 1px solid var(--fc-accent);
	border-radius: var(--fc-radius);
	background: var(--fc-accent);
	color: var(--fc-accent-contrast);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

@media (min-width: 40em) {
	.fc-submit__row {
		flex-direction: row;
	}

	.fc-submit__row > .fc-submit__field {
		flex: 1 1 0;
	}

	.fc-submit__button {
		width: auto;
	}
}

@media (prefers-color-scheme: dark) {
	.fc-submit {
		--fc-border: #4a463f;
		--fc-muted: #b3ada4;
		--fc-surface: #23211e;
		--fc-accent: #c98a53;
		--fc-accent-contrast: #1b1917;
		--fc-error: #e4796f;
	}

	.fc-submit__field input,
	.fc-submit__field select,
	.fc-submit__field textarea,
	.fc-submit__suggestions,
	.fc-submit__clear {
		background: #1b1917;
		color: inherit;
	}
}

/* Checklists for type, style and tags */

.fc-submit__group-label {
	font-size: 0.875rem;
	font-weight: 600;
}

.fc-submit__checklist {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
}

.fc-submit__checklist label {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 36px;
	font-size: 0.9375rem;
	font-weight: 400;
}

.fc-submit__checklist input {
	width: auto;
}

/* Owner dashboard */

.fc-dashboard__who {
	display: flex;
	justify-content: space-between;
	gap: var(--fc-gap);
	margin: 0 0 1rem;
	font-size: 0.9375rem;
}

.fc-dashboard__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.25rem;
	font-size: 1.125rem;
}

.fc-dashboard__status {
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	border: 1px solid var(--fc-border);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fc-muted);
}

.fc-dashboard__status--publish {
	border-color: currentColor;
}

.fc-dashboard__status--pending {
	color: var(--fc-accent);
	border-color: currentColor;
}

.fc-dashboard__subheading {
	margin: 1rem 0 0.35rem;
	font-size: 0.9375rem;
}

.fc-dashboard__dates {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fc-dashboard__date {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--fc-border);
}

.fc-dashboard__date:last-child {
	border-bottom: 0;
}

.fc-dashboard__date-label {
	flex: 1 1 12rem;
	font-size: 0.9375rem;
}

.fc-dashboard__date.is-cancelled .fc-dashboard__date-label {
	text-decoration: line-through;
	color: var(--fc-muted);
}

.fc-dashboard__cancelled {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fc-error);
}

.fc-dashboard__date-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}

.fc-dashboard__note {
	width: auto;
	min-width: 10rem;
	padding: 0.3rem 0.45rem !important;
	font-size: 0.875rem !important;
}

/* Claim box, appended to an unowned listing */

.fc-claim {
	--fc-gap: 0.75rem;
	--fc-radius: 6px;
	--fc-border: #d6d3cd;
	--fc-muted: #5f5b55;
	--fc-accent: #7a4f2a;
	--fc-accent-contrast: #fff;
	--fc-surface: #faf8f5;

	margin: 2rem 0;
	padding: 1rem;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	background: var(--fc-surface);
}

.fc-claim__heading {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
}

.fc-claim__intro,
.fc-claim__notice {
	margin: 0 0 var(--fc-gap);
	font-size: 0.9375rem;
}

.fc-claim__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0 0 var(--fc-gap);
}

.fc-claim__field label {
	font-size: 0.875rem;
	font-weight: 600;
}

.fc-claim__field input,
.fc-claim__field textarea {
	width: 100%;
	padding: 0.6rem 0.5rem;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	background: #fff;
	font-size: 1rem;
	font-family: inherit;
}

.fc-claim__hint {
	font-size: 0.8125rem;
	color: var(--fc-muted);
}

.fc-claim__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fc-claim__button {
	min-height: 44px;
	padding: 0.6rem 1.2rem;
	border: 1px solid var(--fc-accent);
	border-radius: var(--fc-radius);
	background: var(--fc-accent);
	color: var(--fc-accent-contrast);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

@media (prefers-color-scheme: dark) {
	.fc-claim {
		--fc-border: #4a463f;
		--fc-muted: #b3ada4;
		--fc-surface: #23211e;
		--fc-accent: #c98a53;
		--fc-accent-contrast: #1b1917;
	}

	.fc-claim__field input,
	.fc-claim__field textarea {
		background: #1b1917;
		color: inherit;
	}
}

.fc-dashboard__transfer {
	margin-top: 1rem;
	font-size: 0.9375rem;
}

.fc-dashboard__transfer summary {
	cursor: pointer;
	font-weight: 600;
	padding: 0.35rem 0;
}

.fc-dashboard__edit,
.fc-dashboard__move {
	margin-top: 0.5rem;
	font-size: 0.9375rem;
}

.fc-dashboard__edit summary,
.fc-dashboard__move summary {
	cursor: pointer;
	font-weight: 600;
	padding: 0.35rem 0;
}

.fc-dashboard__edit .fc-submit {
	margin: 0.5rem 0 0;
	max-width: none;
}

.fc-dashboard__moved {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fc-accent);
}
