/* Help modal */
#help-modal {
  font-family: 'IBM Plex Mono', monospace;
  width: 56vw;
  height: 34.7vw;
  max-width: 1100px;
  max-height: 682px;
  min-width: 420px;
  min-height: 260px;
  aspect-ratio: 21/13;
  background: #fff;
  border: 2px solid #2c6354;
  border-radius: 8px;
  box-shadow: 0 8px 32px #0003;
  z-index: 9999;
  overflow: hidden;
  position: fixed;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(.4,1.4,.6,1), transform 0.22s cubic-bezier(.4,1.4,.6,1);
  display: flex;
  flex-direction: column;
}

#help-modal-content {
  margin: 0.5em;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border-radius: 6px;
}

#help-modal.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

#help-modal-header {
  flex: 0 0 auto;
  background: #f8f8f8;
  border-bottom: 1px solid #bbb;
  padding: 0.5em 1em;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

#help-modal-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #bbb;
  flex: 0 0 auto;
  z-index: 2;
}

#help-modal-tabs .help-tab-btn {
  padding: 0.6em 0;
  background: none;
  border: none;
  border-right: 1px solid #bbb;
  font-weight: bold;
  cursor: pointer;
}

#help-modal-tabs .help-tab-btn:last-child {
  border-right: none;
}

#help-modal-tabs .help-tab-btn.active {
  color: #2c6354;
}

#help-modal-tabs .help-tab-btn:hover {
  text-decoration: underline;
}

#help-columns {
  height: calc(100% - 9.5em);
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  padding: 1em;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

#help-col1, #help-col2 {
  overflow: auto;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#help-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #bbb;
  background: #f8f8f8;
  z-index: 2;
  margin-top: auto;
}

.help-nav-col {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.6em;
}

.help-nav-col:first-child {
  border-right: 1px solid #bbb;
}

#help-nav button {
  width: 100%;
  padding: 0.4em;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: #2c6354;
  font-weight: bold;
}

#help-nav button:hover {
  text-decoration: underline;
}

#help-nav button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* markdown styling inside help modal */
#help-col1 img, #help-col2 img {
  max-width: 100%;
  height: auto;
  display: block;
}
#help-col1 pre, #help-col2 pre,
#help-col1 code, #help-col2 code {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1em;
  background: #f8f8f8;
  border-radius: 4px;
  padding: 0.5em;
  box-sizing: border-box;
}
#help-col1 table, #help-col2 table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}
#help-col1 th, #help-col2 th, #help-col1 td, #help-col2 td {
  word-break: break-word;
  padding: 0.3em 0.7em;
}
#help-col1 ul, #help-col2 ul,
#help-col1 ol, #help-col2 ol {
  max-width: 100%;
  padding-left: 1.2em;
  box-sizing: border-box;
}
#help-col1 blockquote, #help-col2 blockquote {
  max-width: 100%;
  box-sizing: border-box;
  border-left: 3px solid #bbb;
  margin: 0.5em 0;
  padding-left: 1em;
  color: #555;
}

/* numbers modal */
#numbers-modal {
  font-family: 'IBM Plex Mono', monospace;
}

#numbers-modal-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #bbb;
}

#numbers-modal-tabs .tab-btn {
  padding: 0.6em 0;
  background: none;
  border: none;
  border-right: 1px solid #bbb;
  font-weight: bold;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
}

#numbers-modal-tabs .tab-btn:last-child { border-right: none; }

#numbers-modal-tabs .tab-btn.active { color: #2c6354; }

#numbers-modal-tabs .tab-btn:hover { text-decoration: underline; }

#numbers-modal-tabs .tab-btn:focus { outline: none; }
#numbers-modal-tabs .tab-btn:focus-visible { outline: none; }

/* set loader modal */
#set-loader-modal {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
}

#set-loader-modal button input {
  font-family: 'IBM Plex Mono', monospace !important;
  font-weight: 400;
}
