/* ==========================================================
   Basin Threshold Tool User Guide
   ========================================================== */


/* ==========================================================
   PAGE
   ========================================================== */

html,
body {
  background-color: #ffffff;
  overflow-x: hidden;
}


/* ==========================================================
   NAVBAR
   ========================================================== */

.navbar {
  min-height: 70px;
  background-color: #000000 !important;
  position: relative;
}

/* Logo */
.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand img {
  max-height: 42px;
  width: auto;
  margin-right: 10px;
}

/* Center title */
.navbar-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.1rem;
  font-weight: 700;
  color: #ffffff !important;
  white-space: nowrap;
}


/* ==========================================================
   LEFT SIDEBAR
   ========================================================== */

#quarto-sidebar {
  background-color: #f8f8f8;
  border-right: 1px solid #dddddd;
  padding-top: 24px;
  overflow-x: hidden;
}

.sidebar-title {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.25rem;
  color: #222222;
  letter-spacing: 0.5px;
}

/* Sidebar links */
.sidebar-navigation .sidebar-item-container {
  width: 100%;
  max-width: 100%;
  padding-right: 0.4rem;
}

.sidebar-navigation .sidebar-item-text {
  display: block;
  width: 100%;
  max-width: 100%;

  font-size: 0.96rem;
  line-height: 1.3;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Nested methodology pages */
.sidebar-navigation .sidebar-section .sidebar-item-text {
  font-size: 0.94rem;
}

/* Reduce indentation for nested pages */
.sidebar-navigation .sidebar-section .sidebar-item {
  padding-left: 0.25rem;
}

/* Vertical spacing */
.sidebar-navigation .sidebar-item {
  margin-bottom: 0.3rem;
}

/* Active page */
.sidebar-navigation .active {
  font-weight: 700;
  color: #000000 !important;
}


/* ==========================================================
   MAIN CONTENT AREA
   ========================================================== */

main.content {
  background-color: #ffffff;
  font-size: 1rem;
  line-height: 1.65;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

main.content p,
main.content li {
  overflow-wrap: break-word;
}

main.content img,
main.content svg,
main.content video {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

main.content figure {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.quarto-figure img {
  border: 1px solid #dddddd;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

main.content figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555555;
  text-align: center;
}

main.content a {
  color: #126e82;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

main.content a:hover,
main.content a:focus {
  color: #0b4f5d;
  text-decoration-thickness: 2px;
}


/* ==========================================================
   MAIN PAGE TITLE
   ========================================================== */

.quarto-title h1.title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  overflow-wrap: break-word;
}


/* ==========================================================
   SUBTITLES
   ========================================================== */

main.content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  line-height: 1.2;
}

main.content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1.6rem;
  margin-bottom: 0.75rem;
}

main.content h4 {
  font-size: 1.1rem;
  line-height: 1.3;
}


/* ==========================================================
   RIGHT TABLE OF CONTENTS
   ========================================================== */

.sidebar-margin,
.margin-sidebar {
  background-color: #ffffff !important;
}

.sidebar-margin {
  border-left: 1px solid #eeeeee;
}

#TOC {
  background-color: #ffffff;
  font-size: 0.92rem;
}

#TOC .nav-link.active {
  font-weight: 700;
}


/* ==========================================================
   PAGE GRID
   ========================================================== */

.page-columns,
.quarto-container,
#quarto-content {
  background-color: #ffffff;
}

.page-columns .column-margin,
.page-columns .margin-sidebar {
  background-color: #ffffff !important;
}


/* ==========================================================
   TABLES
   ========================================================== */

table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

th {
  font-weight: 700;
  background-color: #f5f5f5;
}

td,
th {
  padding: 0.7rem;
  vertical-align: top;
  overflow-wrap: break-word;
}

.table-responsive,
.quarto-table-container,
main.content table.table,
.cell-output-display:has(table) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}


/* ==========================================================
   EQUATIONS
   ========================================================== */

.math.display {
  margin-top: 1.3rem;
  margin-bottom: 1.3rem;
  font-size: 1.05rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

pre,
.sourceCode {
  max-width: 100%;
  overflow-x: auto;
}


/* ==========================================================
   LISTS
   ========================================================== */

main.content li {
  margin-bottom: 0.35rem;
}


/* ==========================================================
   CALLOUTS
   ========================================================== */

.callout {
  border-radius: 5px;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 991px) {

  .navbar-title {
    position: static;
    transform: none;
    font-size: 1.5rem;
  }

  .quarto-title h1.title {
    font-size: 1.9rem;
  }

  main.content {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  main.content h2 {
    font-size: 1.3rem;
  }

  main.content h3 {
    font-size: 1.1rem;
  }

  .sidebar-navigation .sidebar-item-text {
    font-size: 0.95rem;
  }

  table {
    font-size: 0.92rem;
  }

  td,
  th {
    padding: 0.55rem;
  }
}

@media (max-width: 575px) {

  .navbar-title {
    font-size: 1.25rem;
    white-space: normal;
    text-align: center;
  }

  .quarto-title h1.title {
    font-size: 1.65rem;
  }

  main.content h2 {
    font-size: 1.2rem;
  }

  main.content h3 {
    font-size: 1.05rem;
  }
}
