/**
 * Hide Drupal's admin toolbar when an admin toggles it off
 * (the "Toggle Admin Toolbar" link in the left menu), like the D7 site.
 * goldlink.js does the same directly; this is a fallback.
 */
body.goldlink-hide-toolbar #toolbar-administration,
body.goldlink-hide-toolbar #admin-toolbar,
body.goldlink-hide-toolbar .admin-toolbar,
body.goldlink-hide-toolbar .top-bar {
  display: none !important;
}

/**
 * Desktop advisories ribbon: the content filter.
 *
 * The D7 site only had the filter in the mobile header, so the ETSU CSS
 * doesn't size it for the desktop ribbon; without this, Bootstrap's 34px
 * input and padded button are taller than the ribbon.
 */
.etsuHeader.sticky .etsuAdvisories {
  display: flex;
  align-items: center;
}
.etsuHeader.sticky .etsuAdvisories #etsuAdvisoriesPlaceholder {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
}
/* Advisories first, then the filter on the far right. */
.etsuHeader.sticky .etsuFilterContentContainer.input-group {
  order: 2;
  flex: 0 0 auto;
  width: 180px;
  margin: 2px 2px 4px 20px;
  float: none;
}
.etsuHeader.sticky .etsuFilterContentContainer .form-control,
.etsuHeader.sticky .etsuFilterContentContainer .btn {
  height: 22px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
  line-height: 20px;
  vertical-align: middle;
  box-shadow: none;
}
.etsuHeader.sticky .etsuFilterContentContainer .form-control {
  padding-left: 6px;
  padding-right: 6px;
}
.etsuHeader.sticky .etsuFilterContentContainer .btn {
  padding-left: 8px;
  padding-right: 8px;
}
/**
 * Layout Builder columns: keep each column independent, so opening a
 * channel in one column doesn't move the channels in the other.
 *
 * - Each column is a flex item; nothing in one column can wrap into or
 *   push down the other (floats stay inside their own column).
 * - Channel panels line up at the top of their column, even where the ETSU
 *   CSS makes them inline-block tiles (which otherwise line up on the text
 *   baseline and drop down when a neighbour grows).
 * - The column widths repeat Drupal's own layout CSS, in case it's missing.
 */
.layout--twocol-section,
.layout--threecol-section,
.layout--fourcol-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}
.layout--twocol-section > .layout__region,
.layout--threecol-section > .layout__region,
.layout--fourcol-section > .layout__region {
  flex: 0 1 100%;
  min-width: 0;
}
@media screen and (min-width: 40em) {
  .layout--twocol-section--50-50 > .layout__region { flex-basis: 50%; }
  .layout--twocol-section--33-67 > .layout__region--first,
  .layout--twocol-section--67-33 > .layout__region--second { flex-basis: 33.33%; }
  .layout--twocol-section--33-67 > .layout__region--second,
  .layout--twocol-section--67-33 > .layout__region--first { flex-basis: 66.66%; }
  .layout--twocol-section--25-75 > .layout__region--first,
  .layout--twocol-section--75-25 > .layout__region--second { flex-basis: 25%; }
  .layout--twocol-section--25-75 > .layout__region--second,
  .layout--twocol-section--75-25 > .layout__region--first { flex-basis: 75%; }
  .layout--threecol-section--33-34-33 > .layout__region { flex-basis: 33.33%; }
  .layout--threecol-section--25-50-25 > .layout__region { flex-basis: 25%; }
  .layout--threecol-section--25-50-25 > .layout__region--second { flex-basis: 50%; }
  .layout--threecol-section--25-25-50 > .layout__region { flex-basis: 25%; }
  .layout--threecol-section--25-25-50 > .layout__region--third { flex-basis: 50%; }
  .layout--threecol-section--50-25-25 > .layout__region { flex-basis: 25%; }
  .layout--threecol-section--50-25-25 > .layout__region--first { flex-basis: 50%; }
  .layout--fourcol-section > .layout__region { flex-basis: 25%; }
}
.layout__region .panel-etsumetro {
  vertical-align: top;
}
/* 10px of space between blocks. */
.layout__region .block,
.region .block {
  margin-bottom: 10px;
}
/* Space on the left and right of each Layout Builder column. */
.layout--twocol-section > .layout__region,
.layout--threecol-section > .layout__region,
.layout--fourcol-section > .layout__region {
  box-sizing: border-box;
  padding-left: 10px;
  padding-right: 10px;
}
.layout--onecol > .layout__region {
  box-sizing: border-box;
  padding-left: 10px;
  padding-right: 10px;
}
/* Phones: columns are stacked, so use less space. */
@media screen and (max-width: 40em) {
  .layout--twocol-section > .layout__region,
  .layout--threecol-section > .layout__region,
  .layout--fourcol-section > .layout__region {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Space between the top ribbons and the page content. */
.main-container {
  padding-top: 25px;
}

/**
 * Channel forms (Lookup Roles, term / aid year / grade period drop-downs):
 * keep the button level with the text box or drop-down.
 *
 * Drupal wraps the field in a form-group with its label and help text, so
 * Bootstrap's input-group would centre the button on all three; line them
 * up at the top instead.
 */
form[id^="banner-channels-"] .input-group {
  display: flex;
  align-items: flex-start;
  width: 100%;
}
/* The field is only as wide as it needs to be, so the button sits right
   after it instead of at the far end of the row. */
form[id^="banner-channels-"] .input-group > .form-group {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 90px);
  margin-bottom: 0;
}
form[id^="banner-channels-"] .input-group > .form-group .form-control {
  /* Fill the field's width (set by the widest of the box, its label and its
     help text), so the button always sits right at its edge. */
  width: 100%;
  min-width: 200px;
  max-width: 100%;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
/* Drop-downs styled by bootstrap-select: ignore the width it measured (often
   wrong, because the panel is closed when the page loads) and size to the
   options instead. */
form[id^="banner-channels-"] .input-group > .form-group .bootstrap-select:not(.input-group-btn),
form[id^="banner-channels-"] .input-group > .form-group .bootstrap-select.form-control {
  display: block;
  width: 100% !important;
  min-width: 200px;
  max-width: 100%;
  float: none;
}
/* Label and help text under the field, not beside it. */
form[id^="banner-channels-"] .input-group > .form-group > label,
form[id^="banner-channels-"] .input-group > .form-group > .help-block {
  display: block;
}
form[id^="banner-channels-"] .input-group > .form-group .bootstrap-select > .dropdown-toggle {
  width: 100%;
  height: 34px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
form[id^="banner-channels-"] .input-group > .input-group-btn {
  display: block;
  width: auto;
  flex: 0 0 auto;
}
form[id^="banner-channels-"] .input-group > .input-group-btn .btn {
  height: 34px;
  margin: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Layout Builder's side panel and pop-ups appear above the ribbons. */
.ui-dialog-off-canvas,
.ui-dialog {
  z-index: 1300 !important;
}
.ui-widget-overlay {
  z-index: 1290 !important;
}

/* 25px of space below every channel box (on the block that wraps it). */
.block[class*="block-banner-channels"] {
  padding-bottom: 25px !important;
}
/**
 * Collapsible sections in Layout Builder's side panel (and other Drupal
 * side panels / dialogs).
 *
 * Drupal resets all theme CSS inside the side panel (#drupal-off-canvas-wrapper)
 * so admin forms look the same in every theme. That reset also removes
 * Bootstrap's "display: none" for closed sections, so the toggle links
 * change state but the options stay visible. Put just that rule back.
 */
#drupal-off-canvas-wrapper .collapse:not(.in),
.ui-dialog .collapse:not(.in) {
  display: none !important;
}
#drupal-off-canvas-wrapper .collapse.in,
.ui-dialog .collapse.in {
  display: block !important;
}
#drupal-off-canvas-wrapper .collapsing,
.ui-dialog .collapsing {
  display: block !important;
  position: relative;
  height: 0;
  overflow: hidden !important;
  transition: height 0.35s ease;
}

/* Light oatmeal background for content blocks (Content 4m~F~R Blocks, and blocks
   created directly in Layout Builder). */
.block-block-content,
[class*="block-inline-block"] {
  background-color: #f3ede2;
  border: 1px solid #e2d8c6;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 25px;
}
.block-block-content > :first-child,
[class*="block-inline-block"] > :first-child {
  margin-top: 0;
}
/* Content blocks containing <div class="no-box"> keep a plain, transparent background. */
.block-block-content:has(.no-box),
[class*="block-inline-block"]:has(.no-box) {
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
/* Images no taller than 55% of the window, keeping their proportions.
   A max-width set on the image itself (e.g. style="max-width:45%") still applies. */
.img-55vh img {
  max-height: 55vh;
  max-width: 100%;
  width: auto !important;
  height: auto !important;
}