:root {
  --sheet-transition-time: 0.5s;
}

html.nbuxSheetOpen body {
  overflow: hidden;
}

.nbuxSheet[data-status="open"] {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.nbuxSheet__overlay {
  position: fixed;
  z-index: 1001;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-black);
  opacity: 0;
  transition: none;
}

.nbuxSheet[data-status="opening"] .nbuxSheet__overlay,
.nbuxSheet[data-status="closing"] .nbuxSheet__overlay {
  transition: opacity var(--sheet-transition-time) ease-in-out;
  top: 0;
}

.nbuxSheet[data-status="opening"] .nbuxSheet__overlay,
.nbuxSheet[data-status="open"] .nbuxSheet__overlay {
  top: 0;
  opacity: 0.5;
}

.nbuxSheet__sheet {
  display: grid;
  grid-template-rows: auto 1fr;
  position: fixed;
  z-index: 1002;
  bottom: -100%;
  right: 0;
  width: 100%;
  height: calc(100% - 5.5rem);
  box-sizing: border-box;
  transition: none;
}

.nbuxSheet[data-status="opening"] .nbuxSheet__sheet,
.nbuxSheet[data-status="closing"] .nbuxSheet__sheet {
  transition: bottom var(--sheet-transition-time) ease-in-out;
}

.nbuxSheet[data-status="opening"] .nbuxSheet__sheet,
.nbuxSheet[data-status="open"] .nbuxSheet__sheet {
  bottom: 0;
}

.nbuxSheet__header {
  background: #f8f8f8;
  border-radius: 8px 8px 0 0;
  display: flex;
  font-size: var(--font-body-large-font-size);
  line-height: var(--font-body-large-line-height);
  font-weight: bold;
  justify-content: center;
  align-items: center;
  min-height: 5rem;
}

.nbuxSheet__content {
  padding: 1rem;
  background: #ffffff;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nbuxSheet__closeButton {
  position: fixed;
  z-index: 1003;
  top: -88px;
  right: 0;
  -webkit-appearance: none;
  border: 0;
  border-radius: 100px;
  width: 3.5rem;
  height: 3.5rem;
  margin: 1rem;
  transition: none;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--elevation-2);
}
@media screen and (min-width: 768px) {
  .nbuxSheet__closeButton {
    margin: 2rem;
  }
}

.nbuxSheet[data-status="opening"] .nbuxSheet__closeButton,
.nbuxSheet[data-status="closing"] .nbuxSheet__closeButton {
  transition: top var(--sheet-transition-time) ease-in-out;
}

.nbuxSheet[data-status="opening"] .nbuxSheet__closeButton,
.nbuxSheet[data-status="open"] .nbuxSheet__closeButton {
  top: 0;
}

@media screen and (min-width: 768px) {
  .nbuxSheet__sheet {
    bottom: 0;
    right: -100%;
    height: 100%;
    box-sizing: border-box;
    transition: none;
    width: 48%;
  }

  .nbuxSheet[data-status="opening"] .nbuxSheet__sheet,
  .nbuxSheet[data-status="closing"] .nbuxSheet__sheet {
    transition: right var(--sheet-transition-time) ease-in-out;
  }

  .nbuxSheet[data-status="opening"] .nbuxSheet__sheet,
  .nbuxSheet[data-status="open"] .nbuxSheet__sheet {
    right: 0;
  }

  .nbuxSheet__header {
    border-radius: 0;
  }

  .nbuxSheet__closeButton {
    right: 48%;
  }
}

@media screen and (min-width: 1024px) {
  .nbuxSheet__sheet {
    width: 30%;
  }

  .nbuxSheet__closeButton {
    right: 30%;
  }
}
