body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    color: white;
    background-color: #18181b;
    
}

::selection{
    color: rgb(175, 201, 174);
    background-color: rgba(255,255,255, 0.1);
}

h1 {
    text-align: center;
}

.verse_reference{
    color: rgb(176, 176, 255);
}

#content {
    display: flex;
    gap: 20px;
}

#text-section {
    font-family: 'Cardo', 'Crimson Text', 'EB Garamond', Arial, sans-serif;
    font-size: 1.2em;
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 8px;
}

.verse {
    margin-bottom: 0px;
    padding: 5px;
    cursor: pointer;
    user-select: none;
}

.verse.active {
    background-color: rgba(100,100,220, 0.025);
    border-bottom: 2px rgb(176, 176, 255) solid;
    border-top: 2px rgb(176, 176, 255) solid;
    margin-top: -2px;
    margin-bottom: -2px;
}

#reference-map, #commentary-box {
    font-family: Arial, sans-serif;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    color: white;
    /*background-color: #3f3f3f;*/
    background-color: #242428;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

#reference-map h3, #commentary-box h3 {
    border-bottom: 1px solid #555;
    padding-bottom: 8px;
    margin-top: 0;
}

.reference-content {
    font-family: 'Cardo', 'Crimson Text', 'EB Garamond', Arial, sans-serif;
    font-size: 1.2em;
}

.reference {
    color: rgb(176, 176, 255);
    cursor: pointer;
    text-decoration: underline;
    padding: 5px;
    display: inline-block;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.reference:hover {
    background-color: rgba(255,255,255, 0.1);
}

.reference.active {
    background-color: rgb(128, 128, 255);
    color: white;
    font-weight: bold;
}

.reference-list {
    margin-bottom: 15px;
}

.reference-content {
    padding-top: 10px;
    border-top: 1px dashed #555;
}

/* Dropdown menu styles */
.dropdown{
    display: flex; 
    gap: 20px; 
    max-width: 1200px; 
    margin: 0 auto;
    margin-bottom: 20px;

    position: relative;
    display: block;
    /* cursor: pointer; */
    
    width: 100%;
    z-index: 100;
}

.dropdown-toggle:hover{
    /* background-color: #3f3f3f; */
}

.dropdown-toggle{
    user-select: none;
    border-bottom: 2px solid white;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    transition: background-color 0.3s ease-in-out;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #3f3f3f;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.dropdown-item {
    padding: 16px 20px;
    display: block;
    color: white;
    font-size: 0.95em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #4a4a4a;
}

#selected_page_title{
    margin-top:0px;
    text-align: left; 
    width:100%;
}

.arrow {
    border: solid white;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 5px;
    transform: rotate(45deg);
    transition: transform 0.3s;
    margin-left: 10px;
}

.arrow.up {
    transform: rotate(-135deg);
}

.dropdown-active .dropdown-menu {
    display: block;
}

.vNumber{
    font-size:0.6em;
    /*color: rgb(175, 201, 174);*/
    color: rgb(176, 176, 255);
    font-weight: bold;
}

.verse-ref{
    color: rgb(176, 176, 255);
    cursor: pointer;
}

.verse-ref:hover{
    background-color: rgba(255,255,255, 0.1);
    color:white;
}

.indented_block{
    display:block;
    margin-left: 20px;
}

.cube_ul {
    list-style: none;
    padding-left: 1.1em;
}

.cube_ul li {
    position: relative;
}

.cube_ul li::before {
    content: "";
    display: inline-block;
    position: absolute;
    left: -1.1em;
    top: 0%;
    transform: translateY(100%);
    width: 0.5em;
    height: 0.5em;
    background-color: rgb(176, 176, 255);
    border-radius: 2px;
    /* background-image: linear-gradient(to left, rgb(176, 176, 255), rgba(176, 176, 255, 0.2)); */
}

.custom-scrollbar {
    padding-right:8px;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */

    /* Force scrollbar to always be visible, even when not scrolling */
    &::-webkit-scrollbar {
        width: 10px;
        -webkit-appearance: none;
        display: block; /* Always show scrollbar */
    }

    &::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    &::-webkit-scrollbar-thumb {
        background: #999;
        border-radius: 10px;
        min-height: 40px; /* Ensure thumb is visible and grabbable on mobile */
    }

    /* Firefox */
    scrollbar-width: thin; /* 'auto' could be better for visibility */
    scrollbar-color: #555 #242428;
}
  
.indented_commentary{
    padding-left: 10px;
    display:block;
    background-color: rgba(176, 176, 255, 0.1);
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Replace the existing commentary-slider and related classes with these */
.commentary-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.commentary-panel {
    width: 100%;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 100%;  /* Start offscreen to the right */
    top: 0;
    transition: all 0.3s ease-in-out;
}

.commentary-panel.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    left: 0;  /* Active panel is in view */
}

.commentary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.back-button {
    background: none;
    border: none;
    color: rgb(176, 176, 255);
    font-size: 1.2em;
    cursor: pointer;
    padding: 0.5rem;
}

.back-button:hover {
    color: white;
    background-color: rgba(176, 176, 255, 0.1);
}

.topical-link {
    color: rgb(176, 176, 255);
    cursor: pointer;
    text-decoration: underline;
}

.topical-link:hover {
    color: white;
    background-color: rgba(176, 176, 255, 0.1);
}

/* Animation states */
.show-topic .commentary-panel:not(.topical) {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: -100%;  /* Slide out to the left */
}

.show-topic .commentary-panel.topical {
    opacity: 1;
    visibility: visible;
    position: relative;
    left: 0;  /* Slide in from the right */
}

#commentary-box {
    overflow: hidden;
    transition: height 0.3s ease-in-out;
    position: relative;
}