body
{
	font-size: 62.5%; 
}

a.headerlink:link { color: purple; }
a.headerlink:visited { color: purple; }
a.headerlink:hover { color: purple; }
a.headerlink:active { color: purple; }

#login, #settings, #weight {
	float: right;
	margin-right: 20px;
	text-decoration: none;
	font-family: tahoma;
	font-size: 14px;
	padding-top: 10px;		
}

#otsikko {
	font-size:28px;
	font-weight: bold;
	font-family: tahoma;
	color: purple;
}

#header {
	border-bottom: 1px solid #aaa;
	background-color: #F0F0F0;
	display: inline-block;
	width: 100%;
	margin-top: -8px;
	margin-left: -8px;
	margin-bottom: 10px;
	padding-bottom: 10px;
	padding-left: 16px;
	font-size: 16px;
}

#loginDialog form {
	margin: auto;
	width: 160px;	
}

.logoutHide {
	display: none;
}

*:focus {
    outline: 0;
}

#addNewPanel {
	float: right;
}

button, input
{
	-webkit-border-radius:0;
}

input[type=submit] {
    -webkit-border-radius:0px;
}

.sortBtn
{
	height: 14px;
	width: 16px;
	border: 2px solid whitesmoke;
	border-radius: 3px;
	background-color: whitesmoke;
	background-image: url("ui-icons_888888_256x240.png");
	transform: translate(0,-1px);
	-moz-transform: translate(0,-4px);
	-ms-transform: translate(0,2px);
	padding-right: 1px;
}

.sortBtnUp
{
	background-position: -2px -3px;
}

.sortBtnDown
{
	margin-left: -3px;
	background-position: -67px -3px;
}

#searchResultOverviewWrapper {
	height: auto;
	min-height: 100%;
	background: whitesmoke; 
	box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

#searchResultOverviewTitle {
	background: #eee;
	font-family: Arial,Lucida Grande,Lucida Sans,sans-serif;
	font-size: 20px;
	color: #555;
	text-shadow: 2px 2px 6px gray;
	padding: 5px;
	box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);	
}
	
.overviewInfoBox {
	display: inline-block;
	background: #607d8b;
	font-family: arial;
	font-size: 20px;
	color: whitesmoke;
	padding: 5px;
	margin: 15px 0 15px 5px;
	border: 2px solid #333;
	border-radius: 3px;
	box-shadow: 3px 3px 3px #ccc;
}

#sportCounts
{
	font-family: Arial,Lucida Grande,Lucida Sans,sans-serif;
	font-size: 14px;
	padding-bottom: 5px;
	margin: 0 5px 0 5px;
}

#sportCounts div:nth-child(odd) {
    background: #ddd;
}

#sportCounts div:nth-child(even) {
    background: whitesmoke;
}

.sportTotalRowSport {
	display: inline-block;
	min-width: 100px;
	padding: 3px 0 3px 0;
}

#searchContent select
{
	background-color: #eee;
	border: 1px solid gray;
	padding-left: 3px;
	width: 190px;
}

.searchCheckbox
{
	font-family: Arial,Lucida Grande,Lucida Sans,sans-serif;
	font-size: 14px;
	width: 100px;
}

#searchContent input[type="text"]
{
	background-color: #eee;
	border: 1px solid gray;
	padding-left: 3px;
	width: 150px;
}

#harjoitusData
{
	display: none;
}

#dataArea
{
	position: absolute;
	top: 8px;
	/*left: 420px;*/
	left: 10px;
}

#lapArea
{
	position: absolute;
	top: 310px;
	/*left: 420px;*/
	left: 10px;
}

#dataChart
{
	position: absolute;
	top: 503px;
	/*left: 420px;*/
	left: 10px;
	z-index: 0;
}

#dataChartArea
{
	position: absolute;
	top: 573px;
	left: 70px;
	z-index: 1;
}

#dataChartPointer
{
	position: absolute;
	top: 573px;
	left: 70px;
	z-index: 2;
}

#dataChartText
{
	position: absolute;
	top: 545px;
	left: 70px;
	z-index: 4;
}

.dataValue
{
	font-family: Arial,Lucida Grande,Lucida Sans,sans-serif;
	font-size: 14px;
	border: 1px solid gray;
	width: 150px;
	padding: 2px;
	background-color: #eee;
}

#kommentti
{
	font-family: Arial,Lucida Grande,Lucida Sans,sans-serif;
	font-size: 14px;
	border: 1px solid gray;
	padding: 2px;
	background-color: #eee;
	width: 560px;
	min-height: 95px;
	max-height: 95px;
	overflow: auto;
	white-space: pre-wrap;
	word-wrap: break-word;
	box-sizing: border-box;
}

.titleDataValue
{
	font-family: Arial,Lucida Grande,Lucida Sans,sans-serif;
	font-size: 14px;
	font-weight: bold;
	width: 150px;
	padding: 2px;
}

#searchItemArea
{
    width: 370px;
    overflow: auto;
    height: 272px;
	overflow-y: auto;
	margin-top: 15px;
}

.searchItem
{
	background: lightgray;
	margin-bottom: 6px;
	padding: 2.5px;
	border:1px solid silver;
	border-radius:2px;

	font-family: Lucida Grande,Lucida Sans,Arial,sans-serif;
	font-size: 0.8em;
    text-decoration: none;
	/*font-weight: bold;*/
}

.searchItem:hover
{
	background: #bbb;
}

td
{
	text-align: center;
	padding: 2px;
}

#lapWrapper
{
	position: absolute;
	top: 345px;
	/*left: 425px;*/
	left: 15px;
	overflow-y: auto;
	height: 145px;
	width: 580px;
}

table
{
	border-spacing: 0px;	
	font-family: Tahoma;
	font-size: 14px;
}

table th 
{
	text-align: left;
	font-family: Tahoma;
	font-size: 14px;
	padding-bottom: 10px;
	color: gray;
}

tr:nth-child(even) {
    background: #eee;
}

.lapTimeCol
{
	width: 100px;
}

#pleasewait
{
        position: absolute;
        top: 15px;
		left: 45%;
        font-family: Lucida Grande,Lucida Sans,Arial,sans-serif;
        font-size: 22px;
        font-weight: bold;
        color: red;
}

#laji
{
	 position: absolute; 
	 top: 15px; 
	 left: 0px; 
	 width: 500px;
	 color: gray;
}

#lapViewBtn
{
	position: absolute; 
	top: 315px; 
	/*left: 990px;*/
	left: 580px;
	width: 16px;
	height: 16px;
	padding: 0;
	background: url("ui-icons_888888_256x240.png") -33px -81px;
	/*background-position: -32px -80px;*/
	border: 1px solid gray;
	-webkit-appearance:none;
}

#slider-range
{
	position: absolute;
	left: 20px;
	top: 560px;
	height:215px;
	width: 5px;
	z-index: 3;
}

.ui-slider .ui-slider-handle {
	position: absolute;
	left: -3px;
	z-index: 2;
	width: 0.8em;
	height: 0.6em;
	cursor: default;
	-ms-touch-action: none;
	touch-action: none;
}

#addNewMenu {
	width: 200px;
	border: 1px solid #aaa;
	background: none;
	padding: 4px;
}

#addNewBtn {
	font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
	font-size: 14px;
	float: right;
	vertical-align: middle;
	border: 1px solid #aaa;
	background: none;
	padding-top: 4px;
	padding-left: 6px;
	margin-left: -1px;
	box-sizing: border-box;
	height: 27px;
	width: 40px;
	cursor: pointer;
}

#addNewBtn:hover {
	background: whitesmoke;
	color: dimgray;
}

#tags {
	font-family: arial; 
	font-size: 14px;
	position: absolute; 
	top: 275px; 
	left: 30px;
}

#equipment {
	font-family: arial; 
	font-size: 14px;
	position: absolute; 
	top: 255px; 
	left: 30px;	
}

.itemRow, .rowHeader {
	display:inline-block;
	font-family: Tahoma;
	padding-top: 1px;
	padding-bottom: 1px;
	font-size: 14px;
}

.rowHeader {
	border-bottom: 1px solid black;
	padding-bottom: 4px;
	font-size: 12px !important;
	font-weight: bold;
	cursor: pointer;
}

.itemRow span {
	padding-top: 5px;
}

.itemRow input[type=button] {
	margin-top: 5px;
	margin-right: 3px;
}

.itemRow:nth-child(even) {
    background: #eee;
}

.rowHarjDate {
	float: left;
	text-align: left;
	width: 120px;
	white-space: nowrap;
	padding-left: 5px;
}

.rowHarjTime {
	float: left;
	text-align: center;
	width: 80px;
}

.rowHarjSport {
	float: left;
	text-align: left;
	width: 130px;
}

.rowHarjDur {
	float: left;
	text-align: center;
	width: 80px;
}

.rowHarjDist {
	float: left;
	text-align: right;
	width: 80px;
}

.rowHarjSpeed {
	float: left;
	text-align: center;
	width: 120px;
	cursor: pointer;
}

.rowHarjAvgHR {
	float: left;
	text-align: center;
	width: 50px;
}

.rowHarjMaxHR {
	float: left;
	text-align: center;
	width: 50px;
}

.rowHarjCal {
	float: left;
	text-align: center;
	width: 80px;
}

.rowHarjPaino {
	float: left;
	text-align: center;
	width: 80px;
}
	
.weekSep {
	font-family: arial;
	font-size: 12px;
	margin-bottom: 0px;
	margin-top: 20px;
}

.weekSep hr {
	color: red;
	padding: 0;
	margin-bottom: 5px;
	margin-top: 0;
}
@media (min-width: 769px) {
	#searchPanel, #advSearchPanel {
		background: #607d8b;
		box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
		padding-top: 8px;
		padding-bottom: 5px;
		min-width: 750px;
	}

	#advSearchPanel {
		display: none;
		overflow: auto;
		height: auto;
		min-height: 100% !important;
	}
			
	.searchButton
	{
		font-size: 16px;
		float:right;
		margin-right: 5px;
		background: white;
		border: 1px solid gray;
		border-radius: 8px;
		width: 80px;
	}
	
	.txtLaji {
		margin-left: 10px;
		border: 1px solid gray;
		border-radius: 8px;
		font-size: 16px;
	}

	.monthRepBtn {
		display: none;
		font-size: 16px;
		margin-left: 10px;
		border: 1px solid gray;
		border-radius: 8px;
		background: white;
	}

	.dateText
	{
		font-size: 16px;
		padding-left: 3px;
		margin-left: 10px;
		border: 1px solid gray;
		width: 95px;
		border-radius: 8px;
	}

	.cleanTxt {
		margin-left: -2px;
		padding-left: 0;
		border: 0;
		background: #607d8b;
		font-family: arial;
		font-size: 12px;
		font-weight: bold;
		color: white;
		transform: translate(0,-5px);
		-ms-transform: translate(0,-4px);
	}

	.cleanTxt:hover {
		color: lightgray;
	}
		
	.dateBtn
	{
		display: inline;
	}
	
	.dateBtn span {
		display: inline-block;
		margin: 0px;
		text-align: center;
		color: black !important;
		background: white;
		height: 20px !important;
		margin-left: 0px !important;
		margin-right: 0px !important;
	}

	.dateBtn input[type=button]
	{
		border: 1px solid gray;
		font-family: arial;
		font-size: 16px;
		background: white;
		color: black;
		-webkit-appearance:none;
	}

	.dateBtn input[type=button]:hover
	{
		background: lightgray;
	}

	.dateBtn input[type=button]::-moz-focus-inner
	{ 
		border: 0;
		padding: 0;
	}

	.trBtn
	{
		font-size: 20px;
		width: 65px;
		padding-left: 0px;
		padding-right: 0px;
	}
	.prevBtn {
		width: 20px;
		border-top-left-radius: 8px;
		border-bottom-left-radius: 8px;
	}
	.nextBtn
	{
		width: 20px;
		border-top-right-radius: 8px;
		border-bottom-right-radius: 8px;
	}
	
	.searchDist, .searchDur, .searchComm, .searchEq {
		width: 320px;
		margin-top: 15px;
	}
	
	.searchEq {
		width: 400px;
	
	}

	.searchDist button, .searchDur button, .searchComm button {
		float: right;
	}

	.searchDist input, .searchDur input, .searchComm input, .searchEq select {
		font-size: 16px;
		float: right;
		margin-right: 3px;
		border-radius: 8px;
		border: 1px solid gray;
		padding-left: 5px;
	}
	

	#searchResultOverviewWrapper {
		width: 450px; 
	}

	#searchResult {
		max-width: 1200px;
	}

	.itemRow {
		min-width: 935px;
	}
	
	.itemRow span {
		display: table-cell;
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	/* Mobiili on katselunäkymä — piilotetaan muokkaustoiminnot */
	#addNewPanel,
	#settings,
	#weight {
		display: none !important;
	}

	.rowEditBtn,
	.rowDelBtn {
		display: none !important;
	}

	/* Hakupaneeli pystyksi mobiilissa */
	#searchPanel {
		min-width: 100% !important;
		padding: 10px;
		box-sizing: border-box;
		background: #607d8b;
		box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
	}
	
	#searchPanel input[type="text"], #searchPanel select {
		background: #eee;
		border: 1px solid gray;
		border-radius: 8px;
		padding-left: 5px;
	}
	
	#searchPanel section > div {
		float: none !important;
		width: 100%;
		margin-bottom: 10px;
	}
	
	.searchButton {
		width: 100%;
		font-size: 16px;
		min-height: 44px;
	}
	
	.txtLaji {
		width: 100% !important;
		font-size: 16px;
		min-height: 44px;
		margin-left: 0 !important;
		box-sizing: border-box;
	}
	
	.monthRepBtn {
		font-size: 16px;
	}
	
	.dateText {
		width: calc(100% - 40px) !important;
		font-size: 16px;
		min-height: 44px;
		box-sizing: border-box;
	}
	
	.cleanTxt {
		width: 36px !important;
		min-height: 44px;
		font-size: 16px !important;
	}
	
	/* Päivänappulat flex-riviksi */
	.dateBtn {
		display: flex;
		width: 100%;
		margin-bottom: 5px;
	}
	
	.dateBtn input[type=button] {
		flex: 1;
		min-height: 44px;
	}
	
	.prevBtn, .nextBtn {
		flex: 0 0 44px !important;
		width: 44px !important;
	}
	
	.trBtn {
		flex: 1;
		width: auto !important;
	}
	
	/* Advanced Search -paneeli */
	#advSearchPanel {
		display: none;
		min-width: 100% !important;
	}
	
	#advSearchPanel > div {
		width: 100%;
		margin-bottom: 10px;
	}
	
	.searchDist input, .searchDur input, .searchComm input {
		width: calc(100% - 40px) !important;
		font-size: 16px;
		min-height: 44px;
		box-sizing: border-box;
	}
	
	.searchEq select {
		width: 100% !important;
		font-size: 16px;
		min-height: 44px;
	}
	
	/* Datepicker skaalautuu */
	div.ui-datepicker {
		font-size: 16px;
	}
	
	/* Hakutulokset — flexbox mobiilissa */
	#searchResult {
		max-width: 100%;
	}
	
	.itemRow, .rowHeader {
		display: flex !important;
		width: 100% !important;
		align-items: center;
	}
	
	.itemRow span {
		font-size: 14px;
	}
	
	.rowHeader {
		font-size: 12px !important;
	}
	
	/* Piilotetaan toissijaiset sarakkeet mobiilissa */
	.rowHarjTime, .rowHarjSpeed, .rowHarjAvgHR, .rowHarjMaxHR, .rowHarjCal {
		display: none !important;
	}
	
	.rowHarjDate {
		width: 28%;
	}
	
	.rowHarjSport {
		width: 22%;
	}
	
	.rowHarjDur {
		width: 18%;
	}
	
	.rowHarjDist {
		width: 18%;
	}
	
	/* More-nappi oikealle samalle riville */
	.rowShowBtn {
		margin-left: auto;
		font-size: 14px !important;
		padding: 2px 8px !important;
	}
	
	/* Yhteenveto */
	#sportCounts {
		font-size: 16px;
	}
	
	.overviewInfoBox {
		font-size: 16px;
	}
	
	#searchResultOverviewWrapper {
		width: 100% !important;
	}
	
	/* harjdata.php — harjoituksen yksityiskohdat mobiilissa */
	#harjoitusData canvas {
		max-width: calc(100vw - 20px) !important;
		height: auto !important;
	}
	
	#kommentti {
		width: calc(100vw - 100px) !important;
	}
	
	#laji {
		width: calc(100vw - 30px) !important;
	}
	
	#lapWrapper {
		width: calc(100vw - 30px) !important;
	}
	
	#lapViewBtn {
		left: calc(100vw - 40px) !important;
	}
	
	.dataValue, .titleDataValue {
		width: calc(100vw - 60px) !important;
	}
}

#searchPanel  span, #advSearchPanel  span {
	font-family: arial;
	font-size: 16px;
	color: white;
	margin-left: 5px;
	height:30px;
	margin-right: 5px;
}

#advSearchBtn
{
font-size: 16px;
float:right;
margin-top: 7px;
margin-right: 5px;
cursor: pointer;
}

#advSearchBtn:hover {
	color: lightgray;
}

.searchTagBtn {
	margin-top: 2px;
	margin-left: 2px;
	background: white;
	border: 1px solid gray;
	border-radius: 2px;
}

.searchButton:hover , .monthRepBtn:hover {
	background: lightgray;
}
