//
// Dashboard
//

.pmf-charts {
  height: 20rem;
}

#pmf-admin-layout-sidenav {
  display: flex;

  #pmf-admin-layout-sidenav_nav {
    flex-basis: $pmf-admin-sidenav-base-width;
    flex-shrink: 0;
    transition: transform 0.15s ease-in-out;
    z-index: $pmf-admin-zindex-sidenav;
    transform: translateX(-$pmf-admin-sidenav-base-width);
  }

  #pmf-admin-layout-sidenav_content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    flex-grow: 1;
    min-height: calc(100vh - #{$pmf-admin-topnav-base-height});
    margin-left: -$pmf-admin-sidenav-base-width;
  }
}

.pmf-admin-sidenav-toggled {
  #pmf-admin-layout-sidenav {
    #pmf-admin-layout-sidenav_nav {
      transform: translateX(0);
    }

    #pmf-admin-layout-sidenav_content {
      &:before {
        content: '';
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: $black;
        z-index: $pmf-admin-zindex-content;
        opacity: 0.5;
        transition: opacity 0.3s ease-in-out;
      }
    }
  }
}

@include media-breakpoint-up(lg) {
  #pmf-admin-layout-sidenav {
    #pmf-admin-layout-sidenav_nav {
      transform: translateX(0);
    }

    #pmf-admin-layout-sidenav_content {
      margin-left: 0;
      transition: margin 0.15s ease-in-out;
    }
  }

  .pmf-admin-sidenav-toggled {
    #pmf-admin-layout-sidenav {
      #pmf-admin-layout-sidenav_nav {
        transform: translateX(-$pmf-admin-sidenav-base-width);
      }

      #pmf-admin-layout-sidenav_content {
        margin-left: -$pmf-admin-sidenav-base-width;

        // Removes the sidenav overlay on screens larger than the med breakpoint
        &:before {
          display: none;
        }
      }
    }
  }
}

// Ensure bottom spacing for Masonry grid so last row doesn't stick to the footer
.masonry-grid {
  padding-bottom: map-get($spacers, 4); // equals .mb-4 (≈1.5rem)
}
