dialog.dialog-sheet {
  --duration: 200ms;

  transition: 
    translate var(--duration) ease-in-out,
    opacity   var(--duration) ease-in-out,
    scale     var(--duration) ease-in-out,
    height    var(--duration) ease-in-out,
    display   var(--duration) ease-in-out allow-discrete;

  overflow: hidden;
  position: fixed; 
  
  width: auto;
  max-width: none; 
  height: auto;
  max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  background-color: #ffffff;
  z-index: 50;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  @media (max-width: 767px) { 
    right: 0; 
    bottom: 0; 
    left: 0; 
    top: auto; 
    margin: 0;
    border-radius: 0; 
    max-height: calc(90vh - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    box-sizing: border-box;
    padding: 2.5rem 0.25rem 0.25rem 0.25rem;
    
    &[open] {
      /* Pre-Entry State */
      @starting-style {
        translate: 0 100%;
        opacity: 0.8;
      }
    }
    /* Exiting State */
    &:not([open]) {
      translate: 0 100%;
      opacity: 0.8;
    }
  }
  
  @media (min-width: 768px) and (max-width: 1279px) { 
    top: 0; 
    left: auto; 
    border-radius: 0; 
    height: 100%;
    width: 42rem; 
    max-width: 70%;
    padding: 2rem;

    &[open] {
      /* Pre-Entry State */
      @starting-style {
        translate: 100% 0;
        opacity: 0.8;
      }
    }
    /* Exiting State */
    &:not([open]) {
      translate: 100% 0;
      opacity: 0.8;
    }
  }
  @media (min-width: 1280px) { 
    top: 50%; 
    transform: translateY(-50%);
    bottom: auto;
    height: auto;
    
    max-width: 42rem; 
    /* height: fit-content; */
    max-height: calc(100vh - 2rem);
    border-radius: 1rem;
    padding: 3rem 3rem 2rem 3rem;

    &[open] {
      /* Pre-Entry State */
      @starting-style {
        opacity: 0;
        scale: 0.90;
      }
    }
    /* Exiting State */
    &:not([open]) {
      opacity: 0;
      scale: 0.90;
    }
  }

  &::backdrop {
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 300ms ease;
  }
  &[open]::backdrop {
    background-color: rgba(0, 0, 0, 0.2);
    @starting-style {
      background-color: rgba(0, 0, 0, 0);
    }
  }
}
