@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;700&display=swap');

p.caption {
  color: #777;
  margin-top: 10px;
}
p code {
  white-space: inherit;
}
pre {
  word-break: normal;
  word-wrap: normal;
}
pre code {
  white-space: inherit;
}
h3 {
  font-size : 1.25em;
}
h4 {
  font-weight: normal;
  font-style: italic;
}
h5 {
  font-weight: normal;
  font-style: normal;
  text-decoration: underline;
}
.strike {
  color: red;
  text-decoration: line-through;
}
.nobullet li {
  list-style-type: none;
}
.FIXME {
  color: red;
}
div.note {
  margin-top: 2em; 
  margin-bottom: 2em;
  padding-left: 1em;
  border-left: 2px solid #D34145;
  font-style: italic;
  /* background-color: #FFFF99; */
}
.note code {
  font-style: normal;
}
.note::before {
  content: "NOTE: ";
  font-weight: bold;
  float: left;
  margin: 0em;
  padding: 0em;
  padding-right: 0.5em;
}

/* footnote counter to restart numbering for each chapter and subchapter
  thanks @romles https://stackoverflow.com/questions/50616517/restart-endnote-numbering-after-each-gitbook-style-web-chapter-in-r-bookdown
  thanks @ilyankou for update from footnote-ref to footnoteRef for bookdown 0.9, and .level1 to .page-inner for 0.15 */

  /* don't show the wrong footnote calls */
  .footnote-ref sup,
  .footnoteRef sup {
    display: none;
  }

  /* use a counter for footnote calls */
  .page-inner {
    counter-reset: fn-call;
  }

  .footnote-ref,
  .footnoteRef {
    counter-increment: fn-call;
  }

  /* generate new footnote calls */
  .footnote-ref::after,
  .footnoteRef::after {
    content: counter(fn-call);
    position: relative;
    top: -.5em;
    font-size: 85%;
    line-height: 0;
    vertical-align: baseline;
  }

  /* use a counter for footnotes numbering */
  .footnotes ol {
    list-style: none;
    counter-reset: fn-number;
  }

  .footnotes li {
    counter-increment: fn-number;
  }

  .footnotes p::before {
    content: counter(fn-number) '. ';
  }

.folium-map div,
.leaflet-container div,
.leaflet-fade-anim div,
.leaflet-grab div,
.leaflet-touch-drag div {
  width: 700px;
  height: 550px;
}

.leaflet-bottom div {
  height: 0px;
}

.leaflet-left div {
  width: 0px;
}

.leaflet-control div {
  height: 15px;
  position: relative;
  bottom: -500px;
  right: 0px;
}

.leaflet-control-attribution div {
  position: relative;
  bottom: -535px;
  right: 70px;
}

.pvtAxisContainer {
  visibility: hidden !important;
  height: 0px !important;
  width: 0px !important;
}

.pvtVals {
  visibility: hidden !important;
  height: 0px !important;
} 

  /* General table styles */
.table {
  height: 300px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

table th,
table td {
  border: 1px solid #ddd !important;  
  padding: 6px !important;
  max-width: 400px !important;
}

/* Hover effect for rows */
table tbody tr:hover {
  background-color: #ddd !important;
}

table p {
  margin-bottom: 0 !important;
  font-size: 14px !important;
}

table li {
  font-size: 14px !important;
}

.book-summary {
  width: 360px !important;
  position: fixed !important; /* Keeps it in place */
  top: 60px !important;
  bottom: 80px !important;
  left: 0 !important;
  height: 100vh !important; /* Locks it to the full viewport height */
}

.summary {
  bottom: 30px !important;
}

/* Global text styling */
body, p, td {
  font-family: 'Raleway', sans-serif !important;
  font-size: 14px !important;
}

/* Header styling */
h1, h2 {
  font-family: 'Raleway', sans-serif !important;
  font-size: 28px !important;
  color: #004b8b !important;
  border-bottom: 2px solid #b9e2f8 !important;
  padding-bottom: 5px !important;
}

h3 {
  font-family: 'Raleway', sans-serif !important;
  font-size: 20px !important;
  text-transform: uppercase !important;
  color: #004b8b !important;
}

/* List styling */
ul, ol {
  font-family: 'Raleway', sans-serif !important;
  font-size: 14px !important;
  padding-left: 20px !important;
}

.summary {
  padding-bottom: 30px !important;
}

/* Header Bar styling */
.header-bar {
  display: flex;
  font-family: 'Raleway Light', sans-serif !important;
  align-items: center;
  justify-content: space-between;
  color: white !important;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(185, 226, 248, 0.7) !important;
}

/* Logo styling */
.logo {
  height: 40px;  /* Adjust size as needed */
  width: auto;
  opacity: 1 !important;
}

/* Link to logo */
.logo-link {
  display: inline-block;
  text-decoration: none;
}

/* Project title styling */
.project-title {
  font-family: 'Raleway', sans-serif !important;
  font-size: 28px !important;
  color: #004b8b !important;
  margin: 0;
  opacity: 1 !important;
}

/* Search container styling */
.search-container {
  padding: 10px;
  background-color: #f8f9fa;
  position: relative;
}

/* Input box */
#toc-search {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #004b8b;
  border-radius: 4px;
}

/* Transparent dropdown styling */
#search-results {
  list-style-type: none;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.7); /* 70% opacity */
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(5px); /* Optional: Adds a subtle blur effect */
  padding-left: 0 !important;
}

/* Individual search results */
#search-results li {
  padding: 8px;
}

#search-results li a {
  text-decoration: none;
  color: #004b8b;
  display: block;
  padding: 5px;
  font-weight: bold;
  opacity: 1; /* Full opacity */
}

#search-results li a:hover {
  background-color: #b9e2f8;
}

/* Base styles */
#floating-toc {
  position: fixed;
  top: 90px;
  right: 15px;
  z-index: 9999;
  font-family: 'Raleway', sans-serif;
  text-align: right;
}

#toc-toggle {
  background-color: #009dea;
  color: white;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  transition: background-color 0.3s;
}

#toc-toggle:hover {
  background-color: #004b8b;
}

#toc-content {
  overflow: auto;
  max-height: 0;
  transition: max-height 0.5s ease;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  margin-top: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 250px;
  text-align: left;
}

/* Expanded state */
#floating-toc.expanded #toc-content {
  max-height: 620px; /* enough to show full TOC */
}

/* TOC item styles */
#toc-list {
  list-style: none;
  margin: 0;
  padding: 10px;
}

#toc-list li a {
  display: block;
  padding: 4px 8px;
  color: #004b8b;
  text-decoration: none;
  font-size: 14px;
}

#toc-list li a:hover {
  background-color: #b9e2f8;
}

#toc-list li a.active {
  font-weight: bold;
  background-color: #b9e2f8;
  border-left: 3px solid #009dea;
}

/* Indented subheaders */
#toc-list li ul {
  padding-left: 15px;
}

.toc-sub a {
  font-size: 13px;
}
