/* =========================
   Sidebar (ChatGPT-style)
   Using your theme variables
   ========================= */

   /* boards.css */

/* =========================
   Theme Variables
   ========================= */
:root {
  --bg: #171717;
  --bg-seethroug: #20202050;
  --bg-trasparent: #17171700;
  --bg-dots: #1d1d1d;
  --bg-alt: #202020;
  --fg: #e6e6e6;
  --fg-seethrough: #e6e6e620;
  --accent: #67e495;
  --border: #2f2f2f;
  --muted: #8b949e;
  
  /* Dark Mode: High brightness to make a dark logo look white/visible */
  --brightness: 1000%; 
}

body.light {
  --bg: #ffffff;
  --bg-seethroug: #f8f8f8ab;
  --bg-trasparent: #ffffff00;
  --bg-dots: #f1f1f1;
  --bg-alt: #e2e2e2;
  --fg: #343434;
  --fg-seethrough: #29292920;
  --border: #dfdfdf;
  --accent: #2ea043;
  --muted: #57606a;
  
  /* Light Mode: Lower brightness to make the logo dark */
  --brightness: 30%; /* Or 30% as you requested, 0% is pure black */
}

body {
  position:fixed;
  left:0;
  right:0;
  top:0;
  bottom:0;
  overflow: hidden;
}

/* ... (Keep your existing sidebar variables like --sidebar-width here) ... */

/* =========================
   Logo Theme Logic
   ========================= */
/* Apply the filter to both the sidebar logo and the top-nav logo */
.sidebar-logo img, 
#logo-image {
  /* transition: filter 0.3s ease; */
  filter: brightness(var(--brightness));
}

/* ... (The rest of your existing CSS below) ... */
:root {
  --sidebar-width: 280px;
  --sidebar-collapsed: 72px;
  --sidebar-transition: 240ms cubic-bezier(.2,.9,.25,1);
  --overlay-bg: rgba(0, 0, 0, 0.55);
  --sidebar-z: 1000000;
}

/* Base sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;

  width: var(--sidebar-width);

  /* Use the same background style as the rest of your UI */
  background: var(--bg-dots);
  background-image: radial-gradient(
    circle at top left,
    var(--bg-dots) 2px,
    transparent 2px
  );
  background-size: 30px 30px;

  border-right: 1px solid var(--border);
  color: var(--fg);

  transform: translateX(0);
  transition: width var(--sidebar-transition), transform var(--sidebar-transition);

  z-index: var(--sidebar-z) !important;

  display: flex;
  flex-direction: column;
  /* overflow:hidden; */
}

#persistence-status {
  left:15px;
}

@media(max-width: 900px) {
  #persistence-status {
    left:50%;
    transform:translate(-50%);    
  }      
}
/* =========================
   Sidebar Header & Toggle
   ========================= */

/* Creates the Left-Right layout */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 20px);
  margin-left: 10px;
  padding-top: 15px; /* Space before the list starts */
  margin-bottom: 10px;
}

/* Style specifically for the new toggle button */
#sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: w-resize;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

#sidebar-toggle-btn:hover {
  color: var(--fg);
  background: var(--fg-seethrough);
}

/* Hide the toggle button when sidebar is collapsed (too narrow) */
.sidebar.collapsed #sidebar-toggle-btn {
  display: none;
}

/* Adjust Logo to not have extra padding since the header handles it */
.sidebar-logo {
  padding: 0; 
  margin: 0;
}

/* Collapsed sidebar (desktop) */
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  background:var(--bg) !important;
  overflow: visible;
}

/* Offscreen (mobile) */
.sidebar.offscreen {
  transform: translateX(-110%);
}

/* Inner content wrapper */
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* padding: 10px 10px; */
  background:var(--bg-dots);
  gap: 0px;
}

/* Sidebar logo button */
.sidebar-logo {
  border: none;
  background: transparent;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  cursor: w-resize;
  border-radius: 10px;
  margin-left: 1px;
}

.sidebar-logo img {
  width: 35px;
  height: 35px;
}

#sidebar-title {
  font-weight: 800;
  font-size: 15px;
}

.sidebar.collapsed .sidebar-title {
  display: none;
}

/* =========================
   Collapsed Sidebar Logic (Final Fix)
   ========================= */

/* 1. Hide extra elements */
.sidebar.collapsed #sidebar-boards-container,
.sidebar.collapsed #sidebar-status,
.sidebar.collapsed #top-sidebar-fade,
.sidebar.collapsed #bottom-sidebar-fade,
.sidebar.collapsed #sidebar-toggle-btn {
  display: none !important;
}

/* 2. Center the Header Container (Fixes the Logo) */
.sidebar.collapsed .sidebar-header {
  justify-content: center; /* Forces logo to center */
  padding-left: 0;
  padding-right: 0;
}

/* 3. Center the Logo Button itself */
.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  width: 100%;
  padding: 0;
  gap: 0;
}

/* 4. Center Nav Items & Remove Gaps */
.sidebar.collapsed .nav-item {
  font-size: 0;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  gap: 0;
}

/* 5. Reset Margins on Icons */
.sidebar.collapsed .nav-item svg,
.sidebar.collapsed .sidebar-logo img {
  margin: 4px 0px;
}

.nav-item > span {
  word-break: nowrap;
  position:absolute;
  left:52.5px;
  width:200px;
  text-align: left;
}

/* =========================
   Fix for Sidebar Scrolling
   Paste this into boards.css
   ========================= */

/* 1. Constraint the nav wrapper */
.sidebar-nav {
  /* Flex layout to fill space */
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden; 
  
  /* IMPORTANT: This allows the fade div to sit absolutely inside here */
  position: relative; 
}

/* 2. Update the container to scroll */
#sidebar-boards-container {
  flex: 1;              /* Take up remaining space in the nav */
  overflow-y: auto;     /* Enable vertical scrolling */
  min-height: 0;        /* standard flex scroll fix */
  padding:0px 10px;
  position: relative;   /* 🔹 anchor #board-context-menu here */
  
  /* Remove height: 100% if it exists, use flex instead */
  height: auto; 
  
  padding-bottom: 100px;
  position: relative;
  
  /* Optional: Smooth scrolling */
  scroll-behavior: smooth;
}

/* Optional: Make scrollbar thinner/cleaner for dark mode */
#sidebar-boards-container::-webkit-scrollbar {
  width: 6px;
}
#sidebar-boards-container::-webkit-scrollbar-track {
  background: transparent;
}
#sidebar-boards-container::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 10px;
}

/* Navigation items */
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  width: calc(100% - 25px);
  background: transparent;
  border: none;
  color: var(--fg);
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  cursor: pointer;
  overflow: hidden;
  margin-left: 12.5px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 300;
}

.nav-item:hover {
  background: var(--fg-seethrough);
}

/* Sidebar footer (Updated for single full-width button) */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column; /* Stacks items if you add more later */
  width: calc(100% - 20px);
}

.icon {
  font-weight: 500;
}

.icon-btn {
  height:fit-content;
  border: none;
  background: var(--bg-dots);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--fg);
}

.icon-btn:hover {
  background: var(--bg-alt);
}

/* Overlay (mobile) */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  z-index: calc(var(--sidebar-z) - 2);
  opacity: 1;
  transition: opacity 200ms;
}

.overlay.hidden {
  display: none;
  opacity: 0;
}

/* Main content shift on desktop */
.main-content {
  margin-left: var(--sidebar-width);
  transition: margin-left var(--sidebar-transition);
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed);
}

.sidebar.offscreen ~ .main-content {
  margin-left: 0;
}

/* Mobile behavior */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-110%);
    width: var(--sidebar-width);
  }

  .sidebar.expanded {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
  }
}

/* =========================
   Sidebar Board List (ChatGPT-style)
========================= */

#sidebar-boards-container {
  height:100%;
  padding-top:20px;
  padding-bottom:20px;
  overflow-y: auto;
  flex: 1;
  position:relative;
}

#img {
  filter:brightness(var(--brightness));
}


#top-sidebar-fade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px; /* Adjust height for how subtle/strong you want the fade */
  z-index: 10;  /* Sits on top of the list */
  
  /* The Fade Effect */
  background: linear-gradient(to top, transparent, var(--bg));
  
  /* CRITICAL: Allows clicking buttons behind the fade */
  pointer-events: none; 
}

#bottom-sidebar-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px; /* Adjust height for how subtle/strong you want the fade */
  z-index: 10;  /* Sits on top of the list */
  
  /* The Fade Effect */
  background: linear-gradient(to top, var(--bg-dots), var(--bg-trasparent));
  /* background:var(--bg-dots); */
  
  /* CRITICAL: Allows clicking buttons behind the fade */
  pointer-events: none; 
}

#top-sidebar-fade {
  position: absolute;
  top: 160px;
  left: 0;
  width: 100%;
  height: 30px; /* Adjust height for how subtle/strong you want the fade */
  z-index: 10;  /* Sits on top of the list */
  
  /* The Fade Effect */
  background: linear-gradient(to bottom, var(--bg-dots), var(--bg-trasparent));
  /* background:var(--bg-dots); */
  /* background: yellow; */
  
  /* CRITICAL: Allows clicking buttons behind the fade */
  pointer-events: none; 
}

@media (max-width:900px) {
  #bottom-sidebar-fade {
    display:none;
  }
}

.sidebar-group-label {
  font-size: 0.8rem;
  opacity: 0.6;
  margin: 12px 4px;
  text-transform: uppercase;
  font-weight:900;
}

.sidebar-board {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--fg);
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.sidebar-board:hover {
  background: var(--bg-alt);
}

/* boards.css */

.sidebar-board.active {
  background: var(--bg-alt);
  color: var(--fg); 
}

.sidebar-divider {
  border: none;
  border-bottom: 1px solid var(--border);
  margin: 1px 0;
}

#sidebar-status {
  font-size: 0.85rem;
  padding: 6px 8px;
  margin-top: 20px;
  opacity: 0.7;
  color: var(--fg);
  text-align: center;
  white-space: normal;
}

/* Show hamburger only on small screens */
#hamburger-btn {
  display: none;
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
    --sidebar-collapsed: 72px;
    --sidebar-transition: 240ms cubic-bezier(.2,.9,.25,1);
    --overlay-bg: rgba(0, 0, 0, 0.55);
    --sidebar-z: 2000;
  }
}

#bible-board-container {
  width:calc(100% - var(--sidebar-width));
  height:auto;
  position:fixed !important;
  top:0px;
  right:0px;
  bottom: 0px !important;
  left:0px;
  left:var(--sidebar-width);
  overflow:hidden;
}



/* --- Sidebar Item Layout (Row with 3-dot) --- */
.sidebar-board-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 2px;
  position: relative; /* Anchor for dropdown */
  transition: background 0.2s, color 0.2s;
}

/* Hover state */
.sidebar-board-item:hover {
  background: var(--fg-seethrough);
}

/* Active board + board with open context menu */
.sidebar-board-item.active,
.sidebar-board-item.context-open {
  background: var(--fg-seethrough);
  color: var(--fg);
}



#new-board-icon {
  font-weight: 600;
  width:15px;
  height:20px;
  font-size: 20px;
}

.sidebar-board-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--fg);
  text-align: left;
  padding: 10px 15px;
  cursor: pointer;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

/* Inline rename input inside sidebar cards */
.sidebar-board-rename-input {
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--border);
  border: none;
  background: transparent;
  color: var(--fg);
  padding: 10px 15px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.sidebar-board-rename-input:focus {
  background: rgba(255, 255, 255, 0.03);
}

/* --- 3-Dot Menu Button --- */
.sidebar-menu-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  margin-right: 4px;
  border-radius: 4px;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
}

/* Show menu button on hover, when explicitly active, or when its item has an open menu */
.sidebar-board-item:hover .sidebar-menu-btn,
.sidebar-board-item.context-open .sidebar-menu-btn,
.sidebar-menu-btn.active {
  display: flex; /* Show on hover, when context menu is open, or if manually active */
}

.sidebar-board-item.context-open .sidebar-menu-btn{
  display: flex !important;
}

/* Sidebar board item “pop-in” animation */
.sidebar-board-item.sidebar-enter {
  filter: blur(0.1rem);
  opacity: 0;
  margin-top: 10px;

  transition:
    filter 0.2s ease,
    opacity 0.2s ease,
    margin-top 0.2s ease;
}

.sidebar-board-item.sidebar-enter.sidebar-enter-active {
  filter: blur(0rem);
  opacity: 1;
  margin-top: 0px;
}


#bible-query-container-book {
  white-space: nowrap; /* Prevents text from wrapping */
}



.sidebar-menu-btn:hover {
  background: rgb(0, 0, 0, 0.1);
  backdrop-filter:blur(1rem);
  color: var(--fg);
}

@media (pointer:coarse) {
  .sidebar-menu-btn {
    display: flex !important;
  }
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.menu-option {
  background: var(--bg-dots);
  border: none;
  color: var(--fg);
  padding: 8px 12px;
  text-align: left;
  margin-bottom:2px;
  display:flex;
  align-items:center;
  gap:5px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
}

.menu-option:hover {
  background: var(--bg-alt);
}

.menu-option.delete {
  color: #e55353;
}
.menu-option.delete:hover {
  background: rgba(229, 83, 83, 0.1);
}

/* --- Modal Styles --- */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 6000000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-backdrop.hidden {
  display: none;
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding:20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-content h3 {
  margin-top: 0;
  color: var(--fg);
}

.modal-content label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--fg);
  font-size: 1rem;
  /* margin-bottom: 20px; */
  box-sizing: border-box; /* Important for width */
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
}
.modal-btn.delete { background: #3f1515; color: #ff8888; border-color: #662222; }
.modal-btn.cancel { background: var(--bg-dots); color: var(--fg); }
.modal-btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }


@media (max-width:900px) {
  .modal-content {
    background: var(--bg-dots);
    border: 1px solid var(--border);
    border-radius:0px !important;
    border-top-right-radius: 25px !important;
    border-top-left-radius: 25px !important;
    padding:20px;
    height:auto;
    position:fixed;
    bottom:0px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  }
}

/* =========================
   Search Modal Styles - Updated for new design
   ========================= */
#search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 6000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The Modal Container */
.search-modal-content {
  max-width: 700px !important; 
  width: 90%; /* Make it responsive */
  height: 80vh; 
  max-height: 500px;
  gap:0px !important;
  display: flex;
  flex-direction: column;
  justify-content:center;
  align-items:center;
  padding: 0px; /* Adjust padding for inner elements */
  position: relative; /* For absolute positioning of close button */
  overflow:hidden;
  border: 2px solid var(--border);
}

/* Close button - Top right */
.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  color: var(--muted);
  font-size: 24px;
  z-index: 1;
  padding:5px;
  border-radius: 100%;
}
.modal-close-btn:hover {
  color: var(--fg);
  background:var(--bg-alt);
}

@media (max-width:900px) {
  .search-modal-content {
    width:100%;
    position:fixed;
    bottom:0px;
  }
}


/* Search Input Styling */
.search-input-wrapper {
  width:100%;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top:50%;
  transform:translate(0, -50%);
  color: var(--muted);
  font-size: 20px;
}

#board-search-input {
  padding: 20px 25px; /* Left padding for icon */
  border:none;
  border-bottom: 2px solid var(--border);
  background: var(--bg-dots); /* Slightly different background for input */
  color: var(--fg);
  border-radius: 0px;
  font-size: 1rem;
  box-shadow: none; /* Remove default input shadow */
  outline: none; /* Remove focus outline */
  width:100%;
  z-index: 0;
}
#board-search-input::placeholder {
  color: var(--muted);
}

/* New Chat Button */
#new-chat-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  margin-bottom: 15px; /* Space below new chat button */
  border-radius: 8px;
  background: var(--bg-alt); /* Matches input background */
  cursor: pointer;
  font-weight: 500;
  color: var(--fg);
  transition: background 0.2s ease;
}
#new-chat-search-btn:hover {
  background: var(--bg-alt); /* Slight hover effect */
}
.new-chat-icon {
  color: var(--accent); /* Accent color for the icon */
  font-size: 20px;
}


/* Scrollable Results Area */
#board-search-results {
  width:calc(100% - 30px);
  flex: 1; /* Fill remaining height */
  overflow-y: auto;
  padding-right: 5px; /* Space for scrollbar */
  /* Remove border and background here, as individual items will have it */
}

/* Custom Scrollbar for Results */
#board-search-results::-webkit-scrollbar {
  width: 8px;
}
#board-search-results::-webkit-scrollbar-track {
  background: transparent;
}
#board-search-results::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb); /* Assuming you have a scroll-thumb variable */
  border-radius: 10px;
  border: 2px solid transparent; /* Gives a slight gap */
  background-clip: padding-box; /* Ensures border doesn't shrink thumb */
}
#board-search-results::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}


/* Group Headers (e.g., Today, Yesterday) */
.search-results-group-header {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--fg);
  padding: 15px 10px 5px 10px;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.search-results-group-header:first-of-type {
  margin-top: 0;
}


/* Individual Result Items */
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 4px; /* Space between items */
}
.search-result-item:hover {
  background: var(--fg-seethrough);
}

/* Icon for chat/board item */
.search-result-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--muted);
}

.search-result-title {
  font-weight: 500;
  font-size: 1rem;
  color: var(--fg);
  flex-grow: 1; /* Allow title to take space */
}

.search-result-snippet {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-left: auto; /* Push snippet to the right if space allows */
  white-space: nowrap; /* Keep snippet on one line for better layout */
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis if too long */
  max-width: 40%; /* Prevent snippet from taking too much space */
}

/* Highlight the matching text */
.highlight-match {
  background-color: rgba(255, 255, 0, 0.2); /* Soft yellow highlight */
  color: var(--fg);
  font-weight: bold;
  padding: 1px 3px;
  border-radius: 4px; /* Slightly rounded highlight */
}

.search-placeholder {
  text-align: center;
  color: var(--muted);
  padding-top: 20px;
}




/* =========================
   Missing Backdrop Style
   ========================= */
#delete-modal-backdrop {
  position: fixed;
  inset: 0; /* Stretches to fill screen */
  background: rgba(0, 0, 0, 0.3); /* Dark background */
  backdrop-filter: blur(4px);
  z-index: 6000000; /* Sits on top of everything */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Utility class to hide it */
#delete-modal-backdrop.hidden {
  display: none !important;
}

.delete-modal-content {
  max-width: 400px;
  background: var(--bg); /* Or #202020 to match image specifically */
  border: 1px solid var(--border);
  padding: 24px;
}

.delete-modal-content h3 {
  font-size: 1.1rem;
  color: var(--fg);
}

.delete-modal-text {
  font-size: 0.95rem;
  color: var(--muted) !important;
  margin:0px;
  padding:0px;
  margin-top: -5px;
  margin-bottom: 15px;
}

.delete-modal-text strong {
  color: var(--muted);
  opacity: 0.7;
  font-weight: 700;
}

.delete-modal-subtext {
  font-size: 0.85rem;
  color: var(--muted);
  padding:0px;
  margin:0px;
}

/* The Red Delete Button */
.modal-btn.delete-solid {
  background-color: #d93025; /* Google/ChatGPT Red */
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.modal-btn.delete-solid:hover {
  background-color: #b52218;
}

/* Make Cancel button blend in */
.modal-btn.cancel {
  background: var(--bg-dots);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 10px 20px;
  border-radius: 8px;
  margin-right: 0px;
}
.modal-btn.cancel:hover {
  background: var(--bg-alt);
  /* opacity:0.7; */
}

/* =========================
   Fix for Board Width on Collapse
   ========================= */

/* 1. Add smooth transition to the containers so they slide, not snap */
#bible-board-container,
.viewport {
  transition: left var(--sidebar-transition), width var(--sidebar-transition);
}

/* 2. When sidebar is collapsed, move the Main Container over */
/* We use the '~' selector because there are other elements (overlay, buttons) between them in HTML */
.sidebar.collapsed ~ #bible-board-container {
  left: var(--sidebar-collapsed) !important;
  width: calc(100% - var(--sidebar-collapsed)) !important;
}

/* 3. Also fix the internal Viewport (since it is position:fixed in style.css) */
.sidebar.collapsed ~ #bible-board-container .viewport {
  left: var(--sidebar-collapsed) !important;
  width: calc(100% - var(--sidebar-collapsed)) !important;
}


/* =========================
   Mobile / Tablet Adjustments
   ========================= */
@media (max-width: 900px) {
  :root {
    /* Set variable to 0 so the main content expands to full width behind the sidebar */
    --sidebar-width: 0px;
    --sidebar-collapsed: 72px;
    --sidebar-transition: 240ms cubic-bezier(.2,.9,.25,1);
    --overlay-bg: rgba(0, 0, 0, 0.55);
    --sidebar-z: 2000;
  }
  
  /* FIX 1: Force fixed width and background color */
  .sidebar {
    width: 280px !important; 
    background-color: var(--bg); /* Ensure it's opaque */
    transform: translateX(-110%);
    z-index: var(--sidebar-z) !important;
    border-right: 1px solid var(--border);
    overflow: hidden; /* Hide scrollbars if content overflows */
  }

  .sidebar.expanded {
    transform: translateX(0);
    box-shadow: 5px 0 25px rgba(0,0,0,0.5); /* Add shadow so it pops */
  }

  /* Fix the search container positioning inside the sidebar */
  #search-container {
    width: 100%;
    max-width: none;
    position: fixed; /* Stick to bottom of sidebar, not screen */
    bottom: 0;
    left: 0;
    transform: none;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    z-index: 2002;
  }

  #search-bar {
    width: calc(100% - 80px); /* Adjust for version picker */
    left: 15px;
  }

  /* Reset main content margin since sidebar is overlay */
  .main-content {
    margin-left: 0 !important;
  }

  /* Fix the board container to fill the screen */
  #bible-board-container {
    width: 100vw;
    height: auto;
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    overflow: hidden;
  }

  /* Ensure hamburger is visible, fixed, and on top */
  #hamburger-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--bg-dots) !important;
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    position: fixed;
    width:50px;
    height:50px;
    padding:14px;
    top: 15px;
    left: 15px;
    z-index: 200;
    fill:var(--fg);
  }
  
  /* Center the persistence status on mobile */
  #persistence-status {
    left: 50%;
    transform: translate(-50%);
    top: 15px;
    width: auto;
  }

  #sidebar-toggle-btn {
    display:none;
  }
}

#search-board-btn-sidebar {
  margin-bottom: 10px;
}




/* =========================
   ChatGPT-Style Profile Menu
   ========================= */

.sidebar-footer {
  margin-top: auto;
  padding: 10px;
  /* border-top: 1px solid var(--border); */
  position: relative; /* Anchor for the popup menu */
}

/* --- Profile Button --- */
.user-profile-btn {
  width: calc(100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--fg);
  text-align: left;
  transition: background 0.2s ease;
}

.user-profile-btn:hover,
.user-profile-btn.active {
  background: var(--fg-seethrough);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%; /* Circle */
  object-fit: cover;
  background: var(--bg-dots);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1; /* Take available space */
  min-width: 0; /* Allow text truncation */
}

.user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-indicator {
  color: var(--muted);
  font-size: 20px;
}

/* --- Pop-up Menu --- */
.profile-menu {
  position: absolute;
  bottom:100%;
  left: 10px;
  right: 10px; /* Stretch to width of footer padding */
  margin-bottom: 8px;
  background: var(--bg-dots);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.2); /* Match profile menu */
  z-index: 1000000000;
  
  display: flex;
  flex-direction: column;
  gap: 2px;
  
  /* Animation */
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.profile-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Hidden utility */
.profile-menu.hidden {
  display: none; /* Fallback hiding */
}

/* Menu Items */
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.menu-item:hover {
  background: var(--bg-alt);
}

.menu-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--muted);
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* --- Collapsed Sidebar State --- */
.sidebar.collapsed .user-profile-btn {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .user-info, 
.sidebar.collapsed .menu-indicator {
  display: none;
}

/* When collapsed, show menu to the side instead of above */
.sidebar.collapsed .profile-menu {
  left: 100%; /* Push to right */
  bottom: 10px;
  margin-left: 10px;
  width: 200px; /* Fixed width since parent is narrow */
}


/* =========================
   Global Context Menu (Fixed Position)
   ========================= */
#board-context-menu {
  position: absolute;              /* was: fixed */
  background: var(--bg-dots);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.2);
  z-index: var(--sidebar-z);
  min-width: 160px;
  display: none;
  flex-direction: column;
  padding: 4px;
  backdrop-filter: blur(10px);
}
#board-context-menu.show {
  display: flex;
  animation: menuFadeIn 0.1s ease-out;
}


@keyframes menuFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.menu-option {
  background: transparent;
  border: none;
  color: var(--fg);
  padding: 10px 12px; /* Match profile menu items */
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px; /* Match profile menu gap */
  cursor: pointer;
  font-size: 0.9rem; /* Match profile menu font */
  font-weight: 600;
  border-radius: 8px;
  font-size: 13px;
  transition: background 0.2s;
}

.menu-option:hover {
  background: var(--fg-seethrough);
}

.menu-option .material-symbols-outlined {
  font-size: 20px; /* Match profile menu icons */
  color: var(--muted);
}

.menu-option.delete {
  color: #e55353;
}

.menu-option.delete .material-symbols-outlined {
  color: #e55353; /* Make delete icon red too */
}

.menu-option.delete:hover {
  background: rgba(229, 83, 83, 0.1);
}

/* Verse Number Styling */
.verse-num {
  font-size: 0.65em;       /* Smaller font */
  vertical-align: super;   /* Raised up */
  color: var(--muted);     /* Light gray */
  font-weight: 700;
  margin-right: 4px;       /* Small gap between number and text */
  user-select: none;       /* Optional: prevents copying numbers if you just want text */
}

.delete-modal-text {
  font-size: 0.95rem;
  color: var(--fg);
}



/* ==========================================================
   Upgrade / Pricing Modal
   ========================================================== */

#upgrade-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  z-index: 6000000 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 28px 16px;
}

#upgrade-modal-backdrop.hidden {
  display: none !important;
}

.upgrade-modal {
  position: relative;
  width: calc(100vw - 50px);
  max-width: 800px;
  max-height: 500px;
  overflow-y: scroll;
  overflow-x: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px 30px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  color: var(--fg);
}

.upgrade-close {
  position: absolute;
  top: 25px;
  right: 25px;
  border: 1px solid var(--border);
  background: var(--bg-dots);
  color: var(--muted);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.upgrade-close:hover {
  color: var(--fg);
  background: var(--bg-alt);
}

.upgrade-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-bottom: 4px;
}

.upgrade-eyebrow {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.upgrade-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--fg);
}

@media (max-width:900px) {
  .upgrade-header {
    margin-top: 20px;
  }
}

.upgrade-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-dots);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 999px;
}

.toggle-chip {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.toggle-chip.active {
  background: var(--accent);
  color: var(--bg);
}

.toggle-chip[disabled] {
  opacity: 0.5;
  cursor: default;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.plan-card {
  background: var(--bg-dots);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.plan-card.highlight {
  background: linear-gradient(180deg, rgba(103, 228, 149, 0.12), rgba(103, 228, 149, 0.05));
  border-color: var(--accent);
  box-shadow: 0 12px 35px rgba(103, 228, 149, 0.25);
}

.plan-card.pro-plan {
  background: var(--bg-alt);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--fg);
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.plan-pill.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.plan-pill.dark {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

.plan-pill.muted {
  color: var(--muted);
  background: var(--bg-dots);
}

.plan-price {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--fg);
}

.plan-price .currency {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
}

.plan-price .per {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom:5px;
  align-self: flex-end;
}

.plan-subtitle {
  margin: 0;
  color: var(--fg);
  font-weight: 700;
  margin-bottom: 15px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.plan-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 15px;
}

.plan-feature-list li {
  display: flex;
  align-items: center;
  /* justify-content: center; */
  gap: 8px;
  margin-bottom: 4px;
}

/* Icon inside the feature row */
.plan-feature-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--fg);  /* Tabler icons use currentColor for stroke */
}

.plan-feature-list li span {
  line-height: 1.4;
}


.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
}

.feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.plan-card.highlight .feature-icon {
  background: rgba(103, 228, 149, 0.12);
  border-color: rgba(103, 228, 149, 0.4);
}

.plan-card.pro-plan .feature-icon {
  background: var(--bg);
  border-color: var(--border);
  color: var(--fg);
}

.plan-cta {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  background: var(--bg-alt);
  color: var(--fg);
}

.plan-cta.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(103, 228, 149, 0.35);
}

.plan-cta.dark {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

.plan-cta.ghost {
  background: transparent;
  color: var(--muted);
}

.plan-cta[disabled] {
  cursor: default;
  opacity: 0.7;
}

.plan-footnote {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.plan-link {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  #upgrade-modal-backdrop {
    align-items: flex-start;
    padding: 0px;
  }

  .upgrade-modal {
    width: 100vw;
    min-height: 100vh;
    border-radius: 24px 24px 0 0;
    border: none;
    border-radius: 0px !important;
    padding-top: 50px !important;
    padding: 22px;
  }

  .plan-price {
    font-size: 2.1rem;
  }
}

#sidebar-logo-img {
  width:32px;
  height:32px;
  object-fit: cover;
  object-position: center;
}

#search-mode-panel-fade-left {
  width:10px;
  height:50px;
  background:linear-gradient(to right, var(--bg), var(--bg-trasparent));
  position:absolute;
  left:-1px;
  bottom:0px;
}

#search-mode-panel-fade-right {
  width:10px;
  height:50px;
  background:linear-gradient(to left, var(--bg), var(--bg-trasparent));
  position:absolute;
  right:-17px;
  bottom:0px;
}

@media (max-width:900px) {
  #search-mode-panel-fade-left {
    width:15px;
    height:50px;
    background:linear-gradient(to right, var(--bg), var(--bg-trasparent));
    position:absolute;
    left:-20px;
    bottom:0px;
  }

  #search-mode-panel-fade-right {
    width:15px;
    height:50px;
    background:linear-gradient(to left, var(--bg), var(--bg-trasparent));
    position:absolute;
    right:-20px;
    bottom:0px;
  }
}












/* === Connection line mini context menu === */

#connection-line-menu {
  position: fixed;
  z-index: 1000;
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  padding-right: 8px;
  border-radius: 100px;
  border: 1px solid var(--fg-seethrough, rgba(255, 255, 255, 0.18));
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: var(--bg-dots);
  font-size: 12px;
  overflow: hidden;

  
  transform-origin: center ;
  transform: scale(var(--bb-connection-menu-scale, 1));
}

#connection-line-menu button {
  border: none;
  background: transparent;
  color: var(--fg, #f9fafb);
  padding: 4px 6px;
  text-align: left;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
}

.connection-delete-button {
  width:30px;
  height:30px;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:7px !important;
}

.color-row-container {
  width:fit-content;
  max-width: 140px !important;      /* cap width of the pill strip */
  overflow-x: auto;      /* scroll horizontally when too many colors */
  overflow-y: hidden;
  position:relative;
  padding-left: 10px;
  padding-right: 10px
}

.color-row-fade-left {
  width:15px;
  height:100%;
  background:linear-gradient(to right, var(--bg-dots), var(--bg-trasparent));
  position:fixed;
  left:50px;
  top:0px;
}

.color-row-fade-right {
  width:15px;
  height:100%;
  background:linear-gradient(to left, var(--bg-dots), var(--bg-trasparent));
  position:fixed;
  right:5px;
  top:0px;
}

#connection-line-menu .color-row {
  display: flex;
  gap: 4px;
  margin-top: 2px;

  /* 👇 Key bits */ 
  width:fit-content;
  flex: 1 1 auto;
  padding: 2px 0;
}

/* Optional: small scrollbar styling */
#connection-line-menu .color-row::-webkit-scrollbar {
  height: 4px;
}

#connection-line-menu .color-row::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--fg-seethrough, rgba(148, 163, 184, 0.5));
}

#connection-line-menu .color-row::-webkit-scrollbar-track {
  background: transparent;
}


#connection-color-picker-input {
  width:100px;
  height:100px;
}

#connection-line-menu .color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
}

#connection-line-menu .color-swatch.active {
  box-shadow: 0 0 0 1px var(--fg);
}

.seperation-line {
  width:2px;
  height:30px;
  /* margin-right: 10px; */
  border-radius: 100px;
  background:var(--border);
}














#connection-color-palette-backdrop {
  position: fixed;
  height:auto;
  width:auto;
  top:0px;
  bottom:0px;
  left:0px;
  right:0px;
}


.connection-color-palette-backdrop {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(16px);
  z-index: 6000000;
}
.connection-color-palette-backdrop.visible {
  display: flex;
}
.connection-color-palette-modal {
  position: fixed;
  width: calc(100vw - 50px);
  max-width:600px;
  background: var(--bg);
  border-radius: 25px;
  border: 1px solid var(--fg-seethrough, rgba(148,163,184,0.5));
  box-shadow: 0 18px 60px rgba(0,0,0,0.8);
  height: 400px !important;
  background: var(--bg); /* Or #202020 to match image specifically */
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  gap: 12px;
  color: var(--fg, #e5e7eb);
}
.connection-color-palette-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.connection-color-palette-title-group h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--fg);
  margin-top:0px;
}
.connection-color-palette-title-group p {
  font-size: 0.95rem;
  color: var(--fg);
  margin:0px;
  padding:0px;
}
.connection-color-palette-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid var(--border);
  background: var(--bg-dots);
  color: var(--muted);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.connection-color-picker-row {
  display: flex;
  align-items: left;
  flex-direction: column;
  gap: 15px;
}
.connection-color-picker-row input[type="color"] {
  -webkit-appearance: none;
  border-radius: 999px;
  width: 100px;
  height: 100px;
  background: transparent;
  cursor: pointer;
}
.connection-color-picker-row input[type="color"]::-webkit-color-swatch {
  border-radius: 999px;
  border: none;
}
.connection-color-hex-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.connection-color-hex-group label {
  font-size: 11px;
  color: var(--muted, #9ca3af);
}
.connection-color-hex-group input[type="text"] {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border, #374151);
  background: var(--bg-alt, #020617);
  color: var(--fg, #e5e7eb);
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
}
.connection-color-hex-group input[type="text"]:focus {
  border-color: var(--accent, #22c55e);
}
.connection-color-add-btn {
  border-radius: 999px;
  border: 1px solid var(--accent, #22c55e);
  background: linear-gradient(135deg, var(--accent, #22c55e), #4ade80);
  color: #020617;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.connection-color-palette-saved {
  border: none !important;
  padding-top: 10px;
  margin-top: 4px;
}
.connection-color-palette-subtitle {
  font-size: 10px;
  display: none;
  color: var(--muted);
  margin: 0 0 6px;
}
.connection-color-palette-list {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* 2–4 per row */
  gap: 15px;
}
.connection-color-pill {
  width:100px;
  height:100px;
  display: inline-flex;
  justify-self: center;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  border: 1px solid var(--border, #374151);
  padding: 0px !important;
  background: var(--bg-alt);
  cursor: pointer;
  font-size: 11px;
  color: var(--fg, #e5e7eb);
  overflow:hidden;
  position:relative;
}
.connection-color-pill-dot {
  width: 100%;
  height: 100%;
  border-radius: 0px;
  border: 1px solid rgba(15,23,42,0.7);
  flex-shrink: 0;
}
.connection-color-pill-remove {
  margin-left: 2px;
  margin-right: 10px;
  font-size: 20px;
  opacity: 0.7;
  position:absolute;
  top:5px;
  right:-5px;
  z-index: 1;
  background:var(--bg-seethroug);
  height:25px;
  width:25px;
  padding:0px;
  border-radius: 100px;
}
.connection-color-pill-remove:hover {
  opacity: 1;
}
.connection-color-palette-empty {
  font-size: 11px;
  color: var(--muted, #9ca3af);
}

@media (max-width:900px) {
  .connection-color-palette-modal {
    position: fixed;
    width: calc(100vw - 48px);
    bottom:0px;
    top:25px;
    max-width:500px;
    height: auto !important;
    background: var(--bg);
    border-radius: 25px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    border: none;
    box-shadow: 0 18px 60px rgba(0,0,0,0.8);
    background: var(--bg); /* Or #202020 to match image specifically */
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    gap: 12px;
    color: var(--fg, #e5e7eb);
  }
}


.promo-code-container {
  width:calc(100% - 38px);
  height:120px;
  margin-top: 15px;
  background: var(--bg-dots);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.promo-plan-input-container {
  width:calc(100%);
  height:50px;
  margin-top: 15px;
  display:flex;
  flex-direction: row;
  gap: 15px;
  justify-content:space-between;
  align-items:center;
}

.promo-plan-input {
  width: calc(100% - 160px);
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  background: var(--bg-alt);
  color: var(--fg);
}

.redeem-code-button {
  width: 150px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 12px 15px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}

.redeem-code-button > span {
  word-break: nowrap;
}

.promo-plan-message {
  margin-top: 6px;
  font-size: 13px;
  min-height: 16px; /* keeps layout steady even when empty */
  color: var(--muted);   /* default to error-ish red */
}

.promo-plan-message.error {
  color: #f97373;
}

.promo-plan-message.success {
  color: #22c55e;
}


#bible-reader-add-to-board-btn {
  align-items: center;
  gap: 0.4rem; /* or just use this instead of a custom class */
}

#bible-reader-add-to-board-btn .floating-add-icon {
  display: flex;
}






/* ============== Toast notifications ============== */

#bb-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: none;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; /* clicks go to children only */
}

.bb-toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 15, 15, 0.96);
  border: 1px solid rgba(80, 80, 80, 0.7);
  color: var(--fg);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.bb-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.bb-toast-success {
  border-color: rgba(103, 228, 149, 0.7);
}

.bb-toast-error {
  border-color: rgba(239, 68, 68, 0.8);
}

.bb-toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(103, 228, 149, 0.14);
}

.bb-toast-error .bb-toast-icon {
  background: rgba(239, 68, 68, 0.18);
}

.bb-toast-icon .material-symbols-rounded {
  font-size: 18px;
}

.bb-toast-message {
  flex: 1;
}

.bb-toast-close {
  border: none;
  background: transparent;
  color: inherit;
  padding: 4px;
  margin-left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bb-toast-close .material-symbols-rounded {
  font-size: 18px;
}















/* =========================
   No Boards / Get Started Layout
   ========================= */

.get-started-root {
  position: fixed;
  width: calc(100vw - var(--sidebar-width));
  height: auto;
  top:0px;
  bottom:0px;
  right:0px;
  left:var(--sidebar-width);
  background:var(--bg);
  z-index: 10000000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.get-started-card {
  max-width: 720px;
  width: calc(100% - 48px);
  padding: 24px 28px;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items:center;
}

.get-started-header {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0px;
  padding:0px;
}

.get-started-subtext {
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  margin: 0px;
  padding:0px;
  margin-bottom: 20px;
}

.get-started-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.get-started-option {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 15px;
  background: var(--bg-alt);
  border: 1px solid var(--fg-seethrough);
  cursor: pointer;
  gap: 4px;
  min-width: 0;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

#get-started-board-or-section {
  width:calc(100% - 50px);
  max-width: 400px;
  border-radius: 100px;
  height:3px;
  display:flex;
  justify-content:center;
  align-items:center;
  background:var(--border);
  margin-top: 25px;
  margin-bottom: 25px;
}

#get-started-board-or-text {
  background:var(--bg);
  color:var(--muted);
  padding:15px;
  font-weight: 800;
}

.get-started-option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.get-started-option-hint {
  font-size: 12px;
  color: var(--muted);
}

.get-started-option:hover {
  background: var(--bg-dots);

}

.get-started-option:active {
  transform: translateY(0);
  box-shadow: none;
}

#get-started-new-board-btn {
  padding:20px 30px;
  border-radius: 15px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition:opacity .2s;
}

#get-started-new-board-btn:hover {
  opacity: 0.8;
}



/* ==================== VERSE STUDY: BOOK INFO ==================== */

#bookinfo-section {
  display: none;
}

#bookinfo-section-content {
  padding:4px 11px;
}

.bookinfo-header {
  width: 70%;
  margin-bottom: 10px;
}

.bookinfo-title {
  width: 100%;
  text-align: left !important;
  font-size: 20px;
  font-weight: 900;
  word-break: break-word;
}

.bookinfo-subtitle {
  width: 100%;  
  color:var(--muted);
  text-align: left !important;
  font-size: .9rem;
  font-weight: 700;
  color: var(--fg);
  opacity: 0.7;
  text-transform: none;
  
  font-size: 16px;
  font-weight: 800;
  color: var(--muted);
  opacity: 0.95;
  margin-top: 5px;
}

.bookinfo-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 12px;
}

.bookinfo-row {
  display: flex;
  gap: 8px;
  font-size: 1rem;
}

.bookinfo-label {
  min-width: 80px;
  font-weight: 600;
  color: var(--muted);
}

.bookinfo-value {
  flex: 1;
  word-break: break-word;
}

.bookinfo-description {
  font-size: 0.9rem;
  line-height: 1.5;
}

.bookinfo-author-section {
  height:100%;
  margin-right: 20px;
  /* border-top: 1px solid var(--border); */
}

.bookinfo-author-section-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}


/* Author hover tooltip */

.bookinfo-author {
  font-weight: 600;
}


.bookinfo-author-tooltip {
  position: absolute;
  top: 110%;
  left: 0;
  z-index: 999999;
  min-width: 220px;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.bookinfo-author:hover .bookinfo-author-tooltip,
.bookinfo-author:focus-visible .bookinfo-author-tooltip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}


.bookinfo-author-section {
  /* border-top: 1px solid var(--border); */
}

.bookinfo-author-section-title {
  width: 100%;
  text-align: left !important;
  font-size: 20px;
  font-weight: 900;
  word-break: break-word;
}

.bookinfo-author-section-body {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 5px;
}

.bookinfo-unique-attributes-block {
  margin-top: 4px;
}

.bookinfo-unique-attributes-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.bookinfo-unique-attributes-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

.bookinfo-unique-attributes-list li {
  margin-bottom: 2px;
}





.guest-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}

.guest-auth-backdrop.hidden {
  display: none;
}

.guest-auth-modal {
  width: min(350px, 100%);
  background: var(--bg);
  color: var(--fg);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  padding: 26px 26px 22px;
  padding-top:50px;
  padding-bottom:50px;
  position: relative;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-direction: column;
}

.guest-auth-close {
  width:40px;
  height:40px;
  position: absolute;
  top: 14px;
  right: 14px;
  background:var(--bg-dots);
  border: none;
  border-radius: 100px;
  display:flex;
  justify-content:center;
  align-items:center;
  font-size: 22px;
  cursor: pointer;
  opacity: 1;
}
.guest-auth-close:hover { opacity: 1; }

.guest-auth-modal h2 {
  font-size: 32px;
  margin: 6px 0 10px;
  text-align: center;
}

.guest-auth-modal p {
  margin: 0 0 18px;
  text-align: center;
  color: #555;
}

.guest-auth-provider {
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--fg);
  cursor: pointer;
  font-weight: 800;
}
.guest-auth-provider:hover { background: var(--fg); opacity: 0.7 }

.guest-auth-provider-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
}

#google-icon {
  width:20px;
  height:20px;
}

.guest-auth-divider {
  margin: 18px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #777;
  font-weight: 800;
  font-size: 12px;
}
.guest-auth-divider::before,
.guest-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.12);
}
.guest-auth-divider span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.guest-auth-home {
  width: 100%;
  max-width: 300px;
  padding: 16px 16px;
  border-radius: 999px;
  border: none;
  background: var(--bg-dots);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.guest-auth-home:hover { opacity: 0.92; }
