body {
	background-color: whitesmoke;
	font-family: Sans-Serif;
	min-height: calc(100vh - 2em);
	margin-bottom: 4em;
	padding: 1em;
	line-height: 1.5;
	/* adaptive font-size between 18-24px */
	font-size: max(min(calc(1vh + 1vw + 1.5vmin), 24px), 18px);
}

.site-title,
#footer {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: .5em;
}
@media screen and (min-width: 640px) {
	.site-title,
	#footer {
		flex-direction: row;
	}
}
.logo {
	max-height: 2.5em;
}

.content {
	max-width: 800px;
	margin: 0 auto;
}

h1 {
	text-align: center;
}
h1 input {
	text-align: center;
}

h3 {
	margin-top: 2em;
	margin-bottom: 1em;
}

p:not(:last-child) {
	margin-bottom: 1em;
}

.container {
	margin: 1.5em auto;
	display: flex;
	flex-direction: column;
	gap: 2em 0;
}
.container.driver,
.container.participant {
	flex-direction: row;
	justify-content: space-between;
	gap: 0 1em;
}
.max {
	width: 100%;
}
.nobreak {
	display: inline-block;
}
.line {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 .8em;
}
.result {
	display: block;
	text-align: right;
	margin-top: .5em;
}
@media screen and (max-width: 799px) {
	.max input[name=name] {
		width: 100%;
		margin-bottom: .5em;
	}
}
@media screen and (min-width: 800px) {
	.container {
		flex-direction: row;
		justify-content: space-between;
	}
	.container:not(.driver):not(.participant) {
		align-items: center;
	}
	.container > span.right {
		text-align: right;
	}
	.line {
		justify-content: space-between;
	}
}

#drivers,
#participants {
	position: relative;
	padding-bottom: 1.5em;
}

.button {
	border: 0 none;
	box-shadow: 2px 2px 3px rgba(0, 0, 0, .4);
	cursor: pointer;
}
.button.adjust-boats {
	display: inline-flex;
	margin-right: .3em;
}
.button:hover,
.button:focus {
	box-shadow: 3px 3px 4px rgba(0, 0, 0, .5);
}
.button.add {
	position: absolute;
	bottom: 0;
}

input,
select {
	max-width: 100%;
	padding: .2em;
	border: medium none;
	border-bottom: 1px solid grey;
	background-color: transparent;
}
select {
	padding: .38em;
}

label,
input[type=checkbox] {
	cursor: pointer;
}

input[type=checkbox].icon {
	display: none;
	margin-right: .3em;
}
input[type=checkbox]:not(:checked) + label,
input[type=checkbox]:not(:checked) + button {
	filter: grayscale(100%) opacity(30%);
}

input[name=name],
.driver span.reimbursement,
.participant span.payment {
	font-weight: bold;
}
select[name=family] {
	color: grey;
}

.prototype {
	display: none;
}

input.small {
	width: 3.5em;
}
input[type=number] {
	text-align: right;
}

.other-icon {
	filter: grayscale(100%) opacity(30%);
	cursor: pointer;
}
.other:not(.other-show) .other-input,
.other.other-show .other-icon {
	display: none;
}
.other:not(.other-show) + .other-plus {
	display: none;
}

.invalid {
	border-bottom: 1px dashed red;
}

.content:not(.with-boats) .with-boats,
.content.with-boats .without-boats {
	display: none;
}

.cost {
	font-weight: bold;
}

.button {
	display: flex;
  	justify-content: center;
	align-items: center;
	border-radius: .5em;
	width: 2em;
	min-width: 2em;
	height: 2em;
	background: white;
}
#share {
	position: fixed;
	z-index: 1;
	bottom: 1em;
	right: 1em;
	padding: .5em;
	width: 2.6em;
	height: 2.6em;
	font-size: 1.1em;
	background-color: #6cc76c;
	border-radius: 50%;
}

#footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	/* rgba(245,245,245,1) = whitesmoke */
	background: linear-gradient(180deg, rgba(245, 245, 245, 0) 0%, rgba(245, 245, 245, 1) 10%, rgba(245, 245, 245, 1) 100%);
	line-height: 1.1;
	padding: 1em 0 .5em;
}
#footer a {
	text-decoration: none;
	color: #333;
}
#footer a:hover,
#footer label:hover,
#footer input:hover {
	color: #aaa;
}

.link {
	cursor: pointer;
}
.link:not(:first-child) {
	margin-left: .5em;
}

.overlay {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 6em;
	max-width: min(90%, 800px);
	margin: auto;
	padding: 1em;
	border-radius: .5em;
	box-shadow: 3px 3px 4px rgba(0, 0, 0, .5);
}
.overlay.show {
	display: unset;
}
.overlay.short {
	max-width: fit-content;
	padding: 1em 2em;
}
.overlay.success {
	background-color: rgba(91, 195, 162, 0.95);
	border-color: #32866b;
	color: white;
}
.overlay.info {
	background-color: rgba(241, 195, 126, 0.95);
	border-color: #e69419;
}
.overlay.error {
	background-color: rgba(215, 74, 74, 0.95);
	border-color: #972121;
	color: white;
}
.overlay .close {
	position: absolute;
	top: .3em;
	right: .3em;
	font-size: .8em;
	cursor: pointer;
}
#info-overlay {
	padding-top: 1.5em;
}
.overlay .scroll {
	max-height: calc(100vh - 14em);
	overflow: auto;
	scrollbar-width: thin;
	font-size: .8em;
}
.overlay h4:not(:first-child) {
	margin-top: .5em;
}
.overlay ol {
	list-style-position: inside;
}
.overlay p {
	margin-top: .5em;
}
.overlay .link {
	text-decoration: underline;
}
.prevent-bots::before {
	content: attr(data-second) " " attr(data-first);
	unicode-bidi: bidi-override;
	direction: rtl;
}
