/* e4 TB1: top bar step (MERGE-STEP-TOPBAR-R6, MERGE-ADD-R6a; Bob's layout a crop). Loaded last (after e4-redesign.css and e4-merge-fix.css).
   From 768 px up only (phones keep today's look, COO 12 rule e). Colours are the design's tokens (--e4r-*). */

/* chapter summaries out (the switch is js/e4/e4_off.js: e4Off.summaries; this css follows the class it sets) */
html.e4-off-summaries #summbutton { display: none !important; }
/* Type ref works through the passage picker; keep the picker out of sight while it does */
html.e4-quiet-picker #passageSelectionModal, html.e4-quiet-picker .modal-backdrop { opacity: 0 !important; transition: none !important; }

@media (min-width: 768px) {
  /* ---- 1. the dark bar holds only the logo, "e4.org" and the panel button ---- */
  html body #stepnavbar .headerButtons > :not(#e4-panel-icon) { display: none !important; }

  /* ---- 2. the passage row, as the crop: Bible, Passage, Type ref, magnifier, Quick view | gear ? More | expand + X ---- */
  html body #columnHolder .passageOptionsGroup:not(.dropdown-menu):not(li) { padding: 8px 16px !important; min-height: 54px; gap: 8px; }
  /* R3 MERGE: with two or more columns each column is about half the window (493 px at 1280): the row (with lane B's quick tools) does not fit on one line and its right
     end (gear, ?, More, expand, X) ran under the next column (found by r3twocol.spec.js / small-b3). The row may wrap now: in a single column it still fits on one line. */
  html body #columnHolder .passageOptionsGroup:not(.dropdown-menu):not(li) { flex-wrap: wrap; row-gap: 4px; }
  html body #columnHolder .passageOptionsGroup .argSummary { display: contents !important; }
  html body #columnHolder .passageOptionsGroup .argSummary > [class^="separator-"] { display: none !important; }
  html body #columnHolder .passageOptionsGroup .argSummary > button.stepButtonTriangle {
    height: 38px !important; border: 1.5px solid var(--e4r-tan-line, #dccfae) !important; border-radius: 8px !important;
    background: var(--e4r-card, #fff) !important; color: var(--e4r-ink, #1f1c17) !important; font: 600 15px/1 var(--e4r-sans, sans-serif) !important;
    padding: 0 14px !important; margin: 0 !important; box-shadow: none !important; min-width: 0 !important;
  }
  html body #columnHolder .passageOptionsGroup .select-version::before,
  html body #columnHolder .passageOptionsGroup .select-reference::before { content: none !important; display: none !important; }
  /* the magnifier: an icon, not a wide box (a results page keeps its search words in this segment) */
  html body #columnHolder .passageOptionsGroup .argSummary:not(:has(.select-filter)) > button.select-search {
    border-color: transparent !important; background: transparent !important; padding: 0 8px !important; width: 38px; justify-content: center;
  }
  html body #columnHolder .passageOptionsGroup .argSummary:not(:has(.select-filter)) > button.select-search::after { content: none !important; display: none !important; }
  html body #columnHolder .passageOptionsGroup .argSummary > button.select-search .glyphicon { margin-right: 0 !important; font-size: 17px !important; color: var(--e4r-ink, #1f1c17) !important; }
  html body #columnHolder .passageOptionsGroup .argSummary > button.select-filter { border-left: 1.5px solid var(--e4r-tan-line, #dccfae) !important; }

  /* Type ref box */
  .passageOptionsGroup .e4-typeref-wrap { display: inline-flex; align-items: center; }
  .passageOptionsGroup input.e4-typeref {
    width: 150px; height: 38px; padding: 0 10px; border: 1.5px solid var(--e4r-tan-line, #dccfae); border-radius: 8px; background: var(--e4r-card, #fff);
    font: 400 15px/1 var(--e4r-sans, sans-serif); color: var(--e4r-ink, #1f1c17); outline: 0; box-shadow: none;
  }
  .passageOptionsGroup input.e4-typeref::placeholder { color: var(--e4r-mut, #7a7368); opacity: 1; }
  .passageOptionsGroup input.e4-typeref:focus { border-color: var(--e4r-acc, #8a4f1d); box-shadow: 0 0 0 2px var(--e4r-tan-accs, #e6c99a); }
  .passageOptionsGroup input.e4-typeref.e4-typeref-bad { border-color: #b3261e; }

  /* menu buttons are interface, not text: a click on them must not clear the reader's selection (Copy verses... copies the selection) */
  .passageOptionsGroup .e4-more, .passageOptionsGroup .e4-view, .passageOptionsGroup .e4-help-btn { -webkit-user-select: none; user-select: none; }

  /* Quick view */
  .passageOptionsGroup .e4-view { order: 1; position: relative; display: inline-block; }
  .passageOptionsGroup .e4-view > a.dropdown-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1.5px solid var(--e4r-tan-line, #dccfae); border-radius: 8px;
    background: var(--e4r-card, #fff); color: var(--e4r-ink, #1f1c17) !important; font: 600 15px/1 var(--e4r-sans, sans-serif); text-decoration: none; cursor: pointer;
  }
  .passageOptionsGroup .e4-view.e4-view-off > a.dropdown-toggle { color: var(--e4r-mut, #7a7368) !important; }
  .e4-caret { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--e4r-acc, #8a4f1d); }
  .passageOptionsGroup .e4-view-menu { min-width: 260px; padding: 6px 0; background: var(--e4r-tan-bg, #f4ecd8); border: 1px solid var(--e4r-tan-line, #dccfae); border-radius: 10px; left: 0; right: auto; }
  .passageOptionsGroup .e4-view-menu .e4-view-holder { list-style: none; }
  .passageOptionsGroup .e4-view-menu .e4-view-holder h2 { display: none !important; }
  .passageOptionsGroup .e4-view-menu .e4-view-holder > div { background: transparent !important; border: 0 !important; padding: 0 !important; }
  .passageOptionsGroup .e4-view-menu ul.displayModes { margin: 0; padding: 0; list-style: none; }
  .passageOptionsGroup .e4-view-menu .e4-view-none { padding: 8px 16px; color: var(--e4r-mut, #7a7368); font: 400 14px/1.4 var(--e4r-sans, sans-serif); list-style: none; }

  /* the right end: gear, ?, More, then expand, +, X */
  html body #columnHolder .passageOptionsGroup > .pull-right { display: flex; align-items: center; }
  .passageOptionsGroup > .pull-right > .settingsDropdown { order: 1; }
  .passageOptionsGroup > .pull-right > .e4-help-btn { order: 2; }
  .passageOptionsGroup > .pull-right > .e4-more { order: 3; }
  .passageOptionsGroup > .pull-right > span:has(> .resizePanel) { order: 4; }
  .passageOptionsGroup > .pull-right > .openNewPanel { order: 5; }
  .passageOptionsGroup > .pull-right > .closeColumn { order: 6; }
  .passageOptionsGroup > .pull-right > .copyDropdown { order: 7; }
  .passageOptionsGroup > .pull-right > .nextPreviousChapterGroup { order: 8; }
  html body #columnHolder .passageOptionsGroup > .pull-right .e4-help-btn,
  html body #columnHolder .passageOptionsGroup > .pull-right .e4-more > a.dropdown-toggle {
    width: 34px; height: 34px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 999px; margin-left: 4px; cursor: pointer;
    color: var(--e4r-bar, #22396a) !important; text-decoration: none;
  }
  html body #columnHolder .passageOptionsGroup > .pull-right .e4-help-btn:hover,
  html body #columnHolder .passageOptionsGroup > .pull-right .e4-more > a.dropdown-toggle:hover { background: var(--e4r-tan-bg, #f4ecd8); }
  .passageOptionsGroup .e4-more { position: relative; }
  .passageOptionsGroup .e4-more-menu { min-width: 230px; padding: 6px 0; background: var(--e4r-tan-bg, #f4ecd8); border: 1px solid var(--e4r-tan-line, #dccfae); border-radius: 10px; }
  .passageOptionsGroup .e4-more-menu li > a, .passageOptionsGroup .e4-view-menu li > a, .passageOptionsGroup .e4-view-menu ul.displayModes li > a {
    display: block; padding: 8px 16px; color: var(--e4r-bar, #22396a) !important; font: 400 15px/1.3 var(--e4r-sans, sans-serif); text-decoration: none; width: auto; height: auto; border-radius: 0;
  }
  .passageOptionsGroup .e4-more-menu li > a:hover, .passageOptionsGroup .e4-view-menu li > a:hover { background: var(--e4r-tan, #eadfc4); }

  /* gear: Site language */
  .passageOptionsGroup .dropdown-menu .e4-site-lang { list-style: none; margin: 8px 0 0; padding: 0; background: var(--e4r-tan, #eadfc4); border-left: 4px solid var(--e4r-tan-mut, #86765c); }
  .passageOptionsGroup .dropdown-menu .e4-site-lang > li { list-style: none; }
  .passageOptionsGroup .dropdown-menu .e4-site-lang .e4-lang-toggle { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; color: var(--e4r-bar, #22396a) !important; font: 400 15px/1.3 var(--e4r-sans, sans-serif); text-decoration: none; cursor: pointer; width: auto; height: auto; border-radius: 0; }
  .passageOptionsGroup .dropdown-menu .e4-site-lang .e4-lang-list { display: none; list-style: none; margin: 0; padding: 0 0 4px; max-height: 220px; overflow-y: auto; background: var(--e4r-paper, #fbf9f4); }
  .passageOptionsGroup .dropdown-menu .e4-site-lang > li.open .e4-lang-list { display: block; }
  .passageOptionsGroup .dropdown-menu .e4-site-lang .e4-lang-list li { list-style: none; }
  .passageOptionsGroup .dropdown-menu .e4-site-lang .e4-lang-list a { display: block; padding: 5px 16px; font: 400 14px/1.3 var(--e4r-sans, sans-serif); color: var(--e4r-bar, #22396a) !important; width: auto; height: auto; border-radius: 0; text-decoration: none; }
  .passageOptionsGroup .dropdown-menu .e4-site-lang .e4-lang-list li.active a { font-weight: 700; }

  /* ---- 3b. passage picker: "Type ref:" label outside left of the box, examples inside ---- */
  #passageSelectionModal .e4-typeref-line { display: flex; align-items: center; gap: 8px; margin: 6px 15px 6px 5px; clear: both; }
  #passageSelectionModal label.e4-typeref-label { flex: 0 0 auto; margin: 0; white-space: nowrap; font: 600 15px/1 var(--e4r-sans, sans-serif); color: var(--e4r-ink, #1f1c17); }
  #passageSelectionModal .e4-typeref-line textarea#enterYourPassage { flex: 1 1 auto; width: auto !important; margin: 0 !important; box-sizing: border-box; }
}
