/* parallel.css - v1 */

/* Content band — sized by JS to match content area (bottom menu iframe) */
.content-band { box-sizing: border-box; overflow: hidden; max-width: 100vw; }

/* Space under the chapter title, above the parallel table */
#movebox2 { padding-bottom: 13px; }
@media (max-width: 768px) {
  /* Trim only the gap BELOW the chapter title — leave spacing
     above it (between top nav and the title) untouched.
     The visible gap on mobile comes from BibleHub's stacked
     wrapper divs/tables. Pull pt-band up to sit tight under
     the chapter title. */
  #movebox2  { padding-bottom: 0 !important; margin-bottom: 0 !important; }
  .pt-band   { margin-top: -22px !important; }
}

/* ── Edge navigation arrows ──────────────────────────────────
   The <img> elements carry the correct light arrow via their
   HTML src attribute. We deliberately do NOT swap the image with
   CSS `content: url()` — that property is unreliable on <img>
   elements in Safari and was causing the dark GIF to render on
   iOS. Hover darkening (desktop only) is done with a filter,
   which is safe on every browser and cannot "stick" on touch. ── */
@media (hover: hover) and (pointer: fine) {
  .edge-arrow:hover img { filter: brightness(0.55); }
}

/* ═══════════════════════════════════════════════════
   OUTER CONTAINER
═══════════════════════════════════════════════════ */
/* Band sized by JS (alignTableToContent) to match content area.
   overflow:hidden clips so the page never widens; inner wrap scrolls.
   The 1px side shadows continue BibleHub's content-section edge line. */
.pt-band {
  box-sizing: border-box;
  overflow: hidden;
  max-width: 100vw;
  box-shadow: 1px 0 0 #e8e8e8, -1px 0 0 #e8e8e8;
}
.pt-outer {
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 80px;
}
.pt-scroll-wrap {
  width: 100%;
  box-sizing: border-box;
  padding-left: 20px;
  padding-right: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
/* Scrollbar only visible on touch/mobile where scrolling is actually needed */
@media (max-width: 768px) {
  .pt-band {
    box-shadow: none; /* no edge border on mobile */
  }
  .pt-scroll-wrap {
    padding-left: 0;
    padding-right: 0;
    scrollbar-width: thin;
    scrollbar-color: #4479ba #f0f0f0;
  }
  .pt-scroll-wrap::-webkit-scrollbar { height: 6px; }
  .pt-scroll-wrap::-webkit-scrollbar-thumb { background: #4479ba; border-radius: 3px; }
  .pt-scroll-wrap::-webkit-scrollbar-track { background: #f0f0f0; }
  /* Hide the "Top of Page" arrows on phones (#botleft/#botright). */
  #botleft, #botright { display: none !important; }
  /* newp.css paints decorative edge graphics (leftbksm.png /
     rightbksm.png) as <body> background images. On a narrow phone
     viewport they fall over the content as dark edge arrows. Remove
     them on mobile only — desktop body styling is untouched. */
  body { background-image: none !important; }
}
@media (min-width: 769px) {
  /* Desktop: no scrollbar — table fits the content area */
  .pt-scroll-wrap { scrollbar-width: none; }
  .pt-scroll-wrap::-webkit-scrollbar { display: none; }
}

/* ═══════════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════════ */
#pt {
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #333;
}

/* ── Header cells ── */
#pt th {
  background: #f0f0f0;
  border-top: 2px solid #4479ba;
  border-bottom: 1px solid #cccccc;
  border-left: 1px solid #cccccc;
  border-right: none;
  text-align: left;
  vertical-align: top;
  padding: 0;
}
.th-vn {
  border-right: 2px solid #aaaaaa !important;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f0f0f0;
}
.th-in {
  display: flex;
  align-items: flex-start;
  padding: 4px 5px 4px 6px;
  gap: 4px;
}
.th-txt { flex: 1; min-width: 0; }
.th-code-row { display: flex; align-items: center; }
.sw { position: relative; display: flex; align-items: center; }
.sw::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #4479ba;
  margin-left: 6px;
  flex-shrink: 0;
  pointer-events: none;
}
.th-code { font-size: 13px; font-weight: bold; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 14px;
}
.vfull {
  font-size: 13px; color: #555; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.audio-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  width: 18px;
  height: 18px;
  background: transparent;
  color: #4479ba;
  text-decoration: none;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
}
.audio-link:hover { color: #2d5f9a; }
.rm {
  flex-shrink: 0; width: 20px; height: 20px;
  border: none; border-radius: 50%; background: #ddd;
  cursor: pointer; font-size: 12px; font-weight: bold; color: #555;
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background 0.15s, color 0.15s; line-height: 1;
}
.rm:hover { background: #cc3300; color: #fff; }

/* ── Plus column header ── */
.th-plus {
  background: #4479ba !important;
  border-top: 2px solid #2d5f9a !important;
  border-left: 1px solid #2d5f9a !important;
  border-bottom: 1px solid #2d5f9a !important;
  vertical-align: top; padding: 0; cursor: pointer;
}
.th-plus:hover { background: #2d5f9a !important; }
table#pt th.th-plus .th-plus-in,
table#pt th.th-plus .th-plus-in *,
.th-plus-in, .th-plus-in * {
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 10px;
  font-weight: bold;
}
.th-plus-in {
  display: flex; align-items: center; justify-content: center;
  padding: 6px 4px; gap: 3px;
  white-space: nowrap; flex-direction: column;
}
.th-plus-icon { font-size: 18px !important; line-height: 1; font-weight: 300; }

/* ── Body cells ── */
#pt td {
  border-top: none; border-bottom: none;
  border-left: 1px solid #dddddd; border-right: none;
  vertical-align: top;
}
#pt tr:nth-child(odd)  td { background: #ffffff; }
#pt tr:nth-child(even) td { background: #f7f7f7; }
#pt tr:hover td { background: #eef3fb; }

/* Sticky verse number */
.td-vn {
  text-align: right; padding: 4px 5px 4px 2px;
  border-left: none !important; border-right: 2px solid #aaaaaa !important;
  position: sticky; left: 0; z-index: 1;
}
#pt tr:nth-child(odd)  .td-vn { background: #ffffff; }
#pt tr:nth-child(even) .td-vn { background: #f7f7f7; }
#pt tr:hover .td-vn { background: #eef3fb; }
.vn-a { font-size: 13px; font-weight: bold; color: #4479ba; text-decoration: none; }
.vn-a:hover { text-decoration: underline; }
.td-txt { padding: 4px 6px; font-size: 14px; line-height: 1.55; color: #333; }

/* Plus column */
.td-plus {
  background: #eef3fb !important; border-left: 1px solid #c8d8f0 !important;
  text-align: center; vertical-align: middle; padding: 0; cursor: pointer;
}
.td-plus:hover { background: #dde8f5 !important; }
.td-plus-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 36px; border: none;
  background: transparent; color: #4479ba; font-size: 22px;
  font-weight: 300; cursor: pointer; padding: 4px 0; line-height: 1;
}
.td-plus-btn:hover { color: #2d5f9a; }
.td-plus-empty { background: #f5f8fd !important; border-left: 1px solid #c8d8f0 !important; }

/* ── Mobile: pin the + Add column to the right edge so it's always
   visible, prompting users that more translations can be added ── */
@media (max-width: 768px) {
  .th-plus,
  .td-plus,
  .td-plus-empty,
  .td-foot-plus {
    position: sticky;
    right: 0;
    z-index: 1;          /* same plane as sticky verse col, below #fx2 */
  }
  /* Solid left edge so scrolling text doesn't bleed under it */
  .td-plus, .td-plus-empty {
    box-shadow: -3px 0 5px -2px rgba(0,0,0,0.18);
  }
  .th-plus {
    box-shadow: -3px 0 5px -2px rgba(0,0,0,0.18);
  }
}

/* Loading skeleton */
.td-loading {
  padding: 7px 10px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Footer row */
.td-foot-vn { border-right: 2px solid #aaaaaa; background: #f0f0f0 !important; padding: 0; }
.td-foot {
  padding: 5px 6px 7px; border-top: 1px solid #cccccc !important;
  background: #f0f0f0 !important; text-align: center; font-size: 11px;
}
.td-foot a { color: #4479ba; text-decoration: none; font-weight: bold; }
.td-foot a:hover { text-decoration: underline; }
.td-foot-copyright {
  font-size: 9px;
  color: #999;
  margin-top: 3px;
  line-height: 1.3;
}
.td-foot-plus { background: #e8eff9 !important; border-left: 1px solid #c8d8f0 !important; border-top: 1px solid #cccccc !important; }

/* ═══════════════════════════════════════════════════
   BAB SPECIAL WORD HIGHLIGHTING — all red
═══════════════════════════════════════════════════ */
.bab-greek, .bab-alt, .bab-lit, .bab-ref { color: #cc2200; font-style: italic; }
.strongs-highlight {
  background: #fff3a3 !important;
  border-radius: 2px;
  outline: 1px solid #e6c200;
  color: #003399 !important;
}
/* Strong's number links — no underline, inherit color */
.td-txt a[href*="/hebrew/"],
.td-txt a[href*="/greek/"] {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.td-txt a[href*="/hebrew/"]:hover,
.td-txt a[href*="/greek/"]:hover {
  color: #003399;
}
/* Generic strongs.htm links (e.g. "if there be such a thing") — plain text appearance */
.td-txt a[href="/strongs.htm"],
.td-txt a[href*="/strongs.htm"] {
  color: inherit;
  text-decoration: none;
  cursor: text;
  pointer-events: none;
}
/* ═══════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════ */
@media print {
  /* Hide everything except the parallel table */
  #fx, #fx2, #blnk, .maintable, #fx5, #fx6,
  #announce, #anc, #anc2, #movebox2,
  #chapterNav, #left, #right, #botleft, #botright,
  #mdd, #bot, .pbg, .toast, .swipe-hint,
  .th-plus, .td-plus, .td-plus-empty, .td-plus-btn,
  .rm, .vsel, .audio-link { display: none !important; }

  /* Show breadcrumbs cleanly */
  #breadcrumbs {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
  }

  /* Page title */
  #l1 { display: block !important; }

  /* Table fits within one printed page width */
  .maintable2 { margin: 0 !important; }
  .pt-band    { width: 100% !important; margin: 0 !important; box-shadow: none !important; }
  .pt-outer   { padding-bottom: 0 !important; }
  .pt-scroll-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
    width: 100% !important;
  }

  #pt {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;   /* ignore per-column pixel widths */
    border-collapse: collapse;
    font-size: 10pt;
    line-height: 1.35;
  }
  /* Neutralise the JS-set pixel widths on the <colgroup> so columns
     divide the page evenly instead of overflowing it. */
  #pt colgroup col { width: auto !important; }
  /* Keep the verse-number column narrow; translation columns share
     the remaining width equally. */
  #pt colgroup col:first-child { width: 5% !important; }
  /* Word-wrap long verses so nothing forces the table wider */
  #pt td, #pt th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* Column headers */
  #pt thead th {
    background: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-bottom: 2px solid #aaa !important;
    padding: 4px 6px !important;
    font-size: 10pt;
  }
  .th-code { font-size: 11pt !important; }
  .vfull   { font-size: 9pt !important; color: #555; }

  /* Verse cells */
  .td-txt {
    padding: 3px 6px !important;
    font-size: 10pt !important;
    border: 1px solid #ddd !important;
    vertical-align: top;
  }

  /* Verse numbers */
  .td-vn {
    padding: 3px 4px !important;
    font-size: 9pt !important;
    color: #4479ba;
    border-right: 2px solid #aaa !important;
    position: static !important;   /* drop sticky for print */
  }
  .th-vn { position: static !important; }
  /* Drop sticky on the (now-hidden) plus column too, just in case */
  .th-plus, .td-plus, .td-plus-empty, .td-foot-plus { position: static !important; }

  /* Alternate row shading — subtle for print */
  #pt tbody tr:nth-child(even) td { background: #f9f9f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Footer */
  .td-foot {
    font-size: 8pt !important;
    padding: 3px 6px !important;
    border-top: 1px solid #ccc !important;
  }
  .td-foot-copyright { font-size: 7pt !important; }

  /* BAB annotations stay red */
  .bab-greek, .bab-alt, .bab-lit, .bab-ref {
    color: #cc2200 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Avoid breaking verses across pages */
  #pt tbody tr { page-break-inside: avoid; }

  /* Page header on every printed page */
  @page {
    margin: 1.5cm 1.2cm;
    size: landscape;
  }
}
#chapterNavInner {
  display: flex; background: #efefef;
  border: 1px solid #cccccc; border-top: 3px solid #4479ba;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  font-family: Arial, Helvetica, sans-serif; margin: 0 42px;
}
@media (max-width: 768px) {
  #chapterNav { margin: 0 8px; }
  #chapterNavInner {
    flex-direction: column;
    margin: 0;
    max-height: 75vh;
    overflow-y: auto;
  }
  .cnav-col {
    flex: none !important;
    max-width: none !important;
    min-width: 0 !important;
    border-right: none !important;
    border-bottom: 1px solid #d8d8d8;
    padding: 10px 14px;
  }
  .cnav-col:last-child { border-bottom: none; }
  .cnav-books {
    column-count: 2 !important;
    column-gap: 16px;
  }
  .cnav-book {
    font-size: 15px !important;
    line-height: 2 !important;
    padding: 2px 4px !important;
  }
  .cnav-chapters { gap: 6px; }
  .cnav-ch {
    width: 38px !important;
    height: 36px !important;
    font-size: 15px !important;
  }
  .cnav-header { font-size: 13px; }
}
.cnav-col { flex: 1; padding: 10px 12px; border-right: 1px solid #d8d8d8; min-width: 0; }
.cnav-col:first-child { flex: 0 0 auto; min-width: 100px; max-width: 240px; }
.cnav-col:last-child { border-right: none; }
.cnav-header {
  font-size: 12px; font-weight: bold; color: #444; letter-spacing: 0.05em;
  margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid #eee;
}
.cnav-chapters { display: flex; flex-wrap: wrap; gap: 3px; width: fit-content; }
.cnav-ch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 26px; font-size: 14px; color: #4479ba;
  text-decoration: none; border-radius: 3px; cursor: pointer;
}
.cnav-ch:hover { background: #eef3fb; }
.cnav-ch.cnav-current { background: #4479ba; color: #fff; font-weight: bold; }
.cnav-books {
  column-count: 2;
  column-gap: 8px;
  max-height: none;
  overflow-y: visible;
}
.cnav-book {
  font-size: 14px; color: #4479ba; padding: 1px 2px;
  border-radius: 3px; cursor: pointer; white-space: nowrap;
  text-decoration: none; display: block; line-height: 1.7;
  break-inside: avoid;
}
.cnav-book:hover { text-decoration: underline; }
.cnav-book.cnav-current { color: #cc3300; font-weight: bold; }
.cnav-book.cnav-selected { color: #4479ba !important; font-weight: bold; text-decoration: underline; }

.swipe-hint {
  /* Always reserve its height on mobile so toggling visibility
     never shifts the table up/down. Hidden via opacity, not display. */
  display: none;
  text-align: right; font-size: 11px; color: #888;
  padding: 3px 4px 0; font-family: Arial, sans-serif;
  font-style: italic;
  transition: opacity 0.35s;
  height: 16px;
  line-height: 13px;
  box-sizing: content-box;
  overflow: hidden;
}
@media (max-width: 768px) {
  /* On mobile the slot is always present; JS only flips opacity */
  .swipe-hint { display: block; opacity: 0; }
}

/* ═══════════════════════════════════════════════════
   PICKER MODAL
═══════════════════════════════════════════════════ */
.pbg {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 999999;
  display: flex; align-items: center; justify-content: center;
}
.pbox {
  background: #efefef; border: 1px solid #ccc; border-radius: 6px;
  padding: 18px 20px; width: 860px; max-width: 95vw; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18); font-family: Arial, Helvetica, sans-serif;
  position: relative;
}
.pclose-x {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border: 1px solid #bbb;
  border-radius: 50%;
  background: #fff;
  color: #555;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  z-index: 2;
}
.pclose-x:hover { background: #cc3300; color: #fff; border-color: #cc3300; }
@media (max-width: 768px) {
  .pbox { width: 100%; max-width: 100vw; border-radius: 0; padding: 12px; }
  .pgrid { grid-template-columns: 1fr 1fr !important; }
}
.ptitle { font-size: 18px; font-weight: bold; margin-bottom: 10px; color: #333; }
.pgrid  { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 5px; }
.prow {
  display: flex; align-items: center; gap: 10px; padding: 5px 7px;
  border: 1px solid #ddd; border-radius: 4px; cursor: pointer;
  background: #fff; width: 100%; font-family: Arial, Helvetica, sans-serif;
  transition: background 0.1s, border-color 0.1s; text-align: left;
}.prow:hover:not(.prow-disabled) { border-color: #4479ba; background: #f0f5ff; }
.prow-code {
  display: inline-block; min-width: 38px; padding: 3px 5px;
  border: 1.5px solid #4479ba; border-radius: 3px; font-size: 10px;
  font-weight: bold; color: #4479ba; background: #fff;
  text-align: center; flex-shrink: 0; line-height: 1.3;
  white-space: nowrap;
}
.prow-name { font-size: 13px; color: #333; flex: 1; }
.prow-rm   { font-size: 14px; color: #888; margin-left: auto; flex-shrink: 0; }
.prow.prow-active { background: #f6fff6; border-color: #b8ddb8; }
.prow.prow-active:hover { background: #ffeaea; border-color: #e08080; }
.prow.prow-active:hover .prow-code { background: #c0392b; border-color: #c0392b; color: #fff; }
.prow.prow-active:hover .prow-name { color: #c0392b; }
.prow.prow-active:hover .prow-rm   { color: #c0392b; }
.prow.prow-active .prow-code { background: #3a7d3a; border-color: #3a7d3a; color: #fff; }
.prow.prow-active .prow-name { color: #2a5a2a; }
.prow.prow-disabled { cursor: default; background: #f6fff6; border-color: #b8ddb8; opacity: 0.6; }
.prow.prow-at-max:not(.prow-active) { opacity: 0.4; cursor: not-allowed; }
.picker-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

/* Group divider in picker */
.pgroup-label {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: bold;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0 3px;
  border-bottom: 1px solid #eee;
  margin-bottom: 2px;
  font-family: Arial, Helvetica, sans-serif;
}
.pgroup-label:first-child { padding-top: 0; }
.pclear, .pcancel {
  flex: 1; padding: 9px 12px; border: 1px solid #bbb; border-radius: 4px;
  background: #dddddd; font-family: Arial, Helvetica, sans-serif;
  font-size: 14px; font-weight: bold; cursor: pointer; text-align: center; white-space: nowrap;
  transition: background 0.12s;
}
.pclear  { color: #cc3300; }
.pcancel { color: #555; }
.pclear:hover, .pcancel:hover { background: #cccccc; }

/* ═══════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #333; color: #fff; font-size: 12px;
  font-family: Arial, sans-serif; padding: 7px 16px;
  border-radius: 20px; opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none; z-index: 600; white-space: nowrap;
  display: flex; align-items: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

