/**
 * @file
 * AAG Detail Chrome — active on aag_collection + aag_exhibition detail pages.
 *
 * Same sticky / full-bleed pattern as aag-full-page.css. The "banner" on
 * detail pages is the node template's own <header class="aag-node-hero">
 * (rendered inside <article> inside .app__main-container). At desktop
 * widths that hero uses negative margin-left to escape the main column
 * and render full-bleed; the sticky sidebar overlays its left edge.
 */

.aag-detail-chrome {
  width: 100%;
  min-height: 100vh;
}

.aag-detail-chrome .app__container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.aag-detail-chrome .app__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.aag-detail-chrome .app__navigation {
  position: relative;
  z-index: 9999;
  isolation: isolate;
}

.aag-detail-chrome .app__main {
  position: relative;
  min-width: 0;
}

.aag-detail-chrome .app__main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
}

@media (min-width: 900px) {
  .aag-detail-chrome .app__main-container {
    position: relative;
    z-index: 50;
  }
}

.aag-detail-chrome .app__footer {
  margin-top: auto;
}

.aag-detail-chrome .aag-node-hero {
  width: 100%;
}

@media (min-width: 900px) {
  .aag-detail-chrome .app__body {
    flex-direction: row;
    align-items: flex-start;
  }

  /*
   * Sidebar pins to the site navbar's bottom. See the matching rule in
   * aag-full-page.css for the full `--aag-navbar-height` rationale —
   * JS publishes the live navbar height so the sticky stays flush
   * across admu2026's transparent/solid/further-scroll states.
   */
  .aag-detail-chrome .app__navigation {
    position: sticky;
    top: var(--aag-navbar-height, 70px);
    flex-shrink: 0;
    align-self: flex-start;
    max-height: calc(100vh - var(--aag-navbar-height, 70px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .aag-detail-chrome .app__main {
    flex: 1 1 auto;
  }

  /*
   * The node's hero escapes the main column to become full-bleed.
   * The sticky sidebar overlays its left 330px.
   *
   * Note: node templates wrap their <article> in a scoping
   * <div class="aag-layout aag-layout--detail-page">, so a strict >
   * chain from app__main-container to article would not match. Use a
   * descendant combinator for the outer portion.
   */
  .aag-detail-chrome .app__main-container .aag-node-hero,
  .aag-detail-chrome .app__main .aag-node-hero--full-bleed {
    margin-left: -330px;
    width: calc(100% + 330px);
  }
}

@media (min-width: 1200px) {
  .aag-detail-chrome .app__main-container .aag-node-hero,
  .aag-detail-chrome .app__main .aag-node-hero--full-bleed {
    margin-left: -359px;
    width: calc(100% + 359px);
  }
}
