/**
 * 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);
	scroll-margin-top: 24px;
}

/*
 * Arriving here from "Is it yours? Claim it", which sits a long way up the
 * page beside the review note. Landing in the middle of a page of boxes
 * without being told which one was the destination is the confusing part, so
 * the box says so for a moment and then stops.
 */
.fc-claim:target {
	animation: fc-claim-landed 1.8s ease-out;
}

@keyframes fc-claim-landed {
	from {
		box-shadow: 0 0 0 3px var(--fc-accent);
	}

	to {
		box-shadow: 0 0 0 3px transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	/* No fade, but still say which box it was: the ring simply stays. */
	.fc-claim:target {
		animation: none;
		box-shadow: 0 0 0 3px var(--fc-accent);
	}
}

.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,
.fc-dashboard__end {
	margin-top: 1rem;
	font-size: 0.9375rem;
}

.fc-dashboard__transfer summary,
.fc-dashboard__end 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);
}

/*
 * For text that exists only to be announced. The plugin's forms render in
 * whatever theme a site is using, so they cannot borrow that theme's
 * .screen-reader-text and have to carry their own.
 */
.fc-submit__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Your sessions: saved, and looked after
   -------------------------------------------------------------------------- */

/*
 * The two halves of the page: what is coming up, and the events you look
 * after. Only shown to somebody who looks after something, because a tab to
 * nothing is just a thing.
 */
.fc-dashboard__tabs ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.fc-dashboard__tabs a {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	min-height: 44px;
	padding: 0 0.875rem;
	border: 1px solid var(--fc-border);
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.fc-dashboard__tabs a[aria-current="page"] {
	border-color: currentcolor;
	background: var(--fc-accent-tint, transparent);
}

/* The names of your events, to jump to one: each block below is long. */
.fc-dashboard__index ul {
	margin: 0 0 1.25rem;
	padding-left: 1.25rem;
}

.fc-dashboard__index li {
	margin: 0.25rem 0;
}

.fc-dashboard__listing {
	scroll-margin-top: 1rem;
}

.fc-dashboard__count {
	font-variant-numeric: tabular-nums;
	font-weight: 400;
	color: var(--fc-muted);
}

.fc-dashboard__heading {
	margin: 1.5rem 0 0.75rem;
	font-size: 1.125rem;
}

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

/*
 * A saved session is somebody else's, so the row carries no controls beyond
 * the star that unsaves it: the whole point of this list is that it is short
 * and says when things are next on.
 */
.fc-dashboard__saved-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.875rem 0;
	border-bottom: 1px solid var(--fc-border);
}

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

.fc-dashboard__saved-main {
	min-width: 0;
}

.fc-dashboard__saved-main p {
	margin: 0 0 0.25rem;
}

.fc-dashboard__saved-star {
	flex: none;
}

.fc-dashboard__saved-dates {
	margin: 0.25rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
	color: var(--fc-muted);
}

.fc-dashboard__saved-dates .is-cancelled {
	text-decoration: line-through;
}

/*
 * The first step when a site takes more than one kind of listing: two big
 * targets, each saying in a sentence what it is for, so nobody has to know
 * the site's word for the thing they run before they can add it.
 */
.fc-submit__choose-title {
	margin: 0 0 var(--fc-gap);
}

/* The link to what each kind means, under the question, when there is one. */
.fc-submit__choose-help {
	margin: calc(var(--fc-gap) * -0.5) 0 var(--fc-gap);
}

.fc-submit__choices {
	display: grid;
	gap: var(--fc-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fc-submit__choice {
	display: block;
	min-height: 48px;
	padding: 1rem;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	background: var(--fc-surface);
	color: inherit;
	text-decoration: none;
}

.fc-submit__choice:hover,
.fc-submit__choice:focus-visible {
	border-color: var(--fc-accent);
}

.fc-submit__choice-label {
	display: block;
	margin: 0 0 0.25rem;
	font-size: 1.15rem;
}

.fc-submit__choice-text {
	display: block;
	color: var(--fc-muted);
}

.fc-submit__adding {
	margin: 0 0 1rem;
}

.fc-submit__adding a {
	margin-left: 0.5rem;
}

@media (min-width: 40rem) {
	.fc-submit__choices {
		grid-template-columns: 1fr 1fr;
	}
}

/* The map for placing a starting point. */
.fc-submit__map {
	height: 16rem;
	margin: 0.5rem 0;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
}

.fc-dashboard__status--ended {
	color: var(--fc-muted, inherit);
	border-style: dashed;
}

/* The next step for somebody who looks after nothing yet. */
.fc-dashboard__claim-nudge {
	margin-top: 1.5rem;
	padding: 1rem;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
}

.fc-dashboard__claim-nudge .fc-dashboard__subheading {
	margin-top: 0;
}

.fc-dashboard__claim-nudge a + a {
	margin-left: 1rem;
}

/* The Emails tab (spec 19.3): the reader's alerts, each with its own
   buttons and an edit form folded away under it. */
.fc-submit__error {
	margin: 0.35rem 0 0;
	color: var(--fc-error);
	font-weight: 600;
}

.fc-dashboard__alerts {
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.fc-dashboard__alert {
	margin: 0 0 0.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
}

.fc-dashboard__alert-name {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	align-items: baseline;
	margin: 0 0 0.5rem;
}

.fc-dashboard__alert-name .fc-submit__hint {
	margin: 0;
}

.fc-dashboard__alert-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.fc-dashboard__alert-actions form {
	margin: 0;
}

.fc-dashboard__alert-edit {
	margin-top: 0.5rem;
}

.fc-dashboard__stop {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: 1.5rem;
}

.fc-dashboard__stop .fc-submit__hint {
	margin: 0;
}

/* The alert form's "Where": each choice with its own fields under it,
   indented so it reads as belonging to that button. */
.fc-alert-where__option + .fc-alert-where__option {
	margin-top: 0.75rem;
}

.fc-alert-where__choice {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	font-weight: 600;
}

.fc-alert-where__fields {
	margin: 0.25rem 0 0 0.75rem;
	padding-left: 1rem;
	border-left: 2px solid var(--fc-border);
}

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

/* The Embeds tab (spec 21.2). */

.fc-embed-code {
	width: 100%;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85rem;
	resize: vertical;
}

.fc-embed-copy {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 0.5rem 0 0;
}

.fc-embed-colours {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
	gap: 0 var(--fc-gap);
}

.fc-embed-colours input[type="color"] {
	width: 100%;
	min-height: 2.5rem;
	padding: 0.15rem;
}

/* A busy county lists hundreds: kept to a scrolling box. */
.fc-embed-hide {
	max-height: 18rem;
	overflow-y: auto;
	padding: 0.5rem;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
}

.fc-embed-preview__heading {
	margin: 1.5rem 0 0.25rem;
	font-size: 1rem;
}

.fc-embed-preview {
	margin-top: 0.5rem;
	min-height: 3rem;
}
