*,*::before,*::after{box-sizing:border-box;}
:root{
    --fs-content: min(calc(2vw + 2vmin - .25em), 1.5rem);
    --modal-height: calc(100vh - 2rem);
    --scrollbar-color:tan
    --bg-color: whitesmoke;
    --text-color: black;
    --chords-color: rgb(0, 16, 192);
}

[data-theme="dark"] {
    --bg-color: rgb(32,32,48);
    --text-color: white;
    --chords-color: rgb(0, 160, 255);
}
html{
    overscroll-behavior: none;
}
body{
    font-family: 'Segoe UI', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    /* padding: .125rem;     */  
}
hr {
    display: block;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
    margin-left: auto;
    margin-right: auto;
    border-style: inset;
    border-width: 1.5px;
    border-color: #eeeeee;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f0f0;
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: darkblue;
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-color) #f0f0f0;
}

.wrapper{
    /* width: min(100vw, 1200px); */
    max-width: 1200px;;
    margin-left: auto;
    margin-right: auto;
}
.song-meta{
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.song-meta-title{
    font-size: calc(var(--fs-content)* 1.25);
    font-weight: 700;
}
.song-meta-second-line{
    display: flex;
    justify-content: space-between;
}
.song-meta-artist{
    font-size: calc(var(--fs-content)* .75);
}
.song-meta-capo{
    /* background-color: var(--color6); */
    font-size: calc(var(--fs-content));
}
.song-body {
    /* outline: 3px dotted blue; */
    display: grid;
    grid-template-columns: minmax(min-content, max-content) minmax(min-content,max-content); /* Two columns with a ratio of 2:1 */
    gap: 0 1rem ; /* Gap between grid items */
    overflow-x: scroll;
}

.line {
    /* outline: 2px dashed red; */
    display: contents; /* Flatten the grid items to allow individual control */
}
.line .lastline{
    margin-bottom: var(--fs-content);
}

.lyrics {
    /* background-color: lightblue; */
    white-space: nowrap; /* Prevent lyrics from wrapping */
    overflow: hidden; /* Hide overflowed content */
    text-overflow: ellipsis; /* Display an ellipsis (...) when content overflows */
    font-size: var(--fs-content);
}

.chords {
    white-space: nowrap;
    color: var(--chords-color);
    /* background-color: tan; */
    font-weight: 500;
    text-align: left; /* Align chords to the left */
    font-size: var(--fs-content);
}

/* ----- NAVBar --------------------------------------------------------- */
.btn-group{
    display: inline-flex;
}
.btn-group > .btn-group:not(:last-child) > .btn-grad,
.btn-group > .btn-grad:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.btn-group > .btn-group:not(:first-child) > .btn-grad,
.btn-group > .btn-grad:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.btn-group > .btn-group:not(:first-child),
.btn-group > .btn-grad:not(:first-child) {
    margin-left: -1px;
}
.btn-sm{
    padding:.5rem !important;
}
.btn-grad {
    position:relative;
    cursor: pointer;
    padding: .5rem;
    background-image: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 81%)  51%,hsl(0, 0%, 100%)    100%);
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 0 .3em #eee;
    border: 1px solid slategray;
    border-radius: .25rem;
}

.btn-grad:focus:hover,
.btn-grad:hover{
    box-shadow: inset 0 0 .5em var(--color3);
}
div.song[data-song-idx="1"]:hover +#btn-previous {
    pointer-events: none;
    display: none;
    opacity: 0.5; /* or any other styling to indicate it's inactive */
  }
  .transpose.active{
    background-image: linear-gradient(to bottom, hsl(266, 100%, 50%) 0%, hsl(266, 100%, 75%) 51%, hsl(266, 100%, 50%) 100%);
  }
  .transpose.transpose-neutral{
    display:none;
  }
#song-search{
    display: grid;
    place-items: center;
    width: calc(var(--button-size) * 3);
}
.input-search{
    width: 6ch;
    background-image: none;
    background-color: wheat;
    font-size: var(--button-size);
    font-weight: 700;
    margin: 0;
    border: 1px solid slategray;
    text-align: center;
}
.input-search[type=number]::-webkit-inner-spin-button,
.input-search[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.toolbar{
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding-bottom: .25rem;
}
.toolbar img{
    display: flex;
    justify-content: space-between;
    width: var(--button-size);
    aspect-ratio: 1;
}
.btn-placeholder{
    margin-right:auto;
}
.spacer{
    margin-right: auto;
}
/* ----- MODAL --------------------------------------------------------- */
.modal {
    /* display: none; */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(255,255,255,0.8);
    /* background-color: var(--bg-color); */
}
.modal-header{
    /* outline: 2px dashed red; */
    height: 2rem;
    display: flex;
}

.modal-content {
    background-color: var(--bg-color);
    height: 100vh;
  }
.modal-body{
    display:grid;
    place-items: center;
    margin-top:30vh;
    margin-bottom:auto;
    width: clamp(14rem, 50%, 20rem);
    margin-left: auto;
    margin-right: auto;
    /* background-color: cornflowerblue; */
}
#modal-by-num{
    background-color: whitesmoke;
    width: 100%;
    font-size: 5rem;
}
#modal-by-num:hover{
    box-shadow: none    ;
}
  /* Close button */
  .close {
    color: #888;
    /* float: right; */
    font-size: 3rem;
    font-weight: bold;
    padding-left: .5rem;
    line-height: 1;
  }

  .close:hover,
  .close:focus {
    color: var(--chords-color);
    text-decoration: none;
    cursor: pointer;
  }

  /* UTILITY CLASSES */ 
  div.flex-hfill{
    margin-left: auto;
    margin-right: auto;
  }
  .d-none{display: none !important;}
  .d-flex{display: flex !important;}
  .disable{
    cursor: not-allowed;
    pointer-events: none;
 }
 .songlink{
    cursor: pointer;
 }
 /* TOC */
 #toc-navbar{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
 }
 #toc-sort-choice{
    margin-right: 1rem;
 }
 #toc-sort-choice ul{
    display: flex;
    padding:0;
 }
 #search-toc{
    display: flex;
    align-items: center;
    flex: 1;
    margin-top: auto;
    margin-bottom:auto;
 }
#input-search{
    padding: .5rem 3rem .5rem .5rem;
    font-size: 1rem;
    flex: 1;
}
 #search-clear{
    background: none;
    border: none;
    margin-left: -2.125rem;
    padding: .5rem;
    place-items: center;
    cursor: pointer;
 }
 .search-by > ul{
    list-style: none;
    gap: .5rem;
 }
 .btn-link {
    font-size: 1rem;
    background-color: transparent !important;
    border: 0;
    color: inherit;
    text-align: left;
    padding-left: .25em;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    text-wrap: nowrap;
}
.viewby-key > img{
    padding-left:.25rem;
}
 .viewby-key.active::before{
    content: "\2718";
    color: var(--chords-color);
    padding-right: .2em;
    font-size: .8rem;
    font-weight: 700;
  }
  .songs-grid{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
  @media print {
    .toolbar {
        display: none;
    }

    /* Hide scrollbars */
    body {
        overflow: hidden;
    }

    /* Hide vertical scrollbar */
    html, body {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    html::-webkit-scrollbar, body::-webkit-scrollbar {
        display: none;  /* Chrome, Safari, and Opera */
    }
}