@layer recipes {
  [data-scope="collapsible"][data-part="root"] {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    width: 400px;
  }

  [data-scope="collapsible"][data-part="trigger"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: start;
    cursor: pointer;
    font-weight: 500;
    padding-inline: 1rem;
    padding-block: 0.25rem;
    background: var(--colors-bg-primary-subtle);
    color: #ffffff;
  }

  [data-scope="collapsible"][data-part="trigger"]:hover {
    background: var(--colors-bg-primary-bold);
  }

  [data-scope="collapsible"][data-part="content"] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
  }

  [data-scope="collapsible"][data-part="content"][data-state="open"] {
    animation: open 110ms cubic-bezier(0, 0, 0.38, 0.9);
  }

  [data-scope="collapsible"][data-part="content"][data-state="closed"] {
    animation: close 110ms cubic-bezier(0, 0, 0.38, 0.9);
  }

  @keyframes open {
    from {
      height: 0;
      opacity: 0.01;
    }
    to {
      height: var(--height);
      opacity: 1;
    }
  }

  @keyframes close {
    from {
      height: var(--height);
      opacity: 1;
    }
    to {
      height: 0;
      opacity: 0.01;
    }
  }
}
