/* The room-fields dialog uses the native top layer above Project settings. */
#project-attribute-settings-modal {
  max-width: none;
  max-height: none;
  width: min(100vw, var(--arrange-visual-width, 100vw));
  height: min(100dvh, var(--arrange-visual-height, 100dvh));
  box-sizing: border-box;
  margin: 0;
  border: 0;
  padding: var(--s-4, 16px);
  color: var(--text);
  background: transparent;
  backdrop-filter: none;
}

#project-attribute-settings-modal::backdrop {
  background: var(--modal-overlay);
}

@media (max-width: 768px) {
  #project-attribute-settings-modal > .project-attribute-settings-content {
    min-height: 0;
    max-height: calc(min(100dvh, var(--arrange-visual-height, 100dvh)) - var(--s-6, 32px)) !important;
  }
}

@media (max-width: 768px), (max-width: 1024px) and (pointer: coarse) {
  /* Size containment needs a definite body height in an auto-height window. */
  body.windowed-layout [data-win-id="detail"] .window-body:has(.project-home-dashboard) {
    flex: 0 0 auto;
    height: min(75dvh, calc(var(--arrange-visual-height) - 152px));
  }
}
