/* Styling applied to all elements */
* { 
  box-sizing: border-box; 
} 

strong {
	font-size: 115%; 
}

/* CSS variables - compatibility issues, not used */
:root { 
	--animation-timing: 0.3s; 
}

/* Input box style */
input[type=text] { 
     width: 80px; /* When specifying this, you can use both px and % */
	 margin: 1px 3px; /* Margins outside the box, top-bottom and lef-right */
	 padding: 4px 6px; /* Paddings inside the box, top-bottom and lef-right */ 
	 border: 1px solid #ccc;
	 border-radius: 4px; /* rounded corners */ 
	 -webkit-transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for Safari and Chrome */
	 -moz-transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for FireFox */ 
	 /* -o-transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for Opera (looks like there are some problems) */
	 transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for other browsers (IE and Edge) */
} 

input[type=number] { 
	-webkit-appearance: none;  /* Override default CSS styles */
    appearance: none;
     width: 80px; /* When specifying this, you can use both px and % */
	 margin: 1px 3px; /* Margins outside the box, top-bottom and lef-right */
	 padding: 4px 6px; /* Paddings inside the box, top-bottom and lef-right */ 
	 border: 1px solid #ccc;
	 border-radius: 4px; /* rounded corners */ 
	 -webkit-transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for Safari and Chrome */
	 -moz-transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for FireFox */ 
	 /* -o-transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for Opera (looks like there are some problems) */
	 transition: border 0.3s ease-in-out, width 0.3s ease-in-out; /* Animation for other browsers (IE and Edge) */
} 

/* Effects when the input box is focused */
input[type=text]:focus {  
      border: 3px solid #ccc; /* Border width, style, color */
	  width: 120px; 
}

input[type=number]:focus {  
      border: 3px solid #ccc; /* Border width, style, color */
	  width: 120px; 
}

/* Paragraph styling */
p {  
	margin: 8px 5px; 
	padding-left: 4px; 
	padding-top: 5px; 
	padding-bottom: 5px; 
	line-height: ;
	border: 2px solid #aaa; 
	border-radius: 4px; 
	background-color:#aaa; 
	box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
} 

/* Styling for top and bottom paragraphs */
p#ptop {margin-top: 2px;} 
p#pbottom {margin-bottom: 3px;} 

/* Select/drop-down menu styling */
select {
    width: ;
    padding: 4px 5px; 
	margin: 2px; 
    border: 1px;
    border-radius: 5px;
    color: white; /* Font color */
    background-color: #4CAF50;  
}

/* Button styling */
input[type=button], input[type=reset], input[type=submit] {
    background-color: #9933cc;
    border: none; 
	border-radius: 4px; 
    color: white;
    padding: 6px 6px;
    text-decoration: none;
    margin: 0px 5px;
    cursor: pointer;  
}

/* Checkbox styling */
input[type=checkbox]
{
  /* Double-sized Checkboxes */
  -ms-transform: scale(1.2); /* IE */
  -moz-transform: scale(1.2); /* FF */
  -webkit-transform: scale(1.2); /* Safari and Chrome */
  -o-transform: scale(1.2); /* Opera */
  transform: scale(1.2);
}

/* Might want to wrap a span around your checkbox text */
.checkboxtext
{
  /* Checkbox text */
  font-size: 110%;
  display: inline;
}

.hidden {
	height: 1px; 
	overflow: hidden; 
	transition: height 0.3s ease-in-out; 
	display: none; 
}
.shown {
	height: auto; 
	overflow: visible; 
	
}

.plots { 
	width: 100%; 
	height: auto; 
}

.legend {
	background-color: #c7c7c7; 
}

.grid-item {
  background-color: white; 
  border-color: #F7F7F7; 
}

.header {
  background-color: #9933cc;
  color: #ffffff;
  padding: 1px 5px; 
  margin-bottom: 4px;
  text-align: center; 
  border-radius: 4px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.header h1 { margin: 0.55em 0 0.12em; }
.header p {
  margin: 0 0 0.65em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
}

.footer {
  background-color: #9933cc;
  color: #ffffff;
  padding: 10px; 
  margin-top: 3px;
  text-align: center;
  font-size: 12px;
  border-radius: 4px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* Clear floats after the columns */
.row::after {
  content: "";
  display: table;
  clear: both;
}

[class*="col-"] {
  float: left;
  padding: 4px;
}

/* For mobile phones: */
[class*="col-"] {
  width: 100%;
}

.wrapper {
  display: grid;
  grid-template-columns: 80% 20%; 
  grid-template-rows: minmax(450px, auto) minmax(450px, auto); 
  border: 2px solid #c7c7c7; 
  border-radius: 4px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

@media only screen and (max-width: 1080px) {
	.wrapper{
		display: grid;
		grid-template-columns: repeat(1, 1fr);
		grid-template-rows: minmax(450px, auto) minmax(100px, auto) minmax(450px, auto); 
		border: 2px solid #c7c7c7; 
		border-radius: 4px; 
		box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
	}
}

@media only screen and (min-width: 600px) {
  /* For tablets: */
  .col-s-1 {width: 8.33%;}
  .col-s-2 {width: 16.66%;}
  .col-s-3 {width: 25%;}
  .col-s-4 {width: 33.33%;}
  .col-s-5 {width: 41.66%;}
  .col-s-6 {width: 50%;}
  .col-s-7 {width: 58.33%;}
  .col-s-8 {width: 66.66%;}
  .col-s-9 {width: 75%;}
  .col-s-10 {width: 83.33%;}
  .col-s-11 {width: 91.66%;}
  .col-s-12 {width: 100%;}
}
@media only screen and (min-width: 768px) {
  /* For desktop: */
  .col-d-1 {width: 8.33%;}
  .col-d-2 {width: 16.66%;}
  .col-d-3 {width: 25%;}
  .col-d-4 {width: 33.33%;}
  .col-d-5 {width: 41.66%;}
  .col-d-6 {width: 50%;}
  .col-d-7 {width: 58.33%;}
  .col-d-8 {width: 66.66%;}
  .col-d-9 {width: 75%;}
  .col-d-10 {width: 83.33%;}
  .col-d-11 {width: 91.66%;}
  .col-d-12 {width: 100%;}
}
@media only screen and (min-width: 960px) {
  /* For HD desktop: */
  .col-h-1 {width: 8.33%;}
  .col-h-2 {width: 16.66%;}
  .col-h-3 {width: 25%;}
  .col-h-4 {width: 33.33%;}
  .col-h-5 {width: 41.66%;}
  .col-h-6 {width: 50%;}
  .col-h-7 {width: 58.33%;}
  .col-h-8 {width: 66.66%;}
  .col-h-9 {width: 75%;}
  .col-h-10 {width: 83.33%;}
  .col-h-11 {width: 91.66%;}
  .col-h-12 {width: 100%;}
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 186px;
  background-color: #33b5e5;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 3px;
  position: absolute;
  z-index: 1;
  top: 150%;
  left: 50%;
  margin-left: -20px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  
  /* Fade in tooltip - takes 1 second to go from 0% to 100% opac: */
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 30%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #33b5e5 transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
} 

.slidecontainer {
  width: 100%; /* Width of the outside container */
}

/* The slider itself */
.slider {
  -webkit-appearance: none;  /* Override default CSS styles */
  appearance: none;
  width: 90%; /* Full-width */
  height: 5px; /* Specified height */
  background: #d3d3d3; /* Grey background */
  outline: none; /* Remove outline */
  opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */
  -webkit-transition: opacity 0.3s ease-in-out; /* 0.2 seconds transition on hover */
  transition: opacity 0.3s ease-in-out;
}

/* Mouse-over effects */
.slider:hover {
  opacity: 1; /* Fully shown on mouse-over */
}

/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  width: 10px; /* Set a specific slider handle width */
  height: 20px; /* Slider handle height */
  background: #bc3dfc; /* Green background */
  cursor: pointer; /* Cursor on hover */
}

.slider::-moz-range-thumb {
  width: 10px; /* Set a specific slider handle width */
  height: 20px; /* Slider handle height */
  background: #bc3dfc; /* Green background */
  cursor: pointer; /* Cursor on hover */
}
/* Keep explanatory tooltips readable independently of the text-size slider. */
.parameter-label .tooltiptext {
  font-size: 16px;
}

/* Let the summary span both plots without stretching the upper plot row. */
@media only screen and (min-width: 1081px) {
  .wrapper {
    grid-template-rows: 450px minmax(450px, auto);
    background-color: #c7c7c7;
  }
  #myDiv { grid-column: 1; grid-row: 1; }
  #myDiv3 { grid-column: 1; grid-row: 2; }
  #myDiv2 {
    grid-column: 2;
    grid-row: 1 / 3;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  #myDiv4 { display: none; }
}

/* Expandable teaching notes below the plots. */
.simulation-help { margin: 22px 0 12px; padding: 18px 22px; background: #fff; color: #263238; border: 1px solid #d6dfe3; border-radius: 8px; font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.simulation-help summary { cursor: pointer; font-size: 20px; font-weight: bold; }
.simulation-help summary:focus-visible { outline: 2px solid #286b91; outline-offset: 4px; }
.simulation-help h3 { margin: 20px 0 8px; font-size: 18px; }
.simulation-help p {
  margin: 10px 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  line-height: 1.6;
}
.simulation-help li { margin: 8px 0; }

/* Course information and links retain the simulation's purple footer. */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 12px 18px; font-size: 14px; }
.footer p {
  margin: 0;
  padding: 0;
  line-height: 1.5;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.footer a { color: inherit; text-underline-offset: 3px; }
.footer a:focus-visible { outline: 2px solid white; outline-offset: 4px; }
@media (max-width: 480px) { .footer { justify-content: center; } }
