body {
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0 1rem;
  background-color: #edf2f7; /* Light blue background */
  color: #2c3e50; /* Dark slate text */
}

.study-list { 
  list-style: none; 
  padding-left: 0; 
  margin: .5rem 0 1rem; 
}
.study-list li { 
  margin: 6px 0; 
}

.study-index { 
  list-style: none; 
  padding-left: 0; 
  margin: .5rem 0 1rem; 
}
.study-index li { 
  margin: 6px 0; 
}

main {
  max-width: 800px;
  margin: auto;
  padding: 2rem 1rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.section {
  margin-bottom: 2rem;
}

label {
  font-weight: bold;
}

select,
input[type="text"],
button {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

button {
  background-color: #2b6cb0; /* Deep blue */
  color: white;
  border: none;
  cursor: pointer;
}

button:hover,
button:focus {
  background-color: #234e84; /* Darker blue hover */
}

#thinking {
  font-style: italic;
  margin-top: 0.5rem;
}

#answerBox {
  margin-top: 1rem;
  background-color: #f0f4ff; /* Soft blue background */
  padding: 1rem;
  border-left: 4px solid #2b6cb0;
  border-radius: 4px;
}

.suggested-questions h4 {
  margin-bottom: 0.5rem;
}

.suggested-questions ul {
  padding-left: 1.5rem;
}

.markdown-body {
  padding-top: 1rem;
}

.follow-up {
  background-color: #fffdf5;
  border-left: 3px solid #f4d35e; /* Soft gold */
  padding: 0.75rem 1rem;
  margin-top: 1.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #2c3e50;
}

.follow-up a button {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}
@media (max-width: 600px) {
  .responsive-table {
    width: 100vw;               /* Use full screen width */
    margin-left: -1rem;         /* Counteracts body padding */
    margin-right: -1rem;
    overflow-x: hidden;         /* Prevent unwanted scrolling */
  }

  .responsive-table table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .responsive-table th,
  .responsive-table td {
    font-size: 14px;            /* Smaller text for mobile */
    padding: 0.4rem;
    white-space: normal;        /* Allow wrapping */
    word-break: break-word;     /* Wrap long words if needed */
  }
}

/* Quiz Styles */
.quiz {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}

.quiz h2 {
  color: #2b6cb0;
  margin-bottom: 1.5rem;
  text-align: center;
}

.quiz form div {
  margin-bottom: 1.5rem;
}

.quiz label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.quiz input[type="radio"] {
  width: auto;
  margin-right: 0.5rem;
}

.quiz input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}

.quiz button {
  background-color: #28a745;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.quiz button:hover {
  background-color: #218838;
}

#take-quiz-btn {
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
  z-index: 1000;
}

#take-quiz-btn:hover {
  background-color: #138496;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#quiz-feedback {
  background-color: #e8f5e8;
  border: 1px solid #c3e6c3;
  border-radius: 6px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

#quiz-feedback ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

#quiz-feedback li {
  margin-bottom: 0.25rem;
}

.return-home {
  margin: 1rem 0;
  text-align: center;
}

.return-home a {
  text-decoration: none;
  color: #1d4ed8; /* blue */
  font-weight: 500;
}

.return-home a:hover {
  text-decoration: underline;
}

/* shared study list styling (used by Romans/John/Matthew too) */
.study-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(2, minmax(280px,1fr));
  gap:8px 16px;
}
@media (max-width:768px){ .study-list{ grid-template-columns:1fr; } }
.study-list li{ margin:0; }
.study-link{ text-decoration:none; }
.study-link .icon{ margin-right:8px; }
.study-index {
  text-align: left;
}

.verse-tooltip{
  position: fixed;
  z-index: 100000;                 /* above the chat bubble */
  max-width: min(92vw, 520px);
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: 12px 14px;
  max-height: 66vh;                /* default cap; JS will refine */
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;

  /* keep content clear of iOS home indicator */
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.verse-tooltip.is-open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ----- Global Tooltip System ----- */
/* Backdrop (optional for dim background) */
#gp-tooltip-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.2);
  z-index: 9998;
}

/* Main tooltip box */
#gp-tooltip {
  position: absolute;
  max-width: 280px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;          /* smooth corners */
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  transform: translateY(6px);  /* push it down slightly so top isn't clipped */
}


/* Optional arrow pointer */
#gp-tooltip::before {
  content: "";
  position: absolute;
  top: -8px;         /* position above the box */
  left: 20px;        /* adjust so arrow points near the trigger */
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
  filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.1)); /* subtle border shadow */
}

/* Optional: lock page scroll while tooltip is open */
html.gp-tooltip-lock, body.gp-tooltip-lock {
  overflow: hidden;            /* prevent background scroll bleed */
  overscroll-behavior: contain;
}

/* If you already use a close "sheet" variant, constrain it too */
.gp-tooltip.sheet {
  width: min(92vw, 520px);
}

/* Accessibility: respect reduced motion (if you animate) */
@media (prefers-reduced-motion: reduce) {
  .gp-tooltip { transition: none !important; }
}

/* Review Questions Styling */
/* keep links same color whether visited or not */
.review-questions a,
.review-questions a:visited { 
  color: var(--link-color, #1a73e8); 
}

/* highlight the one just clicked (current selection) */
.review-questions a.active {
  text-decoration: underline;
  font-weight: 600;
}

/* show a small ✓ after any question that has been clicked at least once */
.review-questions li.asked > a::after {
  content: " ✓";
  color: #16a34a;   /* green check */
  margin-left: .25rem;
  font-weight: 700;
}

/* Return Navigation Styling */
.return-bar {
  margin: 8px 0 12px;
}
.return-link {
  color: #1e40af;         /* indigo-800 */
  font-weight: 600;
  text-decoration: none;
}
.return-link:hover {
  text-decoration: underline;
}

/* Emoji Styling */
.emoji {
  display: inline-block;
  line-height: 1; /* keeps the glyph from being clipped */
  margin-right: .35rem;
  font-family:
    "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",
    "EmojiOne Color","Twemoji Mozilla", sans-serif; /* cross-platform emoji */
}

/* Visually hidden text for screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Make sure no legacy icon sneaks in */
.chatbot-fab::before { content: none !important; }

/* Small round blue FAB */
.chatbot-fab {
  position: fixed; right: 16px; bottom: 16px;
  width: 56px; height: 56px; padding: 0; margin: 0;
  border: none; border-radius: 50%;
  background: #1e40af; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.12);
  cursor: pointer; z-index: 1000;
}

/* The visible icon */
.chatbot-fab .fab-emoji {
  font-size: 26px;
  line-height: 1;
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}

.chatbot-fab:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.chatbot-fab:active { transform: translateY(1px); }

/* Kill any legacy pseudo-icons */
.chatbot-fab::before,
#bot-icon::before,
.chatbot-toggle::before { content: none !important; }

/* Ensure the emoji shows nicely */
.chatbot-fab .fab-emoji {
  font-size: 26px;
  line-height: 1;
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Twemoji Mozilla",sans-serif;
}

.bot-header { 
  line-height: 1.25; 
  overflow: visible; 
}

.emoji-ponder { 
  display: inline-block; 
  line-height: 1; 
  margin-right: .35rem; 
}

