/* 7.62: one header row, with a coordinated 1200px navigation breakpoint.
   Loaded after color-mode.css. Page/footer breakpoints remain at 900px. */
body.esv-mobile-journey .esv-header .esv-header-inner {
  flex-wrap:nowrap !important;
  align-items:center !important;
}
body.esv-mobile-journey .esv-header .esv-header-actions {
  flex:0 0 auto !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:10px !important;
}
/* The native select retains its accessible name and Auto / Hell / Dunkel choices. */
body .esv-header .esv-color-control {
  order:3;
  flex:0 0 44px;
  width:44px;
  height:44px;
  box-sizing:border-box;
  border:1px solid var(--esv-color-control-border);
}
body .esv-header .esv-color-select {
  width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  opacity:0;
  font-size:16px;
  cursor:pointer;
}
body .esv-header .esv-color-control svg { left:12px; }
body .esv-header .esv-color-control:focus-within {
  outline:3px solid var(--esv-color-focus);
  outline-offset:3px;
}

@media(min-width:1200px) {
  /* Balance the menu between the brand and the fixed actions on the right. */
  body.esv-mobile-journey .esv-header .esv-header-actions {
    flex:1 1 auto !important;
  }
  body.esv-mobile-journey .esv-header .esv-header-actions .esv-nav {
    flex:0 0 auto !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
  body.esv-mobile-journey .esv-header .esv-header-inner {
    min-height:78px !important;
    padding:10px 0 !important;
    gap:20px !important;
  }
  body.esv-mobile-journey .esv-header .esv-brand {
    flex:0 1 300px !important;
    min-width:0 !important;
    gap:12px !important;
  }
  body.esv-mobile-journey .esv-header .esv-logo {
    flex:0 0 58px !important;
    width:58px !important;
    margin:0 !important;
  }
  body.esv-mobile-journey .esv-header .esv-logo img { width:58px !important; height:58px !important; object-fit:contain !important; }
  body.esv-mobile-journey .esv-header .esv-brand-copy { min-width:0 !important; max-width:230px !important; }
  body.esv-mobile-journey .esv-header .wp-block-site-title { font-size:18px !important; line-height:1.25 !important; margin:0 !important; }
  body.esv-mobile-journey .esv-header .esv-subtitle { font-size:11px !important; line-height:1.4 !important; margin-top:4px !important; }
  body.esv-mobile-journey .esv-header .esv-nav { font-size:.9rem !important; }
  body.esv-mobile-journey .esv-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
    flex-wrap:nowrap !important;
    column-gap:16px !important;
  }
  body.esv-mobile-journey .esv-header .esv-join-button .wp-block-button__link {
    font-size:.9rem !important;
    padding:12px 15px !important;
    min-height:44px !important;
    white-space:nowrap !important;
  }
}

@media(max-width:1199px) {
  body.esv-mobile-journey .esv-header .esv-header-actions { margin-left:auto !important; }
  body.esv-mobile-journey .esv-header .esv-join-button { display:none !important; }
  body.esv-mobile-journey .esv-header .esv-color-control { order:0; }
  body.esv-mobile-journey .esv-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display:none !important; }
  body.esv-mobile-journey .esv-header .wp-block-navigation__responsive-container-open {
    display:flex !important; align-items:center !important; justify-content:center !important;
    width:44px !important; height:44px !important; min-width:44px !important; min-height:44px !important;
    padding:0 !important; margin:0 !important; border:1px solid var(--esv-color-control-border) !important;
    border-radius:10px !important; background:var(--esv-color-surface-2) !important; color:var(--esv-color-text) !important;
  }
  body.esv-mobile-journey .esv-header .wp-block-navigation__responsive-container.is-menu-open {
    display:flex !important; position:fixed !important; inset:0 !important; z-index:99999 !important;
    width:100% !important; height:100dvh !important; max-height:100dvh !important; max-width:none !important;
    box-sizing:border-box; overflow-y:auto !important; overscroll-behavior-y:contain;
    padding:max(12px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)) !important;
    background:var(--esv-color-surface) !important; color:var(--esv-color-text) !important;
  }
  body.esv-mobile-journey .esv-header .wp-block-navigation__responsive-container-close {
    display:grid !important; place-items:center; top:14px !important; right:14px !important;
    width:48px !important; height:48px !important; min-width:48px; min-height:48px;
    border:1px solid var(--esv-color-control-border) !important; border-radius:10px !important;
    background:var(--esv-color-surface-2) !important; color:var(--esv-color-text) !important;
  }
  body.esv-mobile-journey .esv-header .is-menu-open .wp-block-navigation__responsive-container-content {
    width:100% !important; max-width:560px !important; margin:0 auto !important;
    padding-top:74px !important; align-items:stretch !important; gap:12px !important;
  }
  body.esv-mobile-journey .esv-header .is-menu-open .wp-block-navigation__container {
    display:flex !important; flex-direction:column !important; align-items:stretch !important;
    width:100% !important; gap:0 !important;
  }
  body.esv-mobile-journey .esv-header .is-menu-open .wp-block-navigation-item { width:100% !important; align-items:stretch !important; }
  body.esv-mobile-journey .esv-header .is-menu-open a.wp-block-navigation-item__content {
    display:flex !important; align-items:center !important; box-sizing:border-box;
    width:100% !important; min-height:48px !important; padding:12px 8px !important;
    white-space:normal !important; overflow-wrap:anywhere;
    border-bottom:1px solid var(--esv-color-border); font-size:1.05rem !important; line-height:1.3 !important;
  }
  body.esv-mobile-journey .esv-header .is-menu-open .wp-block-navigation__submenu-container {
    position:static !important; width:100% !important; height:auto !important; min-width:0 !important;
    margin:0 !important; padding:5px 0 10px 12px !important; box-sizing:border-box;
    opacity:1 !important; visibility:visible !important;
    border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important;
  }
  body.esv-mobile-journey .esv-header .esv-menu-collapsible {
    display:grid !important; grid-template-columns:minmax(0,1fr) 44px !important;
    gap:0 !important; width:100% !important; align-items:center !important;
  }
  body.esv-mobile-journey .esv-header .esv-menu-collapsible > .wp-block-navigation-submenu__toggle { display:none !important; }
  body.esv-mobile-journey .esv-header .esv-menu-collapsible > .wp-block-navigation__submenu-container { grid-column:1/-1; }
  body.esv-mobile-journey .esv-header .esv-menu-collapsible > .wp-block-navigation__submenu-container[hidden] { display:none !important; }
  body.esv-mobile-journey .esv-header .esv-menu-expand {
    display:grid !important; place-items:center; box-sizing:border-box;
    width:44px; height:44px; padding:10px; cursor:pointer;
    border:1px solid var(--esv-color-control-border); border-radius:9px;
    background:var(--esv-color-surface-2); color:var(--esv-color-link);
  }
  body.esv-mobile-journey .esv-header .esv-menu-expand svg { width:20px; height:20px; transform:rotate(90deg); }
  body.esv-mobile-journey .esv-header .esv-menu-expand[aria-expanded="true"] svg { transform:rotate(-90deg); }
  body.esv-mobile-journey .esv-header .esv-mobile-menu-actions {
    display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    width:100% !important; gap:10px !important; padding:0 !important; margin:0 0 8px !important;
  }
  body.esv-mobile-journey .esv-header .esv-mobile-menu-actions a {
    display:flex !important; justify-content:center; align-items:center;
    min-height:46px; padding:10px; box-sizing:border-box; border:1px solid var(--esv-color-link);
    border-radius:10px; font-size:.9rem; line-height:1.3; font-weight:800; text-align:center; white-space:normal;
  }
  body.esv-mobile-journey .esv-header .esv-mobile-menu-trial { background:var(--esv-color-primary) !important; color:var(--esv-color-on-primary) !important; }
  body.esv-mobile-journey .esv-header .esv-mobile-menu-join { background:var(--esv-color-surface) !important; color:var(--esv-color-link) !important; }
}

@media(min-width:901px) and (max-width:1199px) {
  body.esv-mobile-journey .esv-header .esv-header-inner { min-height:76px !important; padding:10px 0 !important; gap:16px !important; }
  body.esv-mobile-journey .esv-header .esv-brand { flex:1 1 auto !important; gap:12px !important; }
  body.esv-mobile-journey .esv-header .esv-logo { width:56px !important; flex:0 0 56px !important; margin:0 !important; }
  body.esv-mobile-journey .esv-header .esv-logo img { width:56px !important; height:56px !important; object-fit:contain !important; }
  body.esv-mobile-journey .esv-header .wp-block-site-title { font-size:18px !important; line-height:1.25 !important; }
  body.esv-mobile-journey .esv-header .esv-subtitle { display:none !important; }
}
@media(max-width:520px) {
  body.esv-mobile-journey .esv-header .esv-mobile-menu-actions { grid-template-columns:minmax(0,1fr) !important; }
}
