@layer uniform.components {
.u-enter,
.u-exit { display: grid; }

.u-enter > *,
.u-exit > * {
  min-height: 0;
  overflow: hidden;
}

.u-enter { animation: u-enter var(--u-motion-enter) var(--u-motion-ease) both; }

.u-exit { animation: u-exit var(--u-motion-exit) var(--u-motion-ease) both; }

@keyframes u-enter {
  from {
    grid-template-rows: 0fr;
    opacity: 0;
  }

  to {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}

@keyframes u-exit {
  from {
    grid-template-rows: 1fr;
    opacity: 1;
  }

  to {
    grid-template-rows: 0fr;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .u-enter,
  .u-exit { animation-duration: 1ms; }
}
}
