/* Theologians Bible — personal study layer for the Fathers library
 * (highlights, saved passages, My Fathers Study panel). Loaded on
 * fathers.html alongside tb-fathers-study.js. Panel/FAB/list markup mirrors
 * tb-study.css (the Bible readers' equivalent) so the two features feel like
 * one system, but this file is self-contained since fathers.html does not
 * load tb-study.css. */

/* ------------------------------------------------ highlighted text
 * Exact-selection marks (tb-fathers-study.js rebuilds a paragraph or homily
 * block from its original text plus the current mark list) — inline, not a
 * whole-block tint, so highlighting a sentence only lights up that sentence. */
mark.tb-fhl-gold, mark.tb-fhl-blue, mark.tb-fhl-green, mark.tb-fhl-rose {
  color: inherit;
  border-radius: 3px;
  padding: 0.05em 0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
mark.tb-fhl-gold  { background: rgba(201, 162, 77, 0.4); }
mark.tb-fhl-blue  { background: rgba(96, 145, 205, 0.4); }
mark.tb-fhl-green { background: rgba(116, 165, 116, 0.4); }
mark.tb-fhl-rose  { background: rgba(196, 106, 128, 0.4); }

/* ------------------------------------------------ floating "My Study" button
 * Sits above the fixed font-size control (.fathers-reader-controls, bottom
 * 18px, ~46px tall) in the same right-hand stack. */
.tb-fstudy-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 62px);
  z-index: 240;
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--cinzel, serif); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--bg-2, #0f0f0f); color: var(--gold, #C9A24D);
  border: 1px solid var(--border-gold, rgba(201,162,77,0.3));
  border-radius: 999px; padding: 0.6rem 0.95rem; cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);
  transition: all 0.2s ease;
}
.tb-fstudy-fab:hover { border-color: var(--gold, #C9A24D); transform: translateY(-1px); }
.tb-fstudy-fab .tb-fab-ico { font-size: 0.85rem; }
@media (max-width: 640px) {
  .tb-fstudy-fab .tb-fab-txt { display: none; }
  .tb-fstudy-fab { padding: 0.65rem 0.8rem; }
}

/* ------------------------------------------------ My Fathers Study panel
 * Same shape as tb-study.css's overlay/panel/list (duplicated rather than
 * shared since the two pages load different stylesheets). */
.tb-study-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,0.62); backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end;
}
.tb-study-overlay[hidden] { display: none; }
.tb-study-panel {
  width: min(430px, 100vw); height: 100%;
  background: var(--bg-2, #0f0f0f);
  border-left: 1px solid var(--border-gold, rgba(201,162,77,0.2));
  display: flex; flex-direction: column;
  animation: tbFPanelIn 0.28s ease;
}
@keyframes tbFPanelIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.tb-study-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.1rem 0.8rem;
  border-bottom: 1px solid var(--border-gold, rgba(201,162,77,0.14));
}
.tb-study-head h2 {
  margin: 0; font-family: var(--cinzel, serif); font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold, #C9A24D);
}
.tb-study-close {
  background: transparent; border: none; color: var(--text-dim, #a09880);
  font-size: 1.05rem; cursor: pointer; padding: 0.2rem 0.4rem;
}
.tb-study-close:hover { color: var(--gold, #C9A24D); }
.tb-study-tabs { display: flex; gap: 0.35rem; padding: 0.7rem 1.1rem 0; }
.tb-study-tab {
  font-family: var(--cinzel, serif); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: transparent; color: var(--text-dim, #a09880);
  border: 1px solid var(--border-gold, rgba(201,162,77,0.14));
  border-radius: 999px; padding: 0.4rem 0.8rem; cursor: pointer;
}
.tb-study-tab[aria-selected="true"] { color: var(--bg, #0a0a0a); background: var(--gold, #C9A24D); border-color: var(--gold, #C9A24D); }
.tb-study-list { flex: 1; overflow-y: auto; padding: 0.9rem 1.1rem 1.2rem; }
.tb-study-empty { color: var(--text-faint, #5a5040); font-style: italic; font-size: 0.9rem; line-height: 1.7; padding: 1rem 0.2rem; }
.tb-study-item {
  position: relative; padding: 0.7rem 1.9rem 0.7rem 0.75rem; margin-bottom: 0.55rem;
  border: 1px solid var(--border, rgba(255,255,255,0.055)); border-radius: 8px;
  background: var(--bg-3, #111);
}
.tb-study-item .tb-item-ref {
  font-family: var(--cinzel, serif); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--gold, #C9A24D); text-decoration: none;
}
.tb-study-item .tb-item-ref:hover { text-decoration: underline; }
.tb-study-item .tb-item-dot {
  display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%;
  margin-right: 0.4rem; vertical-align: baseline; border: none; padding: 0; cursor: pointer;
}
.tb-study-item .tb-item-snippet {
  margin-top: 0.3rem; font-size: 0.86rem; line-height: 1.55; color: var(--text-dim, #a09880);
  font-style: italic;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tb-item-del {
  position: absolute; top: 0.45rem; right: 0.45rem;
  background: transparent; border: none; color: var(--text-faint, #5a5040);
  font-size: 0.78rem; cursor: pointer; padding: 0.15rem 0.3rem;
}
.tb-item-del:hover { color: #ff6b6b; }
.tb-study-foot {
  padding: 0.75rem 1.1rem; border-top: 1px solid var(--border-gold, rgba(201,162,77,0.14));
  font-size: 0.74rem; color: var(--text-faint, #5a5040); font-style: italic;
}
.tb-study-foot a { color: var(--gold-dim, #a07d35); text-decoration: none; }
.tb-study-foot a:hover { color: var(--gold, #C9A24D); }
