/*
CSS stylesheet for the watershed report
Matthew Heberger, October 2024
*/

.active {
    color: blue;
    text-decoration: underline;
    font-weight: normal;
    cursor: pointer;
}

.inactive {
    color: black;
    text-decoration: none;
    font-weight: bold;
    cursor: auto;
}

.inactive:hover {
    text-decoration: none;
}

/* Instructions for how to zoom/pan on the charts */
.instructions {
	font-family: Helvetica, Arial, sans-serif;
	font-size: 80%;
}

.instruction-icon {
	padding: 0 0 0 2em;
	font-size: 120%;
}

hr {
    max-width: 800px;
    margin-left: 0;
}

#map, #map2{
    width:800px;
    height:500px;
    border: 1px solid #999;
 }

/* Hide controls by default */
.leaflet-left {
    visibility:hidden;
}

/* Show controls on map hover */
#map:hover .leaflet-left {
    visibility:visible; 
}
        
.message-box {
    position: relative;
    border: 2px solid #007BFF; /* Blue border */
    background-color: #f9f9f9; /* Light background */
    padding: 0px 20px;
    margin-left: -20px;
    border-radius: 5px; /* Rounded corners */
    width: 800px;
}

.close-button {
    position: absolute;
	padding: 0 5px 0 5px;
    top: 10px;
    right: 15px;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 18px;
    color: #007BFF; /* Blue color for close button */
}

.close-button:hover {
	background: #e9ecef;
	color: #666;
}

#landcoverTable tr:first-child, 
#landcoverTable th:first-child {
    text-align: left;
    min-width: 10em;
}

#landcoverTable td:nth-child(2),
#landcoverTable td:nth-child(3), 
#landcoverTable td:nth-child(4), 
#landcoverTable th:nth-child(2),
#landcoverTable th:nth-child(3), 
#landcoverTable th:nth-child(4) {
    text-align: right;
}

#landcoverTable th:nth-child(2), 
#landcoverTable th:nth-child(3) { 
    min-width: 6em;
}

#dams_table_wrapper {
    width: 1200px;
}

#provinces_wrapper {
    width: 500px;
} 

#countries_wrapper {
    width: 500px;
}

#dams_table td:nth-child(6),
#dams_table td:nth-child(7),
#dams_table td:nth-child(8),
#dams_table td:nth-child(9) {
    text-align: right;
}

#countries td:nth-child(2), 
#countries td:nth-child(3) {
    text-align: right;
}

#provinces td:nth-child(2), 
#provinces td:nth-child(3) {
    text-align: right;
}

#provinces th:first-child,
#countries th:first-child {
    width:200px;
}

th:first-child {
    text-align: left;
}

html {
  line-height: 1.5;
}

body {
    margin: 0 auto;
    padding: 0em 2em 2em 2em;
    overflow-wrap: break-word;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}

h1, h2, h3, h4 {
    font-family: Helvetica, Arial, sans-serif;
}

h2, h3, h4 {
    margin-top: 1.5em;
}

p {
    margin: 1em 0;
}

p, ol, ul{
    font-family:  "Palatino Linotype", serif;
    max-width: 800px;
    font-size: 1.2em;
}

@media (max-width: 600px) {
  body {
    padding: 1em;
  }
  
  p, ol, ul {
      font-size: medium;
      line-height: 1.75;
  }
}

/* FIGURES */
figure{
    max-width: 800px;
    margin: 2em 0 2em 0;
    font-family: Helvetica, Arial, sans-serif;
}

img {
  max-width: 100%;
}

/* TABLES */

.table_wrapper {
    overflow-x:auto;
    max-width: 100%;
    overflow-y: hidden;
}

.caption {
    margin-bottom: 0.5em;
    margin-top: 2em;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1em;
}

table {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
    font-variant-numeric: tabular-nums;
    margin-bottom: 2em;
    
}

tbody {
    margin-top: 0.5em;
    border-top: 1px solid #1a1a1a;
}

 table tbody tr:last-child {
    border-bottom: 1px solid #1a1a1a;
}

tr { 
    line-height: 1.25em;
}

tr:hover {
    background-color: lightyellow;
}

th {
    border-top: 1px solid #1a1a1a;
    padding: 0.5em 0.5em;
    border-bottom: 1px solid #1a1a1a;
    vertical-align: middle;
}

td {
    padding: 0.5em 0.5em;
    vertical-align: baseline;
    font-variant-numeric: tabular-nums;
}

td li {
     font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
     padding-top: 0.5em;
}



.left{
    text-align: left;
}

.right{
    text-align: right;
}

.center {
    text-align: center;
}

.spaced {
    padding:1em 0;
}

.ruled {
    border-bottom: 1px solid #ccc;
}

.indent {
    padding-left: 1em;
}

.center_all td {
    text-align: center;
}

.all_right td {
    text-align: right;
}

/* END TABLE stuff */


/* The little auto-generated Table of Contents at the top of each chapter */
#toc {
    float: right;
    max-width: 400px;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

#toc p{
    font-family: Arial, sans-serif;
    font-weight: bold;
}

#toc ul {
    list-style-type: none;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 1em;
}

#toc ul ul {
    margin-left: 20px;
    padding-left: 1.75em ;
    text-indent: -1.75em ;
    font-size:1em;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* The big Table of Contents at the beginning */
.level2{
    margin-bottom: 0;
    margin-top:0;
    padding-left: 2em;
}

.level1 {
    margin-bottom: 0;
    margin-top: 1em;
    font-weight: bold;
    
}
/* END TOC stuff */

/* For the little navigation links at the bottom of the chapters */
.nav {
    margin-top: 2em;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
}

/* I use javascript to add this class to images that are bigger than can fit on the screen.
   Then the user can click on them and they will open in a lightbox. */
.englargeable {
    cursor: pointer; 
}

/* Hanging indent for the Biblio (references) page */
#refs p{
    font-family:  "Palatino Linotype", serif;
    padding-left: 2em ;
    text-indent: -2em ;
    margin-top: 1em;
    max-width: 1000px;
}

/* Footnotes at the bottom of most chapters are in an ordered list <ol> */
#footnotes li{
    margin: 0 0 1em 0;
    font-size: 0.9em;
}

/* This forces the MathJAX equations to fit on the page on small screens,
   and puts a horizontal scroll bar. Seemed to be the best solution for mobile. */
mjx-container {
  overflow-x: auto;
  min-width: 0 !important;
}

/* Buy me a coffee */


.bmc-btn {
  min-width: 150px;
  color: #000000;
  background-color: #FFDD00 !important;
  height: 3em;
  border-radius: 5px;
  font-weight: Bold;
  border: solid 1px #F2C300;
  padding-right: 1em;
  line-height: 15px;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
}


.bmc-btn:hover, .bmc-btn:active, .bmc-btn:focus {
    cursor: pointer;
}

.bmc-btn-text {
    font-family: sans-serif;
    margin-left: 8px;
    display: inline-block;
    line-height: 0;
    width: 100%;
    flex-shrink: 0;
}
