/* ==========================================================================
   Universal Admin Layout Protection (Applies Globally to All Screen Widths)
   ========================================================================== */

/* --- 1. GLOBAL / MOBILE BASELINE STATES --- */
body.toolbar-fixed #header-wrapper,
body.toolbar-fixed #sub-header-wrapper {
  top: 39px !important; /* Safely pushes your fixed headers below the admin bar on mobile devices */
}

/* --- 2. WIDESCREEN DESKTOP EXTENSIONS (769px and Above) --- */
@media (min-width: 769px) {

  /* When the desktop layout has both rows active (toolbar bar + link shortcut tray) */
  body.toolbar-fixed.toolbar-tray-open #header-wrapper,
  body.toolbar-fixed.toolbar-tray-open #sub-header-wrapper {
    top: 79px !important; /* Pushes headers down further to clear both administrative rows seamlessly */
  }
}

/* ==========================================================================
   Adminimal Drop-Down Shield: Isolated Flyout Column Row Fix
   ========================================================================== */

/*
   1. the 40px pushed the main page down to the right position getting the
   correct page view as without adminimal (live and dev testing)
*/
.toolbar-loading #toolbar-administration {
  overflow: hidden;
  margin-bottom: 40px;
}
/*
   2. Isolate the nested flyout trays.
   Targets list elements that are children of an active dropdown row.
   This safely bypasses the top horizontal bar.
*/
.toolbar-tray-horizontal .toolbar-menu-administration ul li.menu-item--expanded.hover-intent ul li.menu-item,
.toolbar-tray-horizontal .toolbar-menu-administration ul li.menu-item--expanded.hover-intent ul ul li.menu-item {
  display: block !important;          /* Stops Bootstrap from forcing items side-by-side */
  float: none !important;             /* Clears horizontal floats inside the column box */
  width: 100% !important;             /* Stretches the row to occupy the full 200px footprint */
  padding-right: 0 !important;        /* Strips framework padding metrics completely */
  padding-left: 0 !important;
  box-sizing: border-box !important;
}

/*
   2. Ensure full anchor width expansion.
   Forces nested clickable link tags to scale to 100% of their parent box boundaries.
*/
.toolbar-tray-horizontal .toolbar-menu-administration ul li.menu-item--expanded.hover-intent ul a,
.toolbar-tray-horizontal .toolbar-menu-administration ul li.menu-item--expanded.hover-intent ul ul a {
  display: block !important;          /* Reverts inline strings to solid structural blocks */
  width: 100% !important;             /* Fills out the entire column span */
  text-align: left !important;        /* Keeps internal menu text organized cleanly */
  box-sizing: border-box !important;
}
