dialog.dialog {
  --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-y: auto; 
  position: fixed; 
  
  border-radius: 0.5rem; 
  width: auto;
  max-width: none; 
  max-height: 100vh;
  background-color: #ffffff;
  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;
    
    &[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%;


    &[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) { 
    left: 0;
    border-radius: 0.5rem; 
    max-width: 42rem; 
    height: max-content;
    
    &[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);
    }
  }
}
