/*
 * WVU Fullwidth Hero Career — front-end overrides
 *
 * The global bundled stylesheet may not be rebuilt for every small tweak.
 * This file is enqueued by the module PHP to ensure critical layout fixes
 * are applied immediately.
 */

/* If there are no child Search Button items, allow the hero to collapse. */
.wvu-fullwidth-hero-career.no-career-actions {
  min-height: 0;
}

/* Safety: the actions area is not rendered in this state, but ensure it's hidden anyway. */
.wvu-fullwidth-hero-career.no-career-actions .search-stack {
  display: none;
}

@media only screen and (min-width: 981px) {
  /*
   * Keep the search input and button row centered together, while ensuring that
   * optional tooltip/helper content does NOT change the height of the button row
   * (which otherwise makes buttons appear misaligned when only one has a tooltip).
   */
  .wvu-fullwidth-hero-career .career-buttons {
    align-items: center;

    /*
     * Alignment hardening: if helper/tooltip content is ever laid out in-flow
     * (due to CSS overrides), it can increase this container's height and push
     * buttons above the input because the stack is vertically centered.
     * Lock the row height to the button height and let helper content overflow.
     */
    height: 44px;
    overflow: visible;
  }

  .wvu-fullwidth-hero-career .career-buttons .career-search-item {
    position: relative;
  }

  .wvu-fullwidth-hero-career .career-buttons .career-search-item .tooltip-wrapper {
    position: absolute !important;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    z-index: 2;
  }
}

@media only screen and (max-width: 980px) {
  /* Ensure the search bar doesn't shrink on small screens while buttons wrap */
  .wvu-fullwidth-hero-career .career-search-item.single-input-row {
    width: 100%;
    flex: 1 1 100%;
  }

  .wvu-fullwidth-hero-career .career-search-item.single-input-row .search-input {
    width: 100%;
    min-width: 0;
  }
}
