/* Workbench navigation only: remove the second full-width breadcrumb strip.
   Reuse its location as a transparent positioning layer for one search button.
   Original left-sidebar mode and the existing native search dialog are untouched. */
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-context {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  top:calc(var(--gtt-nav-height) + 7px)!important;
  height:39px!important;
  min-height:0!important;
  padding:0!important;
  gap:0!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  pointer-events:none;
  z-index:235!important;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-context
  :is(.wb2-context-section,.wb2-context-divider,.wb2-context-title) {
  display:none!important;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-context .wb2-floating-search {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  width:214px!important;
  min-width:0!important;
  max-width:calc(100vw - 34px)!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 14px!important;
  margin:0!important;
  pointer-events:auto!important;
  border-radius:12px!important;
  border:1px solid rgba(170,215,255,.43)!important;
  color:#eaf7ff!important;
  background:linear-gradient(145deg,rgba(92,151,217,.26),rgba(20,49,90,.69))!important;
  box-shadow:0 5px 20px rgba(2,11,29,.15),inset 0 1px rgba(238,248,255,.15)!important;
  font-size:12px!important;
  font-weight:700!important;
  cursor:pointer;
}
/* The older header hides Search labels below 1260px; the floating
   desktop button has its own width and should keep its label visible. */
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-context .wb2-floating-search .wb2-search-label{
  display:inline!important;
  font-size:12px!important;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-context .wb2-floating-search:hover {
  background:linear-gradient(145deg,rgba(117,181,245,.36),rgba(35,75,128,.72))!important;
  border-color:rgba(192,232,255,.72)!important;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-actions .wb2-mobile-search{
  display:none!important;
}

/* Editor pages are full-bleed and already hide the contextual strip.
   Preserve their old desktop search action in the top navigation instead. */
@media(min-width:861px){
  html[data-gtt-design-mode="workbench"] body[data-theme]:is(
    [data-current-view="planner-v2"],
    [data-current-view="planner-v4"],
    [data-current-view="world-planner-v2"]
  ) #wb2-shell .wb2-actions .wb2-mobile-search {
    display:inline-flex!important;
  }
}

/* The phone header already has its own compact search action, and does not
   have a secondary context region. Leave that layout/target size intact. */
@media(max-width:860px), (pointer:coarse) and (orientation:landscape) and (max-height:600px) and (max-width:1100px){
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-context {
    display:none!important;
  }
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-actions .wb2-mobile-search {
    display:inline-flex!important;
  }
  html[data-gtt-design-mode="workbench"] body[data-theme]:is(
    [data-current-view="planner-v2"],
    [data-current-view="planner-v4"],
    [data-current-view="world-planner-v2"]
  ) #wb2-shell .wb2-actions .wb2-mobile-search {
    display:none!important;
  }
}
