html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    box-sizing: border-box;
    display: flex;
    /* centers content vertically */
}

body {
    font-size: 160%;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #ffffff;
}

h1 {
    font-family: Georgia, serif;
    font-weight: lighter;
    font-style: italic;
    /*font-style: italic;*/
    color: #cecece;
    text-align: center;
}

h2 {
    color: #cecece;
    text-align: left;
}

h3 {
    color: #cecece;
    text-align: left;
}

#container {
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    height: 100vh;
    width: inherit;
    width: 100%;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#passage-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 96px);
    width: 100%;
    min-width: 100%;
}

#passage {
    font-size: 160%;
    border: 1px solid #888;
    border-radius: 6px;
    padding: 48px;
    margin-left: 96px;
    margin-right: 96px;
    margin-top: 12px;
    margin-bottom: 96px;
    background: #333333a0;
    display: inline;
    white-space: normal;
}

#title {
    width: 100%;
    min-width: 100%;
    margin-top: -48px;
}

.verse-number {
    color: #888;
    text-decoration: none;
}

/* Highlight styles */
.highlightable.highlighted {
    color: rgb(106, 235, 141);
    background-color: #33333300 !important;
    font-weight: bold;
}

.highlight-green {
    color: rgb(106, 235, 141) !important;
    background-color: #33333300 !important;
    font-weight: bold;
}

.highlight-red {
    color: rgb(255, 130, 130) !important;
    background-color: #33333300 !important;
    font-weight: bold;
}

.highlight-yellow {
    color: rgb(255, 240, 145) !important;
    background-color: #33333300 !important;
    font-weight: bold;
}

.highlight-blue {
    color: rgb(128, 200, 254) !important;
    background-color: #33333300 !important;
    font-weight: bold;
}

.highlight-italic {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
    color: #b7b7b7 !important;
    background-color: #33333300 !important;
}

.highlight-green-underline {
    text-decoration: underline;
    color: rgb(106, 235, 141) !important;
    background-color: #33333300 !important;
    font-weight: bold;
}

.highlight-red-strikethrough {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
    text-decoration: line-through;
    text-decoration-color: rgb(255, 130, 130);
    color: #b7b7b7;
    background-color: #33333300 !important;
}

/* For selecting parts */
.highlightable {
    cursor: cell;
}

#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 133%;
    background: #222;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 10px;
    z-index: 998;
    transform: scale(0.75);
    transform-origin: top left;
    flex-wrap: wrap;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    overflow: hidden;
}

#darker {
    color: #707070;
}

/* Style for controls inside top bar */
#top-bar label,
#top-bar select,
#top-bar input,
#top-bar button {
    font-size: 1em;
    padding: 4px 4px;
    font-family: monospace, Arial, sans-serif;
}

#top-bar button,
#top-bar select,
#top-bar input {
    background-color: #2c2c2c;
    /* dark background */
    color: #eee;
    /* light text */
    border: 1px solid #555;
    /* subtle border */
    border-radius: 4px;
    padding: 3px 6px;
    font-family: monospace, Arial, sans-serif;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

#top-bar option {
    font-size: 0.75em;
    /* some browsers recognize this */
}

#top-bar label {
    padding-right: 0px;
}

/* Hover effect for buttons/inputs */
#top-bar button:hover,
#top-bar select:hover,
#top-bar input:hover {
    background-color: #333;
    border-color: #777;
}

/* Style labels inside #top-bar */
#top-bar label {
    color: #ccc;
    font-family: monospace, Arial, sans-serif;
    font-size: 1em;
    margin-right: 3px;
}

.top-bar-line {
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    flex-flow: row nowrap !important;
    flex-direction: row;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    width: 1920px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    margin-bottom: -5px;
    padding: 0px;
}

.keyword-container {
    display: flex;
    align-items: center;
    gap: 8px;
    /* optional spacing between input and button */
}

/* Remove spinner arrows in input[type=number] for Chrome, Edge, Opera */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove spinner arrows in input[type=number] for Firefox */
input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Style for the search input and button */
#search-input {
    width: 144px;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    cursor: text !important;
}

#search-button {
    padding: 10px;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    background-color: #4ab6ff;
    color: #121212;
    font-size: 14px;
}

#search-results {
    display: none;
    /* hide initially */
    margin-left: 120px;
    margin-right: 120px;
    margin-top: 120px;
}

.search-result {
    cursor: pointer;
    padding: 4px 8px;
    border: 1px solid transparent;
}

#search-results a {
    color: rgb(128, 200, 254);
    text-decoration: none;
}

#search-results a:hover {
    color: #afd2ff;
    text-decoration: none;
}

.search-result:hover {
    background-color: #2e2e2e;
    border-color: #ccc;
}

.search-highlight {
    color: rgb(106, 235, 141) !important;
    font-weight: bold;
}

#keyword-input {
    width: 144px;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    cursor: text !important;
}

/* Container to keep checkboxes inline with the top bar */
#topbar .topbar-checkboxes {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: Arial, sans-serif;
    font-size: 18px;
    color: #fff;
}

/* Container for inline checkboxes */
.topbar-checkboxes {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: #fff;
}

/* Hide native checkbox but keep it accessible */
.topbar-checkboxes input[type="checkbox"] {
    position: relative;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    appearance: none;
    border: 2px solid #fff;
    border-radius: 3px;
    cursor: pointer;
    background-color: transparent;
}

/* Create custom indicator */
.topbar-checkboxes input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: block;
}

/* Ensure labels are inline and aligned */
.topbar-checkboxes label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

#sticky-logo {
    position: fixed;
    top: -33px;
    right: 40px;
    width: 120px;
    height: auto;
    z-index: 1000;
    /* above other elements */
    cursor: pointer;
    /* if clickable, optional */
}

.topbar-devider {
    color: #555;
    padding-top: 2px;
    margin-left: 10px;
    margin-right: 10px;
}

#topbar-ext {
    height: 0px !important;
    width: 100% !important;
    overflow: visible !important;
    background-color: none !important;
    background: none !important;
    align-items: center !important;
    justify-content: center !important;
    display: flex !important;
    transition: height 0.1s ease;
    -moz-box-pack: center;
    flex-direction: row;
    -webkit-flex-direction: row;
    justify-content: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
}

#collapse-toggle {
    height: 14px;
    font-size: 12px;
    line-height: 12px;
    padding: 0 0px;
    padding-bottom: 2px;
    cursor: pointer;
    border: none;
    background: none;
    margin-top: 0px;
    display: flex;
    z-index: 999;
    overflow: visible !important;
    transform: translateX(-50%);
}

.footer-menu {
  font-size: medium;
  position: sticky;
  bottom: 30px;
  width: 100%;
  text-align: center;
  background-color: transparent;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 999;
}

.footer-menu .link-group {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-menu a {
  text-transform: uppercase;
  color: #ababab;
  text-decoration: none;
  padding: 4px 8px;
  transition: color 0.3s;
}

.footer-menu a:hover {
  text-transform: uppercase;
  color: #dbdbdb;
  text-decoration: underline overline;
  text-underline-offset: 4px;
  text-decoration-color: #468c8c;
}

.footer-menu .copyright {
  font-size: small;
  color: #808080;
  margin-top: 10px;
}

/* Message Overlay Styles */
  /* Overlay background */
  #msgOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  /* Popup container */
  #msgPopup {
    background-color: #336565;
    width: 80%;
    max-width: 400px;
    padding: 20px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.9);
  }
  /* Close button at top right */
  #msgCloseBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
  }
  /* Message styling */
  #msgMessage {
    text-align: center;
    color: #ffffff;
    margin-top: 20px;
    font-size: 18px;
  }
  /* OK button at bottom */
  #msgOkBtn {
    display: block;
    margin: 20px auto 0 auto;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: #000000;
    color: white;
    border-radius: 4px;
  }
  #msgOkBtn:hover {
    background-color: #373737;
  }
