/* Retter-Portal v1.4.00
   TESTVERSION-Leiste reserviert genau einmal Platz: Sidebar und normaler Header
   beginnen direkt darunter, ohne zusätzlichen Leerraum. */

body.release-test-environment{
  --rp-testbar-height:40px;
}

/* Interne Portalansicht: Banner aus dem normalen Dokumentfluss nehmen. */
body.release-test-environment > .release-test-banner:not(.release-test-banner--public){
  position:fixed!important;
  inset:0 0 auto 0!important;
  top:0!important;
  z-index:10000!important;
  width:100%!important;
  height:var(--rp-testbar-height)!important;
  min-height:var(--rp-testbar-height)!important;
  max-height:var(--rp-testbar-height)!important;
  margin:0!important;
  box-sizing:border-box!important;
}

/* Die komplette App wird exakt um die Höhe der Testleiste nach unten gesetzt. */
body.release-test-environment > .release-test-banner:not(.release-test-banner--public) + .app-shell{
  margin-top:var(--rp-testbar-height)!important;
  min-height:calc(100vh - var(--rp-testbar-height))!important;
}

/* Sidebar ist sticky/fixed-artig und braucht den Testleisten-Offset explizit. */
body.release-test-environment > .release-test-banner:not(.release-test-banner--public) + .app-shell > .sidebar{
  top:var(--rp-testbar-height)!important;
  height:calc(100vh - var(--rp-testbar-height))!important;
  max-height:calc(100vh - var(--rp-testbar-height))!important;
}

/* Der normale Header sitzt bereits durch den App-Offset korrekt darunter.
   Kein zusätzlicher 40px-Top-Offset mehr – genau das beseitigt den Leerraum. */
body.release-test-environment > .release-test-banner:not(.release-test-banner--public) + .app-shell > .main > .topbar{
  top:0!important;
}

@media(max-width:900px){
  body.release-test-environment{
    --rp-testbar-height:46px;
  }
  body.release-test-environment > .release-test-banner:not(.release-test-banner--public) + .app-shell > .sidebar,
  body.release-test-environment > .release-test-banner:not(.release-test-banner--public) + .app-shell .sidebar{
    top:var(--rp-testbar-height)!important;
    height:calc(100dvh - var(--rp-testbar-height))!important;
    max-height:calc(100dvh - var(--rp-testbar-height))!important;
  }
}
