/*
CSS to support the Hutton Soil Carbon info page
David Donnelly
James Hutton Institute
May - July. 2026
*/

html,
body {
  text-align: center;
  font-family: "Dosis";
  margin: 1px;
  padding: 0px 0px;
  overscroll-behavior: contain;
}
h3{
  margin-top: 0px;
  	margin-bottom: 0px;
}
	h6 { font-size: 0.9rem; }

	.topRow {
	grid-column: 1 / span 4;
	grid-row: top;
	font-size: 1.8em;
	}
	.topRowPortrait {
	display: none;
	}	
	.topRowPortraitTablet {
	display: none;
	}	
	.topRight {
	grid-column: 5 / span 1;
	grid-row: top;
	margin: 5px;
	}
	.leftColumnGrid {
	grid-column: 1 / span 1;
	grid-row: mid;
	overflow: auto;
	padding-right: 8px;
	}
	.leftColumnGridExpand {
	grid-column: 1 / span 2;
	grid-row: mid;
	overflow: auto;
	padding-right: 8px;
	}
	.leftColumnGridNone {
		display: none;
	}	
	.mapViewGridFull {
	grid-column: 1 / span 5;
	grid-row: mid / span 2; /* hide the footer */
	}
	.mapViewGrid {
	grid-column: 2 / span 4;
	grid-row: mid;
	}
	.mapViewGridShrunk {
	grid-column: 3 / span 3;
	grid-row: mid;
	}
	.topRowPortrait {
	display: none;
	font-size: 1.5em;
	}
	
	.footerRow {
	grid-column: 1 / span 5;
	grid-row: foot;
	}
	
	.instructions1 {
	display: inline-block;
	}

	.instructions2 {
	display: none;
	}
	
	#instructionsOC {
	display: none;
	}
	
	.attributeList {
	display: block;
	}
	
    #mapViewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }

	#userSoilPanel {
		background-color: #e5e5e5;
		position:absolute; 
		left: 15vw;
		top: 50vh;
		max-height: 60vh;
		overflow:auto;
		margin: auto;
		color: #000000;
		padding: 5px;
		width: 22vw;
		min-width: 320px;
		z-index: 100;
	}
	#menuSoilPanel {
		background-color: #e5e5e5;
		position:absolute; 
		left: 15vw;
		top: 40vh;
		max-height: 60vh;
		overflow:auto;
		margin: auto;
		color: #000000;
		padding: 5px;
		width: 22vw;
		min-width: 320px;
		z-index: 999;
	}
	#userSoilPanelTitleStrip {
		cursor: move;
		background-color: #0066ff;
		max-height: 10vh;
		width: 21vw;
		float: right;
		overflow:auto;
		padding-left: 2px;
		padding-right: 2px;
		color: #000000;
		min-width: 300px;
	}		
	.menuSoilPanelTitleStrip {
		width: 100%;
		background-color: #0066ff;
	}
	#menuSoilPanelTitleStrip {
		cursor: move;
		background-color: #0066ff;
		max-height: 10vh;
		width: 10vw;
		float: right;
		overflow:visible;
		padding-left: 2px;
		padding-right: 2px;
		color: #000000;
		min-width: 150px;
	}	
	.graphPanel {
		position:absolute; 
		background-color: white;
		float: center;
		overflow:auto;
		padding-left: 2px;
		padding-right: 2px;
		color: #000000;
		z-index: 200;
		width: 350px;
	}	
	.graphPanelTitleStrip {
		cursor: move;
		background-color: #0066ff;
		max-height: 10vh;
		float: center;
		overflow:auto;
		padding-left: 2px;
		padding-right: 2px;
		color: #000000;
		-moz-user-select: -moz-none;
		-khtml-user-select: none;
		-webkit-user-select: none;

		/*
		 Introduced in IE 10.
		 See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/
		*/
		-ms-user-select: none;
		user-select: none;		
	}
	#seriesInfo {
		padding: 1px;
		background-color: #e5e5e5;
		max-height: 20%;
		overflow:auto;
		width: 40%;
		max-width: 40%;
		font-size: 1em;
		position:absolute; right:30px; bottom: 30px;
		color:#000000;
		z-index:50;
		visibility: hidden;
	}
	#coordinateInputDiv {
      background-color: white;
      padding: 2px;
    }
	
	#togglePointInfoDiv {
      background-color: white;
      padding: 2px;
	}

 /* Popup container */
.popupTitle {
  position: relative;
  display: inline-block;
  cursor: pointer;
  text-decoration: underline;
}

.popupTitle:hover {
	background-color: #aaa;
}

/* The actual popup (appears on top) */
.popupTitle .seriesPopuptext {
  visibility: hidden;
  width: 200px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 0;
  position: absolute;
  z-index: 999;
  bottom: 125%;
  left: 20%;
  margin-left: -100px;
}

/* Popup arrow */
.popupTitle .seriesPopuptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 40%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Toggle this class when clicking on the popup container (hide and show the popup) */
.popupTitle .show {
  visibility: visible;
  -webkit-animation: fadeIn 1s;
  animation: fadeIn 1s
}

/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity:1 ;}
} 

 /* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
} 

.menuButton {
	float: left;
	background-color: #74A235; /*Hutton Green */
	border: none;
	color: white;
	padding: 6px 12px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
}
.panelsButton {
	float: right;
	background-color: #74A235; /*Hutton Green */
	border: none;
	color: black;
	padding: 6px 12px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
}
.mapLegendButton {
	float: left;
	background-color: #74A235; /*Hutton Green */
	border: none;
	color: black;
	padding: 6px 12px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
}

#title-div {
	position:absolute; top: 50px;
	font-size: 2em;
	margin: auto;
	color:#000000;
	z-index:100;
	padding: 2px;
}

#mapViewDiv {
  /*position: absolute;*/
  padding: 0;
  margin: 0;
  right: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
#submitQuery {
	float: center;
	font-size: 1.2em;
	padding: 8px;
}
#chosenAttribute {
  padding: 0;
  margin: 0;
}

/* For the three way toggle */
.redButton.horizTranslate1 { -webkit-transition: -webkit-transform 0.1s linear; -webkit-transform: translateX(0px);}
.redButton.horizTranslate2 { -webkit-transition: -webkit-transform 0.1s linear; -webkit-transform: translateX(60px);}
.redButton.horizTranslate3 { -webkit-transition: -webkit-transform 0.1s linear; -webkit-transform: translateX(114px);}
#outerContainer{position:relative; width:222px; height:50px; background-color:#E5E5E5;}
#buttonContainer{background-color: #878787; width:140px; height:24px; position:relative; left:20px; top:25px; border-radius:14px;}
.redButton{width:15px; height:15px; background-color:#DB3D2B; border-radius:8px; position:relative; top:5px; left:5px;}
#legendTextContainer{left:12px; display:inline-block;position:absolute; top:8px; color:#222222;font-family:Arial; font-size:10pt;text-align:center;}
.legendText{display:inline-block;width:50px; padding-bottom:13px; cursor:default; user-select: none;}
#message{border:1px solid #cccccc; display:inline-block; padding:4px; margin-top: 6px; font-family:Arial; font-size:10pt;}

/*
.esri-popup.esri-widget {
max-height: 100%;
}
*/

.esri-view-width-xlarge .esri-popup__main-container {
width: auto;
}
.esri-popup .esri-popup__position-container {
  z-index: 3;
}‍‍‍

.esri-widget__table tr th {
width: 45%;
padding-bottom: 4px;
padding-top: 4px;
}
.esri-expand__container.esri-expand__container--expanded {
	/* margin: 5vh;*/
	/*padding-top: 5vh;*/
	max-height: 40vh;
	/*display: none;*/
}

.esri-legend__layer-caption {
padding-bottom: 2px;
padding-top: 1px;
}

.esri-legend__service {
padding-left: 8px;
padding-right: 8px;
padding-bottom: 2px;
padding-top: 1px;
}

.esri-ui-corner .esri-component.esri-widget--panel{
width: 250px;
}
		

/*Test for adding text to the graph*/
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;

  /* Position the tooltip */
  position: absolute;
  z-index: 1;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

.esri-view .esri-view-surface--inset-outline:focus::after {
 content:"";
 box-sizing:border-box;
 position:absolute;
 z-index:990;
 top:0;
 left:0;
 height:100%;
 width:100%;
 outline: none;
 pointer-events:none;
 overflow:hidden;
}

/* width="200" height="63"  */
.soilSurvImgClass {
	width: 200px;
	height: auto;
	float: right;
}

.jhiImgClass {
	width: 150px;
	height: auto;
	float: left;
}

.jhiLegendClass {width:410px; height: auto; }

img {
  max-width: 100%;
}

/* this is for anything more than 1079px */    
  .title { display:initial; }
  .titleMobile { display:none; }

@media (max-width: 992px) {
.leftColumnGrid {
	display: none;
	padding-right: 8px;
	grid-column: 1 / span 0;
	}
.mapViewGrid {
	grid-column: 1 / span 5;
	grid-row: mid;
	}		
}
@media (min-width: 992px)
#instructionsOC {
  display: none;
}

/* less than 1079px */
@media screen and (max-width: 1079px){
.title { display:none; }
.titleMobile { display:initial; }
}

/* Works to differentiate between portrait and landscape on iPad */
/* phone in landscape */
@media (min-aspect-ratio: 2.5) {
  .topRow {
    display: none;
  }
  .topRowPortrait {
	display: inline-block;
	font-size: 1.5em;
	grid-column: 1 / span 4;
	grid-row: top;
	font-size: 1.5em;
  }
}

/*  */

@media only screen and (orientation: landscape) and (min-aspect-ratio: 1.6) and (max-height: 700px){
	.topRow {
    background: white;
	font-size: 1.3em;
  }
  .topRowPortrait {
    background: #9af; /* blue */
	font-size: 1.1em;
  }
}

@media only screen and (orientation: landscape) and (max-aspect-ratio: 1.6) {
	.topRow {
    /*background: red;*/
  }
  .topRowPortrait {
    background: white;
	font-size: 1.2em;
  }
}

@media only screen and (orientation: portrait) and (min-aspect-ratio: 0.6) {
	.topRow {
    /*background: red;*/
	display: none;
  }
  .topRowPortrait {
    background: #9af; /* blue - iPad */
	display: none;
  }
  .topRowPortraitTablet {
    background: #9af; /* blue - iPad */
	display: inline-block;
	font-size: 1.5em;
	grid-column: 1 / span 4;
	grid-row: top;
	font-size: 1.4em;
	overflow: scroll;
  }  
}

@media only screen and (orientation: portrait) and (max-aspect-ratio: 0.6) {
	.topRow {
    /*background: red;*/
  }
  .topRowPortrait {
    background: red; /* iPhone */
  }
}

@media only screen and (orientation: portrait) {
/*Mobile overwrites*/
	.title { display:none; }
	.titleMobile { display:initial;
	}

	.topRowPortrait {
	display: inline-block;
	grid-column: 1 / span 4;
	grid-row: top;
	font-size: 1.2em;
	}
	
	.topRow {
		display: none;
	}
	
	.topRight {
		font-size: 0.8em;
	}

	.instructions1 {
	display: inline-block;
	font-size: 0.8em;
	}

	.instructions2 {
	display: none;
	font-size: 0.8em;
	}
}

@media only screen and (max-width: 1079px) {
	   /* h1 { font-size: 15px !important; }
	   h2 { font-size: 12px !important; }
	   h3 { font-size: 11px !important; } */
	   .cxcImgClass {width:100px; height: auto; max-width: 30%;}
	   .jhiImgClass {width:90px; height: auto; max-width: 25%;}
	   .jhiLegendClass {width:450px; height: auto; max-width: 100%;
		padding-left: 2px;
		padding-right: 2px;
		padding-bottom: 2px;
		padding-top: 2px;}
	   .funding-info{font-size: 12px;}
	   .hosting-info {font-size: 10px;}
	   .menuButton { font-size: 10px !important; }
	   .mapLegendButton { font-size: 10px !important; }
	   .panelsButton { font-size: 10px !important; }
	   .sidePanel {font-size: 12px;}
		.sidePanel a {font-size: 13px;width:450px; height: auto; max-width: 90%;
		padding-left: 8px;
		padding-right: 8px;
		padding-bottom: 8px;
		padding-top: 1px;}
	   .esri-fullscreen {
		   /* display: none; */
	   }
	   .esri-search {/* display: none; */}
	   .esri-expand {/* display: none; */}
		#userSoilomDiv {right: 5px; width: 40%;}
		#plotly-horizontal-div {left: 5px; height: 50%; width: 65%; font-size: 10px;}
		.esri-widget {font-size: 10px;}
		#seriesInfo {right: 5px; width:30%;}
	 }
	 
  .esri-widget {
	line-height: 1.1em;
	margin: 1px;
	font-size: 12px;
	}
	.esri-feature__field-header {
		width: 45%;
	}
	.esri-feature__field-data {
		width: 70%;
	}
	
	.esri-widget *, .esri-widget *:before, .esri-widget *:after {
	margin: 0px;
	}
	