/* ==========================================================================
   SDA Hymnals Online — Bible Verse Highlights & Bookmarks
   Works across Cream, Sepia, and Dark reading themes and Parallel mode.
   ========================================================================== */

#bibleChapterPage .bible-verse-row {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    padding: 4px 8px;
    margin-left: -8px;
    margin-right: -8px;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

#bibleChapterPage .bible-verse-row:hover {
    background-color: rgba(197, 160, 67, 0.07);
}

#bibleChapterPage .bible-verse-row.is-selected {
    outline: 1.5px dashed rgba(197, 160, 67, 0.7);
    background-color: rgba(197, 160, 67, 0.11);
}

/* Highlight colour tokens — light (cream/sepia) */
#bibleChapterPage .bible-verse-row.hl-gold {
    background-color: rgba(245, 200, 66, 0.28);
}
#bibleChapterPage .bible-verse-row.hl-green {
    background-color: rgba(52, 211, 153, 0.24);
}
#bibleChapterPage .bible-verse-row.hl-blue {
    background-color: rgba(56, 189, 248, 0.22);
}
#bibleChapterPage .bible-verse-row.hl-rose {
    background-color: rgba(251, 113, 133, 0.22);
}
#bibleChapterPage .bible-verse-row.hl-purple {
    background-color: rgba(167, 139, 250, 0.22);
}

/* Highlight colour tokens — dark reading theme */
.reading-theme-dark .bible-verse-row.hl-gold {
    background-color: rgba(245, 200, 66, 0.22) !important;
}
.reading-theme-dark .bible-verse-row.hl-green {
    background-color: rgba(16, 185, 129, 0.24) !important;
}
.reading-theme-dark .bible-verse-row.hl-blue {
    background-color: rgba(56, 189, 248, 0.22) !important;
}
.reading-theme-dark .bible-verse-row.hl-rose {
    background-color: rgba(244, 63, 94, 0.24) !important;
}
.reading-theme-dark .bible-verse-row.hl-purple {
    background-color: rgba(139, 92, 246, 0.25) !important;
}

/* Subtle left accent & bookmark flag on bookmarked verses */
#bibleChapterPage .bible-verse-row.is-bookmarked {
    border-left: 3px solid var(--brand-gold);
    padding-left: 10px;
}

.bible-bm-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    color: var(--brand-gold);
    font-size: 0.78em;
    vertical-align: middle;
}

/* Toolbar Bookmark Chapter button active state */
.tool-btn.is-bookmarked-btn {
    border-color: var(--brand-gold);
    background: rgba(197, 160, 67, 0.14);
    color: var(--brand-green-dark);
    font-weight: 600;
}

.tool-btn.is-bookmarked-btn i {
    color: var(--brand-gold);
}

/* Floating Verse Study Action Bar (bottom dock) */
.bible-study-bar {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 1090;
    width: min(560px, calc(100vw - 20px));
    border-radius: 20px;
    background: rgba(7, 31, 27, 0.98);
    backdrop-filter: blur(14px);
    color: #f6f4ee;
    border: 1px solid rgba(197, 160, 67, 0.5);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
    padding: 16px 18px;
    font-family: 'Outfit', 'Inter', sans-serif;
    animation: bsBarSlideUp 0.18s ease-out;
}

@keyframes bsBarSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 14px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.bs-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bs-bar-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bs-bar-ref {
    font-size: 1rem;
    font-weight: 700;
    color: #f3d47c;
    letter-spacing: 0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bs-bar-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(246, 244, 238, 0.78);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.bs-bar-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bs-bar-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.bs-highlight-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.bs-row-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(246, 244, 238, 0.65);
    flex-shrink: 0;
}

/* Colour Swatches */
.bs-swatches {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bs-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.24);
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #071f1b;
    font-size: 0.82rem;
}

.bs-swatch:hover {
    transform: scale(1.12);
    border-color: #fff;
}

.bs-swatch.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(197, 160, 67, 0.85);
    transform: scale(1.08);
}

.bs-swatch[data-color="gold"]   { background: #f5c842; }
.bs-swatch[data-color="green"]  { background: #34d399; }
.bs-swatch[data-color="blue"]   { background: #38bdf8; }
.bs-swatch[data-color="rose"]   { background: #fb7185; }
.bs-swatch[data-color="purple"] { background: #a78bfa; }

.bs-swatch-clear {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

/* Big quick-action tiles inside floating bar */
.bs-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 8px;
}

.bs-action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 56px;
    padding: 8px 6px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #f6f4ee;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.bs-action-tile i {
    font-size: 1.05rem;
    color: #f3d47c;
}

.bs-action-tile:hover {
    background: rgba(197, 160, 67, 0.22);
    border-color: #c5a043;
    color: #fff;
    transform: translateY(-1px);
}

.bs-action-tile.is-active {
    background: #c5a043;
    border-color: #c5a043;
    color: #071f1b;
    font-weight: 700;
}

.bs-action-tile.is-active i {
    color: #071f1b;
}

/* My Library Highlight colour dot */
.hl-dot-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.hl-dot-gold   { background: #f5c842; }
.hl-dot-green  { background: #34d399; }
.hl-dot-blue   { background: #38bdf8; }
.hl-dot-rose   { background: #fb7185; }
.hl-dot-purple { background: #a78bfa; }

/* Study hint above verses */
.bible-study-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 10px;
}

@media (max-width: 767.98px) {
    /* Stay clear of mobile bottom tab bar */
    .bible-study-bar {
        bottom: calc(var(--tab-bar-height, 62px) + 10px + env(safe-area-inset-bottom, 0px));
    }
}
