.sheet-holder {
  position: relative;
}

.sheet-holder .sheet-container:nth-last-of-type(1) .sheet-overlay {
  opacity: 0;
  visibility: hidden;
}

.sheet-holder .sheet-container:nth-last-of-type(2) .sheet-overlay {
  opacity: 0.12;
  visibility: visible;
}

.sheet-holder .sheet-container:nth-last-of-type(3) .sheet-overlay {
  opacity: 0.12;
  visibility: visible;
}

.sheet-holder .sheet-container:nth-last-of-type(2) .sheet {
  box-shadow: 0 0 10px -5px rgba(0, 0, 0, 0.2), 0 0 24px 2px rgba(0, 0, 0, 0.14), 0 0 30px 5px rgba(0, 0, 0, 0.12);
}

/* Reveal lower sheets on the left side when stacked */
.sheet-holder .sheet-container:not(:last-child) .sheet {
  transform: translateX(-60px) !important;
  filter: brightness(0.85);
  pointer-events: none;
}

/* Ensure top sheet is not affected */
.sheet-holder .sheet-container:last-child .sheet {
  filter: none;
  pointer-events: auto;
}

.sheet-overlay {
  opacity: 0.12;
  transition: all 0.4s;
  background: black;
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  visibility: hidden;
  z-index: 2002;
}

.sheet {
  transition: transform 0.4s;
  background: #f3f3f4;
  bottom: 0;
  left: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 2002;
  flex-direction: column;
  display: flex;
  flex-wrap: nowrap;
}

.sheet .sheet-content {
  flex: 1 1 auto;
  order: 3;
  overflow-y: auto;
  position: relative;
  margin: 0 auto;
  padding: 24px 24px 16px;
}

@media (min-width: 768px) {
  .sheet .sheet-content {
    width: 768px;
  }
}

@media (min-width: 1160px) {
  .sheet .sheet-content {
    width: 960px;
  }
}

.sheet .sheet-header {
  order: 0;
  background: #fff;
  border-bottom: 1px solid transparent;
  border-bottom-color: #e1e1e1;
  border-radius: 2px;
  position: relative;
  box-shadow: none;
  padding: 10px 5px 10px 15px;
}

.sheet .sheet-header-actions {
  font-size: 0;
  padding-right: 24px;
  text-align: right;
  display: inline-block;
}

.sheet .sheet-scrollpane {
  order: 3;
  overflow-y: auto;
  position: relative;
  flex: 1 1 auto;
}

.sheet .sheet-scrollpane .sheet-content {
  overflow-y: visible;
  background: #ffffff;
  margin-top: 20px;
}
