/* Global */
:root {
  --main: /*#0ea5e9;/*#38bdf8;*/#a496ff;
  --foreground: #ffffff;
  --background: #f8f7ff;
  --highlight: #ffec96;
  --scrollbar: #d6dee1;
  --scrollbar-hover: #a8bbbf;
  --btn-hover: #00000011;
  --text-main: #000000;
  --text-mute: darkgray;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--background);
}

body {
  font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica,
    Arial, sans-serif;
  font-size: 1.4rem;
  height: 100vh;
  height: var(--vh);
}

/* Phone portrait width */
@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }
}

a {
  text-decoration: none;
  -webkit-tap-highlight-color: transparent; /* https://stackoverflow.com/questions/21003535/anyway-to-prevent-the-blue-highlighting-of-elements-in-chrome-when-clicking-quic */
}

/* Song List Page */
main {
  text-align: center;
}

.header {
  flex: 0 1 auto;
  background-color: var(--main);
  display: flex;
  justify-content: center;
  font-size: 2rem;
  font-weight: 500;
  position: sticky;
  top: 0;
}

.header ::selection {
  background: var(--highlight);
  color: var(--main);
}

.header input::selection {
  color: var(--text-main);
}

/* Phone portrait width */
@media (max-width: 480px) {
  .header {
    font-size: 1.8rem;
  }
}

.with-search-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-bg {
  position: sticky;
  background-color: var(--background);
  top: 4.85rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

#search {
  border: none;
  margin: 1rem;
  padding: 1rem 1.5rem;
  font-size: 1.5rem;
  border-radius: 500px; /*Arbitrarily large number to make pill shape */
  color: var(--text-main);
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px; /* https://getcssscan.com/css-box-shadow-examples */
  position: sticky;
}

/* Phone portrait width */
@media (max-width: 480px) {
  #search {
    font-size: 1.2rem;
    top: 4.83rem;
  }
}

#search::placeholder {
  color: var(--text-mute);
  font-style: italic;
}

#search:focus {
  outline: none;
  box-shadow: rgba(0, 0, 0, 0.28) 0px 4px 12px; /* https://getcssscan.com/css-box-shadow-examples */
}

.text-divider-parent {
  display: flex;
  justify-content: center;
  width: 100%;
}

.text-divider {
  display: flex;
  align-items: center;
  color: var(--text-mute);
  width: 100%;
  max-width: 576px; /*0.3 * 1920*/
  margin-bottom: 0.75rem;
  --text-divider-gap: 1rem;
}

.text-divider::before,
.text-divider::after {
  content: "";
  height: 1px;
  background-color: var(--text-mute);
  flex-grow: 1;
  margin: 0px 1rem;
}

.no-hymn-msg {
  color: var(--text-mute);
  font-style: italic;
  text-align: center;
}

.results {
  list-style: none;
  margin: 0rem 3rem;
  padding: 0;
  padding-bottom: 0.5rem;
}

.results li {
  margin: 0rem 0rem 0.75rem 0rem;
  display: flex;
  justify-content: center;
}

.results li ::selection {
  background: var(--highlight);
}

.results li a {
  padding: 1.25rem;
  display: block;
  height: 100%;
  color: var(--text-main);
  background-color: var(--foreground);
  border-radius: 10px;
  text-align: start;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px; /* https://getcssscan.com/css-box-shadow-examples */
  max-width: 576px; /*0.3 * 1920*/
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.results li a:active {
  box-shadow: rgba(0, 0, 0, 0.28) 0px 4px 12px; /* https://getcssscan.com/css-box-shadow-examples */
  background-color: var(--main);
  color: var(--foreground);
  font-weight: 500;
}

@media (hover: hover) {
  .results li a:hover {
    box-shadow: rgba(0, 0, 0, 0.28) 0px 4px 12px; /* https://getcssscan.com/css-box-shadow-examples */
    background-color: var(--main);
    color: var(--foreground);
    font-weight: 500;
  }
}

@media (max-width: 480px) {
  .results {
    margin: 0rem 1rem;
  }

  .results li {
    margin: 0rem 0rem 0.5rem 0rem;
  }

  .results li a {
    padding: 1rem;
  }
}

.hymn-number {
  font-weight: bold;
  min-width: 2.5rem;
  display: inline-block;
}

.results li a:active .hymn-number {
  color: var(--highlight);
}

@media (hover: hover) {
  .results li a:hover .hymn-number {
    color: var(--highlight);
  }
}

/* Phone portrait width */
@media (max-width: 480px) {
  .hymn-number {
    min-width: 2rem;
  }
}

/* Lyrics Page */
.box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.btn-back {
  display: flex;
  align-items: center;
  color: var(--foreground);
  margin: 0rem 0.5rem;
}

.btn-back:hover {
  color: var(--highlight);
}

.title {
  color: var(--foreground);
  margin: 1rem 0rem;
}

/* Phone portrait width */
@media (max-width: 480px) {
  .title {
    margin: 0.7rem 0rem;
  }
  .title-text {
    display: none;
  }
}

.hl-text {
  color: var(--highlight);
}

.content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 1rem 0rem;
  height: 0; /* No clue how this works: https://stackoverflow.com/questions/14962468/how-can-i-combine-flexbox-and-vertical-scroll-in-a-full-height-app */
  /* height: 87.5%; /*TODO: there must be some way to make this dynamic */
}

.lyrics {
  background-color: var(--foreground);
  border-radius: 10px;
  padding: 1rem 2rem;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px; /* https://getcssscan.com/css-box-shadow-examples */
  width: 100%;
  max-width: 576px; /*0.3 * 1920*/
  overflow-y: scroll;
}

.lyrics::-webkit-scrollbar {
  width: 8px;
}

.lyrics::-webkit-scrollbar-track {
  background-color: transparent;
}

.lyrics::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar);
  border-radius: 500px;
}

.lyrics::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-hover);
}

.lyrics ::selection {
  background: var(--highlight);
}

/* Phone portrait width */
@media (max-width: 480px) {
  .lyrics {
    padding: 0.5rem 1rem;
    width: 100%;
  }
}

.btn-prev {
  transform: scaleX(-1);
}

.btn-prev,
.btn-next {
  color: var(--text-main);
  display: flex;
  align-items: center;
  padding: 0.3rem;
}

.btn-prev:hover,
.btn-next:hover {
  cursor: pointer;
}

.btn-prev:hover,
.btn-next:hover,
.btn-prev:active,
.btn-next:active {
  background-color: var(--btn-hover);
}

.invisible {
  visibility: hidden;
}
