/* default */
:host {
  position: absolute;
  display: flex;
  contain: strict;
  z-index: 2002;
  left: 0;
  top: 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  visibility: hidden;
  width: 100vw;
  height: 100vh;
}

:host(.open) {
  visibility: visible;
}

.--c-modal-backdrop {
  inset: 0px;
  display: block;
  position: absolute;
  transform: translateZ(0px);
  contain: strict;
  touch-action: none;
  background-color: var(--color-modal-backdrop);
  opacity: 0;
}

.--c-modal-backdrop.--c-modal-backdrop-dismiss {
  cursor: pointer;
}

.--c-modal-backdrop.--c-modal-hide-backdrop {
  background-color: transparent;
}

.--c-modal-contents {
  position: absolute;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow: hidden;
  background: var(--color-modal-bg);
  color: var(--color-modal-text);
  width: 480px;
  height: 100%;
  right: 0;
  box-shadow: rgba(15, 15, 15, 0.04) 0px 0px 0px 1px, rgba(15, 15, 15, 0.03) 0px 3px 6px, rgba(15, 15, 15, 0.06) 0px 9px 24px;
  transform: translateX(100%);
}

/* size */
:host(.small) .--c-modal-contents {
  width: 320px;
}

:host(.large) .--c-modal-contents {
  width: 640px;
}

:host(.xlarge) .--c-modal-contents {
  width: 960px;
}