.verse-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    padding-right: 120px; /* Make room for controls */
}

.verse-container:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.verse-number {
    font-weight: bold;
    color: #6c757d;
    margin-right: 0.5rem;
    user-select: none;
}

.verse-text {
    flex: 1;
    max-width: calc(100% - 130px); /* Leave space for controls */
}

.verse-actions-outer {
    display: flex;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    gap: 5px;
}

.verse-actions {
    display: none;
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    gap: 5px;
}

.verse-container:hover .verse-actions {
    display: flex;
}


.highlight-btn, .note-btn, .ask-bibq-btn {
    background: none;
    border: 1px solid #ced4da;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    display: none;
}

/* Make action buttons visible when verse container is active (clicked)
.verse-container.active .verse-actions,
.verse-container.active .highlight-btn,
.verse-container.active .note-btn,
.verse-container.active .ask-bibq-btn {
    display: flex;
} */

.highlight-btn.remove-highlight i::before {
    content: "\f057"; /* fa-times-circle */
}

.highlight-btn.remove-highlight {
    opacity: 0.9;
}

.highlight-buttons {
    display: flex;
    gap: 5px;
}

.highlight-btn.highlight-yellow {
    color: #f1c40f;
}

.highlight-btn.highlight-green {
    color: #2ecc71;
}

.highlight-btn.highlight-blue {
    color: #3498db;
}

.highlight-yellow {
    color: #856404;
}

.highlight-green {
    color: #155724;
}

.highlight-blue {
    color: #004085;
}

.highlighted.highlight-yellow {
    background-color: rgba(255, 255, 0, 0.2);
}

.highlighted.highlight-green {
    background-color: rgba(0, 255, 0, 0.1);
}

.highlighted.highlight-blue {
    background-color: rgba(0, 0, 255, 0.1);
}

/* Style for highlighted verse when accessed directly via URL */
.highlighted-verse {
    font-weight: bold;
    background-color: rgba(255, 255, 150, 0.3);
}

.bible-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.chapter-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    padding: 0.375rem 0.75rem;
    text-decoration: none;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-btn:hover {
    background-color: #e9ecef;
    color: #212529;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.dialog-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
}

.dialog-content textarea {
    width: 100%;
    height: 120px;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sticky-sidebar {
    position: sticky;
    top: 10vh; /* Distance from top of viewport when sticky */
    max-height: calc(100vh - 40px); /* Viewport height minus margins */
    overflow-y: auto; /* Allow scrolling if content is too tall */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06);
    background: white;
}

/* Custom styling for the active tab */
.nav-tabs .nav-link.active {
    color: var(--accent-color);
    border-color: var(--accent-color);
    border-bottom-color: transparent;
    font-weight: 500;
}

.nav-tabs .nav-link:hover:not(.active) {
    border-color: #e9ecef #e9ecef #dee2e6;
    color: var(--primary-color);
    transition: all 0.2s ease-in-out;
}



/* Add this to your existing styles */
.verse-highlight-effect {
    animation: verse-highlight 2s;
}

@keyframes verse-highlight {
    0% { background-color: rgba(255, 255, 0, 0.4); }
    100% { background-color: transparent; }
}


/* Add this to your CSS */
.accordion-button {
    font-size: 0.9rem;
}

.accordion-button.collapsed::after {
    transform: rotate(-90deg);
}

.verse-list .list-group-item {
    font-size: 0.85rem;
    border-left: none;
    border-right: none;
}

#library-tree .accordion-item {
    border-left: none;
    border-right: none;
}

#library-tree .accordion-body {
    padding: 0;
}



.verse-container:hover .note-icon{
display: inline-block !important;
}

.verse-container:hover .note-btn{
display: inline-block !important;
}   

.verse-container:hover .ask-bibq-btn{
display: inline-block !important;
}

.verse-container:hover .highlight-btn{
display: inline-block !important;
}

.note-icon {
    cursor: pointer;
    margin-left: 5px;
}



/* Styles for disabled premium features */
.premium-disabled {
    opacity: 0.6;
    cursor: pointer !important;
    position: relative;
}

.premium-tooltip {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    width: 250px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    text-align: center;
}

.premium-disabled:hover .premium-tooltip {
    display: block;
}

/* Add this to your CSS */
.note-btn.has-note {
    color: #007bff; /* or any color you want to indicate it has a note */
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* Make sure the verse actions (toolbar) shows the note button when it has a note */
.verse-container:not(:hover) .verse-actions .note-btn.has-note {
    display: inline-block !important;
}


.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}


/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .verse-container {
        padding-right: 0.5rem;
        padding-bottom: 40px; /* Space for controls below on mobile */
    }
    
    .verse-text {
        max-width: 100%;
    }
    
    .verse-actions {
        top: auto;
        bottom: 0px;
        right: 70px;
        transform: none;
    }

    .verse-actions-outer {
    display: flex;
    position: absolute;
    right: 10px;
    top: auto;
    bottom: 0%; 
    transform: translateY(-50%);
    align-items: center;
    gap: 5px;
    }

    /* Disable pointer events by default on verse actions */
    .verse-actions, 
    .verse-actions button,
    .ask-bibq-btn,
    .note-btn {
        pointer-events: none;
    }

    /* Enable pointer events only when parent is active */
    .verse-container.active .verse-actions,
    .verse-container.active .verse-actions button,
    .verse-container.active .ask-bibq-btn,
    .verse-container.active .note-btn {
        pointer-events: auto;
    }
}