src/layouts/list-layout-no-sidebar.module.css
.layout {
  --filters-width: 20rem;

  display: grid;

  height: 100dvh;
  margin-inline: auto;
  max-width: var(--layout-max-width);
  padding-inline: var(--layout-padding);

  overflow: hidden;
  will-change: contents;

  grid-template-areas:
    "header header"
    "content filters";

  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);

  @media screen and (min-width: 52rem) {
    column-gap: 1rem;
    padding-bottom: 0.25rem;
    grid-template-columns: 1fr var(--filters-width);
  }
}

.layout::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 3;
  display: none;
  opacity: 0;
}

.layout.floating-menu-open::before {
  display: block;
  opacity: 1;
  transition:
    opacity 0.2s ease-in,
    display 0.2s;
  transition-behavior: allow-discrete;
}

.filters {
  position: relative;
  transform: translateX(0);
  background: var(--palette-0);
  z-index: 2;
  height: 100%;
  border: 1px solid var(--palette-1);
  border-radius: var(--rounded);
  contain: size layout style;

  & > * {
    overflow-x: hidden;
  }
}

.filters {
  grid-area: filters;
  width: var(--filters-width);

  &.floating {
    right: 0.25rem;
  }

  &[data-state="closed"] {
    display: none;
    grid-area: unset;
    transform: translateX(calc(100% + 1.5rem));
  }
}

.floating {
  position: fixed;
  height: calc(100% - 0.5rem);
  max-width: 86.25%;
  top: 0.25rem;
  z-index: 3;
  background: var(--palette-0);
  box-shadow: var(--shadow-md);
  transition:
    transform 0.2s ease-in,
    display 0.2s;
  transition-behavior: allow-discrete;

  &[data-state="open"] {
    transform: translateX(0);
  }
}

.content {
  grid-area: content;
  contain: size layout style;

  &.collapsed-filters {
    grid-column-end: filters;
  }
}

.content .header {
  padding-bottom: 1rem;
}

.footer {
  grid-area: footer;
}

.title {
  font-size: var(--text-2xl);
}

@starting-style {
  .filters.floating {
    transform: translateX(calc(100% + 1.5rem));
  }

  .layout.floating-menu-open::before {
    opacity: 0;
  }
}
