.popups {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding-top: var(--header--h);
  padding-bottom: var(--footer--h);
  height: 100dvh;
  background-color: rgba(117, 117, 117, .5);
  backdrop-filter: blur(.5rem);

  &:not([hidden]) {
    display: flex;
    flex-flow: column nowrap;
  }
}

.popup {
  position: relative;
  margin-inline: auto;
  overflow: hidden;
  height: 0;
  opacity: 0;
  display: flex;
  flex-flow: column nowrap;
  transition: opacity .3s ease-in-out;
  width: min(100%, var(--popup--maw, 100%));

  @container app (width > 430px) {
    --popup--maw: 360px;
  }

  &:not([hidden]) {
    height: 100%;
    opacity: 1;
  }

  &.bg-light {
    background-color: #FFFFFF;
  }

  &.bg-dark {
    background-color: #F1F4F6;
  }
}

.popup-header {
  position: relative;
  margin-block: .5rem;
  padding-inline: .5rem;
}

.popup-main {
  padding-inline: .5rem;
  overflow-y: auto;

  .wrapper {
    padding-bottom: 1rem;
    overflow: hidden;
  }
}

.popup-footer {
  margin-top: auto;
}

