*
{
	padding: 0;
	margin: 0;
	border: 0;
	box-sizing: border-box;
	font-size: min(18px,max(13px, min(2vh,1.5vw)));
	font-family: "PT Sans", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
	text-rendering: optimizeLegibility;
	transition: fill 1s;
	transition: height 1s;
	transition: color 1s;
	transition: background-color 1s;
}
input:focus,
select:focus,
textarea:focus,
button:focus 
{
	outline: none;
}
body
{
	background-color: var(--menuTextColor);
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
	min-height: 100vh;
	overflow-x: hidden;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-content: stretch;
}
header,
footer
{
	flex: 0 0 auto;
	width: 100%;
	color: var(--menuTextColor);
	background-color: var(--menuBackgroundColor);
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	justify-content: space-between;
}
header
{
	bottom: 0;
	font-size: 1.5rem;
}
nav
{
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	justify-content: space-between;
}
nav div, button
{
	padding: 0.5em;
	border-radius: 0.3em;
	font-size: 1em;
}
nav > a > div:hover
{
	color: white;
	text-decoration: underline;
}
nav a
{
	text-decoration: none;
	color: var(--menuTextColor);
}
button
{
	cursor: pointer;
	color: var(--menuTextColor);
	background-color: var(--menuBackgroundColor);
}
button:hover
{
	color: var(--menuBackgroundColor);
	background-color: var(--menuTextColor);
}

/*
	Tiles Section
*/

div#hikeTilesContainer
{
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	align-content: flex-start;
	justify-content: center;
	width: 100%;
}
div.hikeTile
{
	position: relative;
	display: block;
	flex: 1 1 25rem;
	max-width: var(--thresholdNarrow);
	margin: 1em;
}
div.hikeTile > a
{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
}
div.hikeTile > div
{
	position: absolute;
	color: var(--mainTextColor);
	background-color: var(--mainBackgroundColor);
	opacity: 0.7;
	border-radius: 0.5em;
}
div.hikeTile img
{
	width: 100%;
	height: auto;
	border-radius: 0.5em;
	border: 0;
}
div.hikeTileTitle
{
	max-width: 100%;
	font-size: 1.8em;
	top: 0;
	left: 0;
	margin: 0.5em;
	padding: 0.5em;
}
div.seasonWarning
{
	width: 80%;
	font-size: 2em;
	left: 50%;
	top: 50%;
	transform: translate(-50%,-50%);
	opacity: 1;
	text-align: center;
}
div.hikeTileToolbar
{
	bottom: 0;
	width: 100%;
	font-size: 1.5em;
	padding: 0em 0.5em;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	align-content: flex-start;
	justify-content: space-between;
}
div.hikeTileAbstract
{
	visibility: hidden;
	top: 30%;
	left: 0;
	margin: 1em;
}
div.hikeTile:hover div
{
	visibility: visible;
	opacity: 1;
}
footer
{
	bottom: 0;
	font-size: 1rem;
}
footer svg
{
	height: 1em;
}
footer div
{
	display: flex;
	flex-flow: row nowrap;
	align-content: flex-end;
	margin: 0.5em 1em;
	font-size: 1em;
}
@media screen and (max-width: var(--thresholdNarrow)) 
{
	div.hikeTile
	{
		max-width: 100%;
		min-width: 100%;
		width: 100%;
		margin: 0;
	}
}

/*************************************************
*************	Hike Search Form   ///////////////
*/////////////////////////////////////////////////

div#hikeSearchContainer
{
	display: flex;
	flex-flow: column;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: center;
	align-content: center;
	position: relative;
	font-size: 2rem;
	width: 30em;
	max-width: 100%;
}
div#hikeSearchContainer input
{
	display: block;
	position: relative;
	font-size: 1em;
	width: 100%;
	padding: 0.5em 1em;	
}
div#hikeOptions
{
	display: none;
	flex-direction: row;
	flex-wrap: wrap;
	position: absolute;
	z-index: 100;
	overflow-y: auto;
	overflow-x: hidden;
	background-color: rgba(255,255,255,0.75);
	max-height: 70vh;
}
div#hikeOptions a
{
	display: block;
	text-align: left;
	font-size: 1.5em;
	padding: 0.5em 1em;
	margin: 0.3em;
	border-radius: 0.3em;
	text-decoration: none;
	color: var(--menuTextColor);
	background-color: var(--menuBackgroundColor);
}
div#hikeOptions a:hover
{
	background-color: var(--menuTextColor);
	color: var(--menuBackgroundColor);
}


/*********************************************************************/
/*******  TextBlock section  ***************************************/
/*****************************************************************/
.tbContainer
{
	position: relative;
	margin: 0.5em 0;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.2em;
}
.tbCheckBox
{
	display: none;
}
.tbTitle
{
	display: block;
	width: 100%;
}
.tbTitle:hover
{
	background-color: var(--menuBackgroundColor);
	color: var(--menuTextColor);
}
.tbCheckBox + .tbContainer
{
	display:none;
}
.tbCheckBox:checked + .tbContainer
{
	display: flex;
}
.tbContainer > div
{
	flex-basis: 49%;
}
.tbPic
{
	display: flex;
	flex-direction: column;
	align-items: center;
}
.tbText
{
	font-size: 1em;
	order: 1;
}
p.tbCaption
{
	font-size: 0.7em;
	font-family: "PT Sans Caption", sans-serif;
	text-align: center;
	padding: 0.1em 0.5em 0.5em 0.5em;
}
p.tbCaption:empty
{
	display: none;
}
.tbPic img
{
	border-radius: 0.5em;
	max-width: 100%;
	height: auto;
}
.tbPicText .tbPic  { order: 0; }
.tbTextPic .tbPic  { order: 2; }

.tbPicPic	.tbText,
.tbPicMax   .tbText,
.tbPicOnly  .tbText,
.tbPicShow  .tbText,
.tbTextOnly .tbPic  { display: none; }

.tbPicOnly .tbPic,
.tbPicShow .tbPic
{
	flex-basis: 100%;
}

.tbPicMax .tbPic  
{ 
	flex-basis: 100%; 
	padding: 0;
}

.tbPicMax img { border-radius: 0; }

.tbPicMax 
{ 
	max-width: 100%; 
	margin: 0;
}

.tbTextOnly .tbText
{
	flex-basis: 100%;
	column-width: 25em;
	column-gap: 1em;
	orphans: 2;
	widows: 2;
}
.tbText p
{
	font-size: 1.2em;
	margin-bottom: 0.3em;
}

.tbPicShow
{
	display: grid;
    grid-template-columns: 1fr;
}

.tbPicShow .tbPic
{
	grid-row-start: 1;
	grid-column-start: 1;
	align-self: center;
	visibility: hidden;
}
.tbPicShow .tbPic.visible
{
	visibility: visible;
}

.tbOverlay
{
	position: absolute;
	z-index: 100;
	color: white;
	opacity: 0;
	font-size: 10em;
}
.tbOverlay:hover
{
	opacity: 0.7;
	cursor: pointer;
}

.tbArrowLeft,
.tbArrowRight
{
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	align-content: center;
	justify-content: center;
	height: 100%;
}
.tbArrowLeft
{
	left: 0;
	background-image: linear-gradient(to left, rgba(0,0,0,0.0), rgba(0,0,0,0.7));
}
.tbArrowRight
{
	right: 0;
	background-image: linear-gradient(to right, rgba(0,0,0,0.0), rgba(0,0,0,0.7));
}

@media screen and (max-width: 30rem) 
{
	.tbContainer
	{
		margin: 0.5rem 0rem;
	}
	.tbContainer > div
	{
		flex-basis: 100%;
	}
	.tbPicOnly img
	{
		width: 100%;
		border-radius: 0;
	}
}

/*******************************************************************/

div.editButton
{
	position: absolute;
	font-size: 1em;
	right: 0.5em;
	top: 0.5em;
	z-index: 100;
}
div.editButton input
{
	font-size: 1.3em;
	border-radius: 0.3em;
	padding: 0 0.5em;
	color: var(--menuBackgroundColor);
	background-color: var(--menuTextColor);
}
div.editButton input:hover
{
	color: var(--menuTextColor);
	background-color: var(--menuBackgroundColor);
}