/* Search and Controls */

/* Card layout  and reader controls */

/* All Body for the search Bible*/
/*  */

body { font-family: Arial, sans-serif; margin: 0; background: #252f56; color:#111; }
.header { padding: 24px 40px; background: white; border-bottom: 1px solid #e7e7e7; }
.container { padding: 24px 40px; display: grid; gap: 16px; max-width: 1100px; }
.card { background: white; border: 1px solid #e7e7e7; border-radius: 10px; padding: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input { padding: 10px; font-size: 16px; border: 1px solid #ccc; border-radius: 8px; }
button { padding: 10px 14px; font-size: 16px; border-radius: 8px; border: 1px solid #bbb; background: #fff; cursor: pointer; }
button:hover { background: #f0f0f0; }
.results { margin-top: 12px; display: grid; gap: 10px; }
.resultItem { padding: 10px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.ref { font-weight: 700; margin-right: 8px; }
.resultBox { margin-top: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.sub { margin: 6px 0 0; color:#555; }

/*  */

.results { font-size: var(--reader-font, 16px); line-height: 1.6; }
.reader-controls { display:flex; gap:8px; margin: 8px 0; }
/*  */

#bookList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

#bookList button {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f8f8f8;
  cursor: pointer;
}



/* list the books */

.layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}

.sidebar {
  border-left: 1px solid #ddd;
  padding-left: 15px;
  max-height: 90vh;
  overflow-y: auto;
  position: sticky;
  top: 10px;
}

#bookList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#bookList button {
  text-align: left;
  padding: 6px 8px;
  border: none;
  background: #f3f3f3;
  border-radius: 6px;
  cursor: pointer;
}

#bookList button:hover {
  background: #e0e0e0;
}


/* ================= MOBILE RESPONSIVE ================= */

@media (max-width: 768px) {

  /* Header stacks */
  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-right {
    align-self: flex-end;
  }

  /* Layout becomes vertical */
  .layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar below content */
  .sidebar {
    border-left: none;
    border-top: 1px solid #ddd;
    padding-left: 0;
    padding-top: 10px;
    max-height: none;
    position: static;
  }

  /* Container padding smaller */
  .container {
    padding: 16px;
  }

}
/* End the search and controls */

/*  Better search and controls styling */
/* SearchandControls.css */


/* Search and controls */


/* Card refinement */

.card {
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

/* Section title */

.card h2 {
  font-family: 'Libre Baskerville', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

/* Input styling */

#searchBox {
  flex: 1;
  padding: 14px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.95);

  font-size: 16px;

  transition: all 0.25s ease;
}

#searchBox:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

/* Search button */

#searchBtn {
  border-radius: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg,#1e3a8a,#2563eb);
  color: white;
  border: none;

  font-weight: 500;
  letter-spacing: 0.04em;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#searchBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Reader controls polish */

.reader-controls {
  display: flex;
  gap: 10px;
}

.reader-controls button {
  border-radius: 10px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.15);
  padding: 10px 14px;
}
/* end search and controls */


/* ================= DARK MODE ================= */

/* Theme toggle */

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  flex-direction: column;
}

.header-right {
  display: flex;
  align-items: center;
}

.theme-toggle {
  display: flex;
  align-items: center;
}

.toggle-label {
  position: relative;
  width: 60px;
  height: 30px;
  background: #e5e7eb;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.toggle-label .icon {
  font-size: 14px;
  pointer-events: none;
}

.toggle-ball {
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  left: 3px;
  transition: transform 0.35s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#toggleSwitch {
  display: none;
}

/* When dark */
#toggleSwitch:checked + .toggle-label {
  background: #111827;
}

#toggleSwitch:checked + .toggle-label .toggle-ball {
  transform: translateX(30px);
}



/* Light theme */
body.light-theme {
  background: #f5f6fa;
  color: #111;
}

/* Dark theme */
body.dark-theme {
  background: #0f172a;
  color: #e5e7eb;
}

/* Cards */
body.dark-theme .card {
  background: #1e293b;
  border-color: #334155;
}

/* Header */
body.dark-theme .header {
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

/* Inputs */
body.dark-theme input {
  background: #0f172a;
  color: white;
  border-color: #475569;
}

/* Buttons */
body.dark-theme button {
  background: #334155;
  color: white;
  border-color: #475569;
}

body.dark-theme button:hover {
  background: #475569;
}

/* Results */
body.dark-theme .resultItem,
body.dark-theme .resultBox {
  background: #0f172a;
  border-color: #334155;
}

/* Sidebar */
body.dark-theme .sidebar {
  border-left: 1px solid #334155;
}

/* Books list — dark mode fix */
body.dark-theme #bookList button {
  background: #1f2937;
  color: #ffffff;        /* ← make text white */
  border: 1px solid #334155;
}

body.dark-theme #bookList button:hover {
  background: #334155;
  color: #ffffff;
}

/* Sidebar title */
body.dark-theme .sidebar h3 {
  color: #e5e7eb;
}


/* body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme p {
  color: #e5e7eb;
} */


/* js  // verseHighlight.js*/

.activeVerse {
  background: #ffeaa7;
}

/* js  // readingMode.js  */

.readingMode .sidebar {
  display: none;
}

.readingMode .container {
  max-width: 700px;
}

/* stickyToolbar.js/  */

.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}
/* Floating mini Search */

.floating-search {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 46px;
  height: 46px;
  background: #2563eb;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 15px rgba(0,0,0,.3);
  z-index: 2000;
  transition: transform .2s ease;
}

.floating-search:hover {
  transform: scale(1.1);
}


/* Scroll to top */
/* --- Scroll-to-Top Button Styles --- */
.scroll-to-top-btn {
    /* Fixed Positioning: Always visible in the bottom-right corner */
    position: fixed;
    bottom: 200px; /* Distance from the bottom of the viewport */
    /* right: 20px; */
    left: 10px; /* <--- CHANGE THIS LINE (WAS 'right: 20px;') */
    
    /* Appearance */
    background-color: #0d6efd; /* Use primary blue (or your theme color) */
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex; /* Centers the icon */
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    text-decoration: none;

    /* Initial state and Transition for smooth hiding/showing */
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px); /* Start off-screen */
    transition: all 0.3s ease-in-out;
    
    /* Ensure it's above other page elements */
    z-index: 1000;
}

/* State when the button should be visible */
.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover/Focus Effect for Professionalism */
.scroll-to-top-btn:hover,
.scroll-to-top-btn:focus {
    background-color: #0b5ed7; /* Slightly darker blue on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    /* Subtle 'bounce' animation on hover */
    animation: pulse 1s infinite; 
}

/* Keyframes for the Subtle Animation (Professional pulse) */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}


/* Books order columns */


.books-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
/* .books-columns .h4 {
  font-family: 'Libre Baskerville', serif;
  letter-spacing: 0.08em;
  color: rgba(20, 20, 20, 0.9);
} */

.books-columns button {
  display: block;
  width: 100%;
  margin-bottom: 6px;
}

/* Book verse lookup  */

.verseRef {
  font-weight: bold;
  margin-bottom: 8px;
  color: #555;
}

.verseText {
  font-size: 1.1rem;
  line-height: 1.6;
}

