/* e4-fixr1.css (lane/redesign-fixr1, FIX-R1 on the fallback 9a95a8a5; BAM14 FIX-R1-FALLBACK.md 12d327d2). Loaded AFTER css/e4-merge-fix.css
   (overlay section 120 FX1). Override file: css/e4-redesign.css is not edited for rows X1-X3 (only the named X5 token change).
   Colours are the design's tokens (--e4r-*, css/e4-redesign.css). Desktop only (768 px up), the same gate as the design file. */

/* ---------- X1 (F-3): search dialog glitch ----------
   The design makes #searchHdrTable a column flex box and gives `order` to four children only (.header 1, #userTextInput 2,
   #searchRangeButton 3, #basic_search_help_text 4). STEP's other children have order 0, so they float ABOVE the language tabs:
   #searchButton (shown while typing: an empty 707x25 bar that pushed the box 25 px down) and #search_table (the suggestion
   list that STEP fills after Enter, which pushed the box 282 px down). Fix: the list takes order 5 (below the box, "Books:" and the
   examples); the search button keeps its clickable place but over the box's own magnifier ring (net height 0, so nothing moves). */
@media (min-width: 768px) {
  #searchSelectionModal #searchHdrTable > #search_table { order: 5; margin-top: 18px; width: 100%; }
  #searchSelectionModal #searchHdrTable > #searchButton {
    order: 2; position: relative; z-index: 2; align-self: flex-start;
    width: 48px; height: 56px; margin: -56px 0 0 0; padding: 0; min-height: 0;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
    color: transparent !important; font-size: 0; line-height: 0; cursor: pointer; overflow: hidden;
  }
  #searchSelectionModal #searchHdrTable > #searchButton:focus-visible { outline: 2px solid var(--e4r-acc); outline-offset: -4px; border-radius: 12px; }
}

/* ---------- X2 (F-4): no old teal on main pages ----------
   STEP's #013849 / #012a37 (and the grey #5d5d5d / #9fb3ba of the unselected panel buttons) come from STEP's own colour variable and from
   css/e4-theme.css. They are restyled here with the design's tokens (--e4r-*): headings in the design's heading colour (--e4r-bar, as
   the dialog titles and pane headings), the selected button in the design's selected style (--e4r-acc fill, white text, as
   .stepButton.stepPressedButton), the unselected button in the design's plain style (card fill, --e4r-acc text, --e4r-tan-line edge). */
@media (min-width: 768px) {
  /* column headings NASB / SBLG on the first-open page */
  th.comparingVersionName { color: var(--e4r-bar) !important; }
  /* the C tab's Copy button = the design's primary button (the selected-button style) */
  #copy .e4-copy-btn.btn-primary, #copy .e4-copy-btn.btn-primary:focus {
    background: var(--e4r-acc) !important; border: 1.5px solid var(--e4r-acc) !important; color: #ffffff !important;
    border-radius: var(--e4r-r-sm); font: 700 16px/1 var(--e4r-sans); box-shadow: none; }
  #copy .e4-copy-btn.btn-primary:hover:not([disabled]) { background: var(--e4r-acc) !important; box-shadow: 0 0 0 4px var(--e4r-accs); }
  #copy .e4-copy-btn.btn-primary[disabled] { opacity: .5; }
}

/* ---------- X2 + X3 (F-4, F-5): the panel-choice buttons, search dialog AND passage dialog ----------
   One look for both ("Show results in" = Current panel / New panel; passage dialog = Current panel / New panel / Append): separate pill buttons
   in the design's style. STEP's control underneath is untouched (the same button.e4-loc group of section 22 / js/e4/e4_dialogs.js, the hidden
   <select id="displayLocation">). Words unchanged. Specificity: id + id + classes, above css/e4-theme.css's teal rules (RP7) and the
   joined-group look. */
@media (min-width: 768px) {
  #searchSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc,
  #passageSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc {
    background: var(--e4r-card) !important; background-image: none !important; color: var(--e4r-acc) !important;
    border: 1.5px solid var(--e4r-tan-line) !important; border-radius: 999px !important; margin-left: 4px; padding: 4px 14px;
    font: 600 13px/1.3 var(--e4r-sans); box-shadow: none; }
  #searchSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc:first-child,
  #passageSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc:first-child { margin-left: 0; }
  #searchSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc:hover,
  #passageSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc:hover { background: var(--e4r-tan-bg) !important; }
  #searchSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc.active,
  #searchSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc.active:hover,
  #passageSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc.active,
  #passageSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc.active:hover {
    background: var(--e4r-acc) !important; color: #ffffff !important; border-color: var(--e4r-acc) !important; z-index: 2; }
  #searchSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc:focus-visible,
  #passageSelectionModal #displayLocForm .e4-loc-group > .btn.e4-loc:focus-visible { outline: 2px solid var(--e4r-acc); outline-offset: 2px; z-index: 3; }
}

/* ---------- X6 (F-1 at 390 px): the chapter-end footer reads "? copyright info" with a space ----------
   The ? icon is drawn by css/e4-merge-fix.css (a.e4-cr .e4-cr-q::before) and the design's icon styling starts at 768 px, so on a phone the ? sat
   against the words ("?copyright info"). One line, phones only: the same gap the design draws on desktop. */
@media (max-width: 767px) {
  a.e4-cr .e4-cr-q { margin-right: .4em; }
}
