/* ── BIBLE READER PAGE STYLES ── */

/* Layout */
.bible-layout {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* ── SIDEBAR ── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: var(--text2);
  flex-shrink: 0;
}

#book-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}

#book-list::-webkit-scrollbar { width: 4px; }
#book-list::-webkit-scrollbar-track { background: transparent; }
#book-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.testament-header {
  padding: 10px 16px 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent);
  position: sticky; top: 0;
  background: var(--bg2);
  z-index: 1;
}

.book-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  cursor: pointer; transition: background 0.15s;
  border-radius: 0;
}

.book-item:hover { background: rgba(124,58,237,0.1); }
.book-item.active { background: rgba(124,58,237,0.2); }
.book-item.active .book-name { color: var(--primary); font-weight: 600; }

.book-num {
  width: 24px; height: 24px;
  background: var(--bg3);
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.book-item.active .book-num {
  background: var(--primary);
  color: #fff;
}

.book-name {
  flex: 1; font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.book-chaps {
  font-size: 11px; color: var(--text2);
  background: var(--bg3); padding: 2px 6px;
  border-radius: 4px;
}

/* ── MAIN READER ── */
.bible-main {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}

/* Chapter navigation strip */
#chapter-nav-wrap {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  flex-shrink: 0;
}

#chapter-nav {
  display: flex; gap: 6px;
  overflow-x: auto; padding-bottom: 2px;
}

#chapter-nav::-webkit-scrollbar { height: 3px; }
#chapter-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chap-btn {
  min-width: 36px; height: 32px;
  padding: 0 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}

.chap-btn:hover { border-color: var(--primary); color: var(--text); }
.chap-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Chapter title */
#chapter-title-bar {
  padding: 12px 20px 0;
  flex-shrink: 0;
}

#chapter-title {
  font-size: 20px; font-weight: 700; color: var(--text);
}

/* Verse container */
#verses-container {
  flex: 1; overflow-y: auto;
  padding: 16px 20px 100px;
}

#verses-container::-webkit-scrollbar { width: 4px; }
#verses-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.verse {
  display: flex; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 2px;
  cursor: pointer; transition: background 0.15s;
  line-height: 1.9;
}

.verse:hover { background: rgba(255,255,255,0.04); }
.verse.selected { background: rgba(124,58,237,0.15); }
.verse.speaking {
  background: rgba(245,158,11,0.15);
  border-left: 3px solid var(--accent);
}

.vnum {
  font-size: 12px; font-weight: 700;
  color: var(--primary); width: 24px; flex-shrink: 0;
  padding-top: 4px; text-align: right;
  font-family: 'Inter', sans-serif;
}

.vtext { font-size: 17px; color: var(--text); line-height: 1.9; }

/* ── BOTTOM ACTION BAR ── */
.bible-action-bar {
  position: fixed; bottom: 0; left: var(--sidebar-w); right: 0;
  background: rgba(9,9,15,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  z-index: 50;
}

.voice-controls { display: flex; gap: 8px; align-items: center; }

#play-btn, #pause-btn, #stop-btn {
  width: 40px; height: 40px;
  border-radius: 50%; border: none;
  background: var(--primary); color: #fff;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

#play-btn:hover, #pause-btn:hover { background: var(--primary2); transform: scale(1.05); }
#stop-btn { background: var(--bg3); color: var(--text2); }
#stop-btn:hover { background: var(--error); color: #fff; }

.speed-controls { display: flex; gap: 4px; }

.speed-btn {
  padding: 5px 10px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text2);
  font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}

.speed-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.action-spacer { flex: 1; }

/* ── AI CHAT FLOATING BUTTON ── */
.chat-fab {
  position: fixed; bottom: 80px; right: 20px;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  border-radius: 50%; border: none;
  color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  transition: transform 0.2s; z-index: 40;
  text-decoration: none;
}

.chat-fab:hover { transform: scale(1.08); }
