@use 'apps/dashboard/src/variables' as *;

$height-status-bar: rhythm(9);

.dashboard-layout {
  display: flex;
  position: relative;
  height: calc(100vh - var(--app-topbar-height));
  overflow: hidden;

  nav {
    flex: 0 0 auto;
    width: $width-sidenav;
    transition: width $transition-slide;

    &.collapsed {
      width: 0;
    }
  }

  .dashboard-content {
    width: calc(100vw - #{$width-sidenav});
    transition: width $transition-slide;

    &.full-width {
      width: 100vw;
    }

    .status-bar {
      height: $height-status-bar;
    }

    main {
      max-height: calc(100vh - var(--app-topbar-height));
      overflow: auto;

      &.with-status-bar {
        --app-topbar-height: #{$height-top-bar + $height-status-bar};
      }
    }
  }
}
