/* e4 RP1 (e4app TASK-055; DESIGN 3.1 item 2; BA-R34, BA-R46): the right study panel's tab strip and panes. Loaded
   after STEP's CSS and e4-theme.css. Layout bands (side by side, overlay, rail) are in e4-theme.css (RP9). */

/* One strip: STEP's five tabs unhidden (grammar stays hidden) + e4's R, T, C; one row at 240 px. */
#sidebar > ul.nav-tabs { display: flex !important; flex-wrap: nowrap; margin: 0; border-bottom: 1px solid #d6dde0; }
#sidebar > ul.nav-tabs > li { display: block !important; flex: 1 1 0; min-width: 0; float: none; margin-bottom: -1px; }
#sidebar > ul.nav-tabs > li > a { min-height: 44px; display: flex; align-items: center; justify-content: center;
  padding: 0 2px; margin: 0; font-size: 16px; line-height: 1; border-radius: 4px 4px 0 0; cursor: pointer; }
#sidebar > ul.nav-tabs > li > a.e4-tab-letter { font-family: inherit; font-weight: 600; }
#sidebar > ul.nav-tabs > li > a[data-target='#color'] { display: none !important; }
#sidebar > ul.nav-tabs > li:has(> a[data-target='#color']) { display: none !important; }
#sidebar > ul.nav-tabs > li > a:focus-visible { outline: 2px solid var(--e4r-acc, #8a4f1d); outline-offset: -2px; }

/* ---- BA-R46 header toggle: the ONE place to restyle it (icon file images/e4/panel-toggle.svg). No X on the panel. ---- */
#sidebar > ul.nav-tabs > li.closeSidebar { display: none !important; }
#e4-panel-icon { display: inline-flex; align-items: center; vertical-align: middle; padding-left: 5px; text-decoration: none; }
/* BA-R59 (RP-FIX-E4-001 v8 9.1): top right. Section 20 makes it the first child of .headerButtons; floated right it is the
   right-most header control at every width (also right of STEP's floated phone menu button). Hit area 32 px, 44 coarse. */
#stepnavbar .headerButtons > #e4-panel-icon { float: right; justify-content: center; min-width: 32px; min-height: 32px;
  padding: 0; margin: -4px 0 0 6px; }
@media (pointer: coarse) { #stepnavbar .headerButtons > #e4-panel-icon { min-width: 44px; min-height: 44px; margin-top: -10px; } }
#e4-panel-icon .e4-panel-glyph { display: inline-block; width: 22px; height: 22px; vertical-align: middle;
  background: url(../images/e4/panel-toggle.svg) center / 22px 22px no-repeat; opacity: .8; border-radius: 4px; }
#e4-panel-icon:hover .e4-panel-glyph, #e4-panel-icon:focus-visible .e4-panel-glyph { opacity: 1; background-color: rgba(255,255,255,.15); }
#e4-panel-icon[aria-pressed='true'] .e4-panel-glyph { opacity: 1; box-shadow: inset -7px 0 0 -1px rgba(255,255,255,.55); }
/* ---- end of the toggle block ---- */

#sidebar .e4-pane { padding: 8px 10px 24px; }
#sidebar .e4-placeholder, #sidebar .e4-empty { color: #5f6b70; margin: 12px 4px; }
#xreference .e4-ref-row { padding: 4px 0; border-bottom: 1px solid #eef1f2; }
#xreference .e4-ref { display: inline-block; min-width: 1.4em; font-weight: 700; color: var(--e4r-acc, #8a4f1d); }
#xreference .e4-ref.flash { animation: e4flash 1.2s ease-out 1; background: #fff3b0; border-radius: 3px; }
@keyframes e4flash { from { background: #ffe066; } to { background: #fff3b0; } }

/* touch: a bigger target for footnote letters (DESIGN 3.1 item 7.2) */
@media (hover: none) { #columnHolder sup.note a { padding: 8px; margin: -8px; position: relative; } }

/* ---- e4 RP2 + RP2b: the R pane (DESIGN 3.2; BA-R35). R-pane rules only. ---- */
#xreference .e4-xref-head { font-size: 15px; font-weight: 600; margin: 4px 0 6px; color: var(--e4r-bar, #22396a); }
#xreference .e4-xref-foot > h5 { font-size: 13px; font-weight: 600; margin: 14px 0 4px; color: #5f6b70; }
#xreference .e4-xref-note { font-size: 12px; color: #5f6b70; margin: 0 0 6px; }
#xreference .e4-ref-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
#xreference .e4-ref-links { flex: 1 1 0; min-width: 0; }
#xreference .e4-expand { flex: 0 0 auto; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 3px;
  background: transparent; color: var(--e4r-acc, #8a4f1d); font-size: 13px; line-height: 22px; cursor: pointer; }
#xreference .e4-expand:hover, #xreference .e4-expand:focus-visible { background: #e8eef0; }
#xreference .e4-expand:focus-visible, #xreference .e4-more:focus-visible, #xreference .e4-dv-chooser button:focus-visible { outline: 2px solid var(--e4r-acc, #8a4f1d); outline-offset: 1px; }
#xreference .e4-xv, #xreference .e4-dv-chooser { flex: 0 0 100%; margin: 4px 0 6px 26px; }
/* e4 RP14 (WAR R3, QA F2): the 26 px indent comes off the width, so the opened verses end at the pane's edge */
#xreference .e4-xv, #xreference .e4-dv-chooser { flex-basis: calc(100% - 26px); max-width: calc(100% - 26px); min-width: 0; overflow-wrap: anywhere; }
#xreference .e4-xv { padding: 6px 8px; background: #f6f8f9; border-left: 3px solid #b9c9cf; border-radius: 3px; font-size: 14px; }
#xreference .e4-xv[hidden] { display: none; }
#xreference .e4-xv-head { font-size: 12px; font-weight: 600; color: #5f6b70; margin-bottom: 4px; }
#xreference .e4-xv h2 { font-size: 13px; font-weight: 600; margin: 6px 0 2px; }
#xreference .e4-xv .verseNumber { font-size: 11px; vertical-align: super; margin-right: 2px; color: #5f6b70; }
#xreference .e4-dv-chooser { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px;
  background: #fffbe6; border: 1px solid #f0e2a0; border-radius: 4px; font-size: 13px; }
#xreference .e4-dv-q { flex: 0 0 100%; }
#xreference .e4-dv-chooser button { padding: 3px 10px; border: 1px solid #b9c9cf; border-radius: 4px; background: #fff; cursor: pointer; }
#xreference .e4-dv-chooser button.e4-dv[aria-pressed='true'] { background: var(--e4r-acc, #8a4f1d); border-color: var(--e4r-acc, #8a4f1d); color: #fff; }
#xreference .e4-dv-list { max-width: 100%; }
#xreference .e4-dv-list[hidden] { display: none; }
#xreference .e4-dv-note { flex: 0 0 100%; color: #5f6b70; }
#xreference .e4-xref-more { margin-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#xreference .e4-more { padding: 4px 10px; border: 1px solid #b9c9cf; border-radius: 4px; background: #fff; color: var(--e4r-acc, #8a4f1d); cursor: pointer; }
#xreference .e4-xref-extra { align-self: stretch; }
#xreference .e4-xref-extra[hidden] { display: none; }
@media (hover: none) {
  #xreference .e4-expand { width: 44px; height: 44px; line-height: 44px; font-size: 16px; }
  #xreference .e4-ref-row { align-items: center; }
  #xreference .e4-xv, #xreference .e4-dv-chooser { margin-left: 0; flex-basis: 100%; max-width: 100%; } /* e4 RP14 */
  #xreference .e4-more, #xreference .e4-dv-chooser button { min-height: 44px; }
}
/* ---- end of the RP2 block ---- */

/* ---- e4 RP3: the ? pane (DESIGN 3.3; BA-R36, BA-R37). #help rules only. ---- */
#help .e4-help { padding: 8px 10px 24px; }
#help .e4-help-h { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--e4r-bar, #22396a); }
#help .e4-help-h:first-child { margin-top: 4px; }
#help .e4-help-links { margin: 0 0 6px; padding-left: 18px; }
#help .e4-help-links > li { margin: 0 0 6px; line-height: 1.35; }
#help .e4-help-links a { text-decoration: underline; text-underline-offset: 2px; }
#help .e4-help-tabs { list-style: none; margin: 0 0 8px; padding: 0; }
#help .e4-help-tabs > li { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; line-height: 1.35; }
#help .e4-help-key { flex: 0 0 1.6em; text-align: center; font-weight: 700; color: var(--e4r-acc, #8a4f1d); }
#help .e4-help-key .glyphicon { top: 2px; }
#help .e4-help-toggle { margin: 10px 0 0; color: #5f6b70; }
/* ---- end of the RP3 block ---- */

/* ---- e4 RP4: the T pane (DESIGN 3.4; BA-R37). #topics rules only. ---- */
#topics .e4-topics-h { margin: 4px 0 6px; font-size: 14px; font-weight: 700; color: var(--e4r-bar, #22396a); }
#topics .e4-topics-ref { font-weight: 400; color: #5f6b70; margin-left: 4px; }
#topics .e4-topic { padding: 5px 0; border-bottom: 1px solid #eef1f2; line-height: 1.35; }
#topics a.e4-topic-link { display: block; text-decoration: none; }
#topics a.e4-topic-link:hover .e4-topic-heading, #topics a.e4-topic-link:focus-visible .e4-topic-heading { text-decoration: underline; }
#topics .e4-topic-root { font-weight: 700; letter-spacing: .02em; }
#topics .e4-topic-sep { color: #8a969b; }
#topics .e4-topic-subject .e4-topic-ref { font-weight: 700; margin-right: 4px; white-space: nowrap; }
#topics .e4-topic-see { display: block; font-size: 12px; color: #5f6b70; margin-top: 2px; }
#topics a.e4-see { text-decoration: underline; text-underline-offset: 2px; }
#topics .e4-topics-box { margin: 14px 0 6px; }
#topics input.e4-topic-search { width: 100%; height: 36px; font-size: 16px; } /* 16 px: no zoom on iOS focus */
#topics .e4-topics-sub { margin: 10px 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #5f6b70; }
#topics .e4-loading, #topics .e4-error { margin: 8px 4px; color: #5f6b70; }
#topics .e4-error { color: #8a2a2a; }
/* ---- end of the RP4 block ---- */

/* ---- e4 RP5: C pane, copy by typed references (DESIGN 3.5; BA-R38). #copy rules only. ---- */
#copy .e4-copy-form { display: flex; flex-direction: column; gap: 8px; }
#copy .e4-copy-box { width: 100%; min-height: 44px; font-size: 16px; } /* 16px: no iOS zoom on focus */
#copy .e4-copy-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
#copy .e4-copy-version { flex: 1 1 120px; min-width: 0; max-width: 100%; min-height: 44px; font-size: 16px; }
#copy .e4-copy-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; font-weight: normal; white-space: nowrap; }
#copy .e4-copy-btn { align-self: flex-start; min-height: 44px; min-width: 96px; padding: 0 20px; font-size: 16px; }
#copy .e4-status { min-height: 1.4em; color: #1f6b3a; }
#copy .e4-copy-ref { margin: 12px 0 4px; font-weight: 700; color: var(--e4r-bar, #22396a); }
#copy .e4-copy-text { white-space: pre-wrap; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
#copy .e4-copy-error { margin: 12px 0; color: #a3192b; }
/* ---- end of the RP5 block ---- */

/* ---- r3.3a2 (BAM16 19:44Z; Bob 12:15 PM MT 11-18): STEP's one #history pane, two tabs: the bookmark tab shows the Bookmarks part, the clock tab
   "Recent passages" the Recent part (js/e4/e4_panel.js historyPart sets data-e4-part). The pane's own two headings and lists (view_history.js:10-15)
   are left as STEP draws them; only the other part is not shown. Before any tab click (page load on mode history) the pane shows the Bookmarks part. ---- */
#sidebar #history:not([data-e4-part="recent"]) h2:nth-of-type(2), #sidebar #history:not([data-e4-part="recent"]) h2:nth-of-type(2) + ul { display: none !important; }
#sidebar #history[data-e4-part="recent"] h2:nth-of-type(1), #sidebar #history[data-e4-part="recent"] h2:nth-of-type(1) + ul { display: none !important; }
